AliPhysics  6bc8652 (6bc8652)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliFMDMCHitHandler.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 AliFMDMCHitHandler : public AliMCEventHandler
23 {
24 public:
32  AliFMDMCHitHandler(const char* name="FMD",
33  const char* clsName="AliFMDHit",
34  AliMCEventHandler* parent=0);
36  virtual ~AliFMDMCHitHandler() {}
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() { return fArray; }
154  static AliFMDMCHitHandler* Create(const char* name="FMD",
155  const char* what="Hits");
164  static TClonesArray* GetParticleArray(AliFMDMCHitHandler* handler,
165  Int_t particle);
166 protected:
173  : AliMCEventHandler(),
174  fParent(o.fParent),
175  fFile(0),
176  fTree(0),
177  fDir(0),
178  fArray(0),
179  fNEvents(0),
180  fNEventsPerFile(0),
182  fEvent(0),
183  fFileNumber(0),
184  fTreeName(""),
185  fFileBase("")
186  {}
195  {
196  if (&o == this) return *this;
197  // AliMCEventHandler::operator=(o);
198  fParent = o.fParent;
199  fFile = o.fFile;
200  fTree = o.fTree;
201  return *this;
202  }
208  TString* GetParentPath() const;
209  AliMCEventHandler* fParent; // Parent MC handler
210  TFile* fFile;
212  TDirectory* fDir;
213  TClonesArray* fArray;
221  ClassDef(AliFMDMCHitHandler,1); // Connect FMD hits tree
222 };
223 
224 #endif
225 // Local Variables:
226 // mode: C++
227 // End:
228 
virtual Bool_t OpenFile(Int_t ev)
virtual TTree * GetTree() const
AliMCEventHandler * fParent
virtual Bool_t FinishEvent()
static AliFMDMCHitHandler * Create(const char *name="FMD", const char *what="Hits")
long long Long64_t
Definition: External.C:43
AliFMDMCHitHandler(const char *name="FMD", const char *clsName="AliFMDHit", AliMCEventHandler *parent=0)
virtual Bool_t LoadEvent(Int_t iev)
virtual Bool_t TerminateIO()
virtual Bool_t Notify()
virtual Bool_t BeginEvent(Long64_t entry)
int Int_t
Definition: External.C:63
virtual Bool_t Init(TTree *t, Option_t *o)
ClassDef(AliFMDMCHitHandler, 1)
TString * GetParentPath() const
virtual void SetNumberOfEventsInContainer(Int_t nev)
virtual Bool_t Terminate()
AliMCEventHandler * GetParent()
static TClonesArray * GetParticleArray(AliFMDMCHitHandler *handler, Int_t particle)
AliFMDMCHitHandler & operator=(const AliFMDMCHitHandler &o)
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
AliFMDMCHitHandler(const AliFMDMCHitHandler &o)
TClonesArray * GetArray()