// ESAF : Euso Simulation and Analysis Framework // $Id: EEvent.hh,v 1.15 2005/04/18 22:48:33 thea Exp $ // M. Pallavicini created Mar, 12 2002 // root Event description in Euso // It contains an event with all possible information // It is the base for all root files (input and output) // At each stage of the program the event is enriched with additional data // #ifndef __EEVENT_HH_ #define __EEVENT_HH_ #include "TObject.h" #include "TString.h" #include "TTree.h" #include "EFillable.hh" #include "ETruth.hh" #include "EHeader.hh" #include "EDetector.hh" #include "EShower.hh" #include "EAtmosphere.hh" #include "EChipTrackTrigger.hh" // Event class EEvent : public TObject { public: enum EActiveBranches { kShower = BIT(0), kAtmosphere = BIT(1), kDetector = BIT(2), kChipTrackTrigger = BIT(3), kNone = 0, kAll = 0xF }; EEvent( Int_t = kAll ); EEvent(const EEvent&); virtual ~EEvent(); virtual void Copy( TObject& ) const ; virtual void Clear( Option_t* =""); virtual void Delete( Option_t* ="" ); Bool_t BranchTree( TTree* ); // setup EEvent structure in TTree. Returns 0 if something fails Bool_t SetBranches( TTree* ); // set branches addresses for reading Bool_t Fill( EFiller& f); // any filling from external data is done through this visitor void Build(Int_t,Int_t, const char* = 0); // fill event header // getters inline EHeader* GetHeader() { return fHeader; } inline ETruth* GetTruth() { return fTruth; } inline EShower* GetShower() { return fShower; } inline EAtmosphere* GetAtmosphere() { return fAtmosphere; } inline EDetector* GetDetector() { return fDetector;} inline EChipTrackTrigger* GetChipTrackTrigger() { return fChipTrackTrigger; } inline static EEvent* GetCurrent() { return fgCurrent; } inline static void SetCurrent(EEvent *ev) { fgCurrent=ev; } private: EHeader *fHeader; // event header ETruth *fTruth; // EECR info EShower *fShower; // shower simulation EAtmosphere *fAtmosphere; // atmosphere simulation EDetector *fDetector; // euso detector simulation EChipTrackTrigger *fChipTrackTrigger; // chip track trigger simulation static EEvent* fgCurrent; ClassDef(EEvent,1) }; #endif /* __EEVENT_HH_ */