HARPO  5.1.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HarpoReaderRoot.h
Go to the documentation of this file.
1 #ifndef HARPOREADERROOT_H
2 #define HARPOREADERROOT_H
3 // //
5 // HarpoReaderRoot //
6 // //
7 // DCC raw file ReaderRaw Class //
8 // //
10 
11 #include "TObject.h"
12 #include "TFile.h"
13 #include "TChain.h"
14 #include "HarpoConfig.h"
15 #include "HarpoDetSet.h"
16 
17 #include "HarpoRunHeader.h"
18 #include "HarpoEvent.h"
19 #include "HarpoRecoEvent.h"
20 #include "HarpoEventHeader.h"
21 
22 #include "HarpoReaderBase.h"
23 #include "HarpoDetReader.h"
24 
26 
27 public:
28 
31 
32  virtual ~HarpoReaderRoot();
33 
34  void SetDetFile(TString *name,Int_t plane);
35  //void SetInputFile(TString *name);
36  void SetRootFile(TString *name);
37 
38  Bool_t NextEvent(); // Read next event from raw file
39  Bool_t isTimeSynchro() // Both planes has the same time stamp
40  { return fSync; }
41 
42  void SkipEvent(){} // Skeep Event
43 
44  HarpoEvent *GetEvent(); // Pointer to Current event
45  HarpoRunHeader *GetRunHeader(); // Run Header
46 
47  Bool_t Init(hReadMode mode=hSyncTime); // Open raw file and check header
48 
49  /* Bool_t isDone() { return fDone; } //! EOF reached */
50  /* Bool_t isError() { return fError; } //! Read errors */
51 
52  /* Long_t Loop(); // Process all events as defined in config */
53  Long_t Loop(Long_t maxevents);
54  Long_t Loop(){return Loop(fMaxEvents);}
55 
56  Long_t Find(Long_t eventNo);
57 
58  /* void SetRunNo(Long_t nRun) { fRunNo = nRun; } */
59  /* Long_t GetRunNo() { return fRunNo; } */
60  /* Long_t GetReadEvts() { return fNevts; } //! Number of readed events */
61 
62  //void print();
63 
64 private:
65 
66 
67  Bool_t fSync; // Both plane with the same timestamp
68 
69  hReadMode fMode; // Event Read Mode
70 
71 
72  TFile* fInRootFile;
73  TChain* fInputTree;
74  //TTree* fInputTree;
78 
79  TString *fInputFileName; //ROOT file Name
80  /* TString *fNewFileName; //ROOT file Name */
81  /* TFile *fNewFile; //! Root file handle */
82  /* Bool_t fSave; //???? */
83 
84 
85  ClassDef(HarpoReaderRoot,1)
86 };
87 
88 
89 #endif
A virtual class store event data for un detector.
Definition: HarpoDetEvent.h:32
void SetRootFile(TString *name)
HarpoRunHeader * GetRunHeader()
Create RunHeader with links to all raw headers.
A class hold HARPO run iformation.
Object containing the reconstruction information for one event (with array of HarpoRecoClusters Harpo...
FullEvent Header not scecific to the detectors The class is ....
Bool_t isTimeSynchro()
A base class for all top level HARPO readers.
A class which read HARPO events from root tree.
void SetDetFile(TString *name, Int_t plane)
TString * fInputFileName
Long_t Find(Long_t eventNo)
HarpoRecoEvent * fRecoEvent
A class store HARPO row event data and header. Provide access metods to the row event data...
Definition: HarpoEvent.h:29
HarpoEventHeader * fEventHeader
Bool_t fSync
Find raw event by event number.
virtual ~HarpoReaderRoot()
const ULong_t gkNDetectors
Definition: HarpoDet.h:14
HarpoDetEvent * fEvents[gkNDetectors]
Bool_t Init(hReadMode mode=hSyncTime)
Init method : Open in/out files and check run header signature.
HarpoEvent * GetEvent()
hReadMode
A class which keeps track of the entire configuration of the analysis.
Definition: HarpoConfig.h:50