HARPO  5.1.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HarpoReaderRaw.h
Go to the documentation of this file.
1 #ifndef HARPOREADERRAW_H
2 #define HARPOREADERRAW_H
3 // //
5 // HarpoReaderRaw //
6 // //
7 // DCC raw file ReaderRaw Class //
8 // //
10 
11 #include "TObject.h"
12 #include "TFile.h"
13 #include "HarpoConfig.h"
14 #include "HarpoDetSet.h"
15 
16 #include "HarpoRunHeader.h"
17 #include "HarpoEvent.h"
18 #include "HarpoEventHeader.h"
19 
20 #include "HarpoReaderBase.h"
21 #include "HarpoDetReader.h"
22 
24 
25 public:
26 
29 
30  virtual ~HarpoReaderRaw();
31 
32  void SetDetFile(TString *name,Int_t plane);
33  void SetRootFile(TString *name);
34 
35  Bool_t NextEvent(); // Read next event from raw file
36  Bool_t isTimeSynchro() // Both planes has the same time stamp
37  { return fSync; }
38 
39  void SkipEvent(); // Skeep Event
40 
41  HarpoEvent *FillEvent(); // Pointer to Current event
42  HarpoEvent *GetEvent(){return fEvent;} // Pointer to Current event
43  HarpoRunHeader *GetRunHeader(); // Run Header
44 
45  Bool_t Init(hReadMode mode=hSyncTime); // Open raw file and check header
46 
47  /* Bool_t isDone() { return fDone; } //! EOF reached */
48  /* Bool_t isError() { return fError; } //! Read errors */
49 
50  /* Long_t Loop(); // Process all events as defined in config */
51  Long_t Loop(Long_t maxevents);
52 
53  Long_t Find(Long_t eventNo);
54 
55  /* void SetRunNo(Long_t nRun) { fRunNo = nRun; } */
56  /* Long_t GetRunNo() { return fRunNo; } */
57  /* Long_t GetReadEvts() { return fNevts; } //! Number of readed events */
58 
59  //void print();
60 
61 private:
63  void FillRunConfigInfo();
64 
65 
66  Bool_t fSync; // Both plane with the same timestamp
67  Bool_t fPmm2Empty;
68  Bool_t fSkipPmm2;
69 
70  Int_t fPmm2Sync;
71  Int_t fLatency;
72  Int_t fSkipEvents;
73 
74  hReadMode fMode; // Event Read Mode
75 
76 
77  /* TString *fNewFileName; //ROOT file Name */
78  /* TFile *fNewFile; //! Root file handle */
79  /* Bool_t fSave; //???? */
80 
81 
82  ClassDef(HarpoReaderRaw,1)
83 };
84 
85 
86 #endif
Long_t Loop(Long_t maxevents)
A class which read HARPO data from raw files.
HarpoRunHeader * GetRunHeader()
Create RunHeader with links to all raw headers.
Bool_t NextEvent()
TODO add synchro fro PMM2 (att PMM2 1lsb=100ns, DCC 1lsb=10ns)
Bool_t isTimeSynchro()
A class hold HARPO run iformation.
hReadMode fMode
Long_t Find(Long_t eventNo)
HarpoEvent * FillEvent()
A base class for all top level HARPO readers.
void FillRunConfigInfo()
Find raw event by event number.
HarpoEvent * GetEvent()
void SetRootFile(TString *name)
virtual ~HarpoReaderRaw()
A class store HARPO row event data and header. Provide access metods to the row event data...
Definition: HarpoEvent.h:29
HarpoEvent * fEvent
hReadMode
A class which keeps track of the entire configuration of the analysis.
Definition: HarpoConfig.h:50
Bool_t Init(hReadMode mode=hSyncTime)
Init method : Open in/out files and check run header signature.
void SetDetFile(TString *name, Int_t plane)