// ESAF : Euso Simulation and Analysis Framework // Reconstruction module // $Id: RecoModule.hh,v 1.9 2004/11/25 18:49:28 naumov Exp $ // Marco Pallavicini created Oct, 16 2003 // data container added Feb, 16,2004 #ifndef __RECOMODULE_HH_ #define __RECOMODULE_HH_ #include #include "euso.hh" #include "EsafConfigurable.hh" #include "RecoModuleData.hh" #include "EsafMsgSource.hh" class RecoEvent; class RecoRootEvent; class RecoModule : public EsafConfigurable, public EsafMsgSource { public: // ctor RecoModule( const string&); // dtor virtual ~RecoModule(); // module name inline const string& GetName() const { return fName; } // Init method: called at the beginning of a run virtual Bool_t Init() = 0; // called before each event process virtual Bool_t PreProcess() = 0; // event processing virtual Bool_t Process( RecoEvent* ) = 0; // called after processing an event virtual Bool_t PostProcess() = 0; // called at the end of each run virtual Bool_t Done() = 0; virtual Bool_t SaveRootData(RecoRootEvent*) = 0; // clean memory after each event // each module has the responbility to clean the data container // from its own data in method UserMemoryClean() // UserMemoryClean() and StandardMemoryClean() are called // by the framework virtual void UserMemoryClean() {} // user SHOULD NOT override this inline void StandardMemoryClean() {MyData()->CleanMaps();} public: EsafConfigClass(Reco,RecoModule) protected: // get RecoModuleData object for child classes RecoModuleData* MyData() { return fData; } public: // get RecoModuleData object for public: read only! const RecoModuleData* GetData() const { return fData;} private: // name of this module string fName; // container object with output data of this module RecoModuleData *fData; ClassDef(RecoModule,0) }; #endif /* __RECOMODULE_HH_ */