EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairAnaSelector.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairAnaSelector.h
1 // -------------------------------------------------------------------------
2 // ----- FairAnaSelector header file -----
3 // ----- Created 14/10/11 by R. Karabowicz -----
4 // ----- Updated 01/02/12 by R. Karabowicz -----
5 // -------------------------------------------------------------------------
6 
7 #ifndef FAIRANASELECTOR_H
8 #define FAIRANASELECTOR_H
9 
10 #include "TROOT.h"
11 #include "TChain.h"
12 #include "TFile.h"
13 #include "TProofOutputFile.h"
14 #include "TSelector.h"
15 #include "TH1F.h"
16 #include "TVector3.h"
17 #include "TClonesArray.h"
18 
19 class FairRunAna;
20 
21 class FairAnaSelector : public TSelector
22 {
23  public :
24  TProofOutputFile* fProofFile;
25  TFile* fFile;
26  TTree* fChain;
28 
29  FairAnaSelector(TTree* /*tree*/ =0) : fProofFile(0), fFile(0), fChain(0), fRunAna(NULL) { }
30  virtual ~FairAnaSelector() { }
31  virtual Int_t Version() const {
32  return 1;
33  }
34  virtual void Begin(TTree* tree);
35  virtual void SlaveBegin(TTree* tree);
36  virtual void Init(TTree* tree);
37  virtual Bool_t Notify();
38  virtual Bool_t Process(Long64_t entry);
39  virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0) {
40  return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0;
41  }
42  virtual void SetOption(const char* option) {
43  fOption = option;
44  }
45  virtual void SetObject(TObject* obj) {
46  fObject = obj;
47  }
48  virtual void SetInputList(TList* input) {
49  fInput = input;
50  }
51  virtual TList* GetOutputList() const {
52  return fOutput;
53  }
54  virtual void SlaveTerminate();
55  virtual void Terminate();
56 
57  void SetFairRunAna(FairRunAna* runAna) {
58  fRunAna = runAna;
59  }
60 
61  private:
62 
65 
67 };
68 
69 #endif //FAIRANASELECTOR_H