AliPhysics  32b88a8 (32b88a8)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMCAuxHandler.h
Go to the documentation of this file.
1 
10 #ifndef ALIFMDMCHITHANDLER_H
11 #define ALIFMDMCHITHANDLER_H
12 #include <AliMCEventHandler.h>
13 class TFile;
14 class TTree;
15 
22 class AliMCAuxHandler : public AliMCEventHandler
23 {
24 public:
32  AliMCAuxHandler(const char* name="FMD",
33  const char* clsName="AliFMDHit",
34  AliMCEventHandler* parent=0);
36  virtual ~AliMCAuxHandler() {}
49  virtual Bool_t Init(TTree* t,Option_t* o) { return AliMCEventHandler::Init(t,o); }
57  virtual Bool_t Init(Option_t* opt);
65  virtual Bool_t BeginEvent(Long64_t entry);
71  virtual Bool_t Notify() { return AliMCEventHandler::Notify(); }
79  virtual Bool_t Notify(const char* path);
85  virtual Bool_t FinishEvent();
91  virtual Bool_t Terminate();
97  virtual Bool_t TerminateIO();
102  virtual void ResetIO();
110  virtual Bool_t LoadEvent(Int_t iev);
117  this->fNEventsInContainer = nev;}
125  virtual Bool_t OpenFile(Int_t ev);
126  /* @} */
127 
133  AliMCEventHandler* GetParent() { return fParent; }
139  virtual TTree* GetTree() const { return fTree;}
145  TClonesArray* GetArray() const { return fArray; }
151  Int_t GetNEntry() const;
159  TClonesArray* GetEntryArray(Int_t entry);
168  static AliMCAuxHandler* Create(const char* name="FMD",
169  const char* what="Hits");
178  static TClonesArray* GetParticleArray(AliMCAuxHandler* handler,
179  Int_t particle);
180 protected:
187  : AliMCEventHandler(),
188  fParent(o.fParent),
189  fFile(0),
190  fTree(0),
191  fDir(0),
192  fArray(0),
193  fNEvents(0),
194  fNEventsPerFile(0),
196  fEvent(0),
197  fFileNumber(0),
198  fTreeName(""),
199  fFileBase("")
200  {}
209  {
210  if (&o == this) return *this;
211  // AliMCEventHandler::operator=(o);
212  fParent = o.fParent;
213  fFile = o.fFile;
214  fTree = o.fTree;
215  return *this;
216  }
222  TString* GetParentPath() const;
223  AliMCEventHandler* fParent; // Parent MC handler
224  TFile* fFile;
226  TDirectory* fDir;
227  TClonesArray* fArray;
235  ClassDef(AliMCAuxHandler,1); // Connect FMD hits tree
236 };
237 
238 #endif
239 // Local Variables:
240 // mode: C++
241 // End:
242 
virtual Bool_t FinishEvent()
long long Long64_t
Definition: External.C:43
TClonesArray * fArray
virtual Bool_t OpenFile(Int_t ev)
virtual Bool_t LoadEvent(Int_t iev)
virtual void SetNumberOfEventsInContainer(Int_t nev)
TDirectory * fDir
static TClonesArray * GetParticleArray(AliMCAuxHandler *handler, Int_t particle)
int Int_t
Definition: External.C:63
virtual void ResetIO()
TClonesArray * GetArray() const
virtual Bool_t Init(TTree *t, Option_t *o)
TString * GetParentPath() const
virtual Bool_t Notify()
AliMCAuxHandler & operator=(const AliMCAuxHandler &o)
AliMCEventHandler * fParent
virtual Bool_t BeginEvent(Long64_t entry)
virtual Bool_t TerminateIO()
virtual TTree * GetTree() const
AliMCAuxHandler(const AliMCAuxHandler &o)
Int_t GetNEntry() const
AliMCAuxHandler(const char *name="FMD", const char *clsName="AliFMDHit", AliMCEventHandler *parent=0)
ClassDef(AliMCAuxHandler, 1)
const char Option_t
Definition: External.C:48
virtual Bool_t Terminate()
virtual ~AliMCAuxHandler()
bool Bool_t
Definition: External.C:53
static AliMCAuxHandler * Create(const char *name="FMD", const char *what="Hits")
TClonesArray * GetEntryArray(Int_t entry)
AliMCEventHandler * GetParent()