// ESAF : Euso Simulation and Analysis Framework // Simunstruction module // $Id: SimuModule.hh,v 1.4 2004/09/28 12:10:35 thea Exp $ // A. Thea created Mar, 13 2004 // This class is a simplified version of RecoModule. // ModuleData has been ripped away since because, for the time being, totally // will be completly indipendent #ifndef __SIMUMODULE_HH_ #define __SIMUMODULE_HH_ #include #include "euso.hh" #include "EsafConfigurable.hh" class SimuEvent; class SimuModule : public EsafConfigurable { public: // ctor SimuModule( const string& ); // dtor virtual ~SimuModule(); // module name inline const string& GetName() const { return fName; } // Init method: called at the beginning of a run virtual bool Init() = 0; // called before each event process virtual bool PreProcess() = 0; // event processing virtual bool Process() = 0; // called after processing an event virtual bool PostProcess() = 0; // called at the end of each run virtual bool Done() = 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 //FIXME inline void StandardMemoryClean() {MyData()->CleanMaps();} public: EsafConfigClass(Simu,SimuModule) protected: // get SimuModuleData object for child classes //FIXME SimuModuleData* MyData() { return fData; } public: // get SimuModuleData object for public: read only! //FIXME const SimuModuleData* GetData() const { return fData;} private: // name of this module string fName; // container object with output data of this module //FIXME SimuModuleData *fData; ClassDef(SimuModule,0) }; #endif /* __SIMUMODULE_HH_ */