// ESAF : Euso Simulation and Analysis Framework // Reco input module: abstract interface // $Id: InputModule.hh,v 1.9 2005/06/16 09:59:03 naumov Exp $ // Marco Pallavicini created Oct, 16 2003 #ifndef __INPUTMODULE_HH_ #define __INPUTMODULE_HH_ #include #include "euso.hh" #include "EsafConfigurable.hh" #include "EsafMsgSource.hh" class RecoEvent; class RecoRootEvent; class InputModule : public EsafConfigurable, public EsafMsgSource { public: // ctor InputModule( const string& ); // dtor virtual ~InputModule(); // init data source virtual Bool_t Init() = 0; // close data source virtual Bool_t Done() = 0; // returns one event until event source is empty virtual RecoEvent* GetEvent() = 0; // delete last returned event virtual void DestroyEvent() = 0; // name of this input module inline const string& GetName() const { return fName; } // save root output virtual Bool_t SaveRootData( RecoRootEvent* ) = 0; string fInputFileName; EsafConfigClass(Reco,InputModule) private: // name of this input module string fName; // pointer to last returned event RecoEvent *fEvent; protected: // event handling for child classes inline RecoEvent* GetRecoEvent() { return fEvent; } inline void SetRecoEvent(RecoEvent* ev) { fEvent = ev; } ClassDef(InputModule,0) }; #endif /* __INPUTMODULE_HH_ */