KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVINDRAGeneDataSelector.h
Go to the documentation of this file.
1 
7 #ifndef KVINDRAGeneDataSelector_h
8 #define KVINDRAGeneDataSelector_h
9 
10 #include <TROOT.h>
11 #include <TChain.h>
12 #include <TFile.h>
13 #include <TSelector.h>
14 #include "KVINDRATriggerInfo.h"
15 #include "Riostream.h"
16 #include "KVINDRA.h"
17 #include "KVEBYEDAT_ACQParam.h"
18 
44 protected :
46 
51 
56 
59 
60 public :
62  {
64  }
66  {
67  }
68  virtual Int_t Version() const
69  {
70  return 2;
71  }
72  virtual void Begin(TTree* tree);
73  virtual void SlaveBegin(TTree* tree);
74  virtual void Init(TTree* tree);
75  virtual Bool_t Notify();
76  virtual Bool_t Process(Long64_t entry);
77  virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0)
78  {
79  return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0;
80  }
81  virtual void SetOption(const char* option)
82  {
83  fOption = option;
84  }
85  virtual void SetObject(TObject* obj)
86  {
87  fObject = obj;
88  }
89  virtual void SetInputList(TList* input)
90  {
91  fInput = input;
92  }
93  virtual TList* GetOutputList() const
94  {
95  return fOutput;
96  }
97  virtual void SlaveTerminate();
98  virtual void Terminate();
99  virtual void InitAnalysis()
100  {
101  };
102  virtual void InitRun()
103  {
104  };
105  virtual Bool_t Analysis()
106  {
107  return kTRUE;
108  };
109  virtual void EndRun()
110  {
111  };
112  virtual void EndAnalysis()
113  {
114  };
115  virtual Bool_t AtEndOfRun(void);
116  static void Make(const Char_t* kvsname);
118 
119  ClassDef(KVINDRAGeneDataSelector, 0) //Base class for analysis of INDRA pulser & laser data
120 };
121 
122 #endif
123 
124 #ifdef KVINDRAGeneDataSelector_cxx
126 {
134 
136  TriggerInfo = 0;
138  if (!tree) return;
139  fChain = tree;
140  fChain->SetMakeClass(1);
141 }
142 
144 {
150 
153  InitRun(); //user initialisations for run
154  return kTRUE;
155 }
156 
158 {
159 
160  if (!fChain->GetCurrentFile()) {
161  Info("SetBranchAddress", "No file open");
162  return;
163  }
165  gIndra = (KVINDRA*) fChain->GetCurrentFile()->Get("INDRA");
166 
167  if (!gIndra) {
168  Info("SetBranchAddress", "INDRA object not found in file");
169  return;
170  }
171 
178  fChain->SetBranchAddress("RunNumber", &RunNumber, &b_RunNumber);
179  fChain->SetBranchAddress("EventNumber", &EventNumber, &b_EventNumber);
180  fChain->SetBranchAddress("TriggerInfo", &TriggerInfo, &b_TriggerInfo);
181 
184 }
185 
186 #endif // #ifdef KVINDRAGeneDataSelector_cxx
int Int_t
KVINDRA * gIndra
Definition: KVINDRA.cpp:88
char Char_t
const Bool_t kFALSE
bool Bool_t
const Bool_t kTRUE
#define ClassDef(name, id)
For analysing INDRA pulser & laser data.
TBranch * b_RunNumber
List of branches.
Bool_t needToCallEndRun
tells if one needs to call EndRun
virtual void SetInputList(TList *input)
virtual void SetOption(const char *option)
virtual Bool_t Process(Long64_t entry)
TTree * fChain
pointer to the analyzed TTree or TChain
virtual void Init(TTree *tree)
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
virtual void SetObject(TObject *obj)
virtual void SlaveBegin(TTree *tree)
virtual Bool_t Notify()
static void Make(const Char_t *kvsname)
Automatic generation of derived class for gene data analysis.
virtual Int_t Version() const
Int_t RunNumber
Declaration of leave types.
Long64_t fTreeEntry
this is the current TTree entry number, i.e. the argument passed to TSelector::Process(Long64_t entry...
virtual TList * GetOutputList() const
virtual void Begin(TTree *tree)
KVINDRATriggerInfo * TriggerInfo
Information on INDRA event from DAQ trigger.
INDRA multidetector array geometry.
Definition: KVINDRA.h:70
UInt_t GetCurrentRunNumber() const
T * Get(const char *namecycle)
virtual void Info(const char *method, const char *msgfmt,...) const
TList * fInput
TString fOption
TSelectorList * fOutput
TObject * fObject
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
virtual TTree * GetTree() const
TFile * GetCurrentFile() const
virtual void SetMakeClass(Int_t make)
Int_t SetBranchAddress(const char *bname, T **add, TBranch **ptr=0)
long long Long64_t