er  dev
ERRootSourceOld.h
1 #ifndef ERRootSourceOld_H
2 #define ERRootSourceOld_H
3 
4 #include <vector>
5 
6 #include "TString.h"
7 #include "TFile.h"
8 #include "TTree.h"
9 
10 #include "FairSource.h"
11 
12 #include "ERRawEvent.h"
13 
14 class ERRootSourceOld : public FairSource
15 {
16  public:
18  ERRootSourceOld(const ERRootSourceOld& source);
19  virtual ~ERRootSourceOld();
20 
21  virtual Bool_t Init();
22 
23  virtual Int_t ReadEvent(UInt_t=0);
24 
25  virtual void Close();
26 
27  virtual void Reset();
28 
29  virtual Source_Type GetSourceType(){return kFILE;}
30 
31  virtual void SetParUnpackers(){}
32 
33  virtual Bool_t InitUnpackers(){return kTRUE;}
34 
35  virtual Bool_t ReInitUnpackers(){return kTRUE;}
36 
37  void SetFile(TString path, TString treeName, TString branchName);
38 
39  void AddEvent(ERRawEvent* event) {fRawEvents.push_back(event);}
40  private:
41  TString fPath;
42  TString fTreeName;
43  TString fBranchName;
44  TFile* fFile;
45  TTree* fTree;
46  Int_t HE8Event_nevent;
47 
48  std::vector<ERRawEvent*> fRawEvents;
49  public:
50  ClassDef(ERRootSourceOld, 1)
51 };
52 
53 
54 #endif