#ifndef _SOURCE_HEPG_HH_ #define _SOURCE_HEPG_HH_ #ifdef USE_CDFEDM2 ////////////////////////////////////////////////////////////////////////// // // Component: SourceHEPG.hh // Purpose: This is a concrete class that uses the HEPG bank to // fill the EnergyData object. This class inherits from // InputSource. // // Created: 28/06/99 Pierre Savard // History: Aug 15, 2002 J.-F. Arguin: Class is activated. // ////////////////////////////////////////////////////////////////////////// #include #include #include #include "BaBar/Cdf.hh" #include "Edm/Id.hh" #include "Calor/InputSource.hh" #include "SimulationObjects/HEPG_StorableBank.hh" class AbsEvent; // namespace calor { class SourceHEPG : public InputSource { public: // // Memory management // // Constructor will fetch a HEPG object SourceHEPG(); // Default copy constructor and assignment operator do the right thing. // Destructor // ~SourceHEPG(); // // Testing // // // Manipulation and access // Id initEvent(AbsEvent* anEvent); Id initEvent(AbsEvent* anEvent, Id objectId); // Access methods std::string sourceName() const; EnergyData* next(); bool done() const; private: int _iter; int _end; size_t _ietaCount; size_t _iphiCount; std::string _sourceName; ConstHandle _dataHandle; }; inline std::string SourceHEPG::sourceName() const{return _sourceName;} inline bool SourceHEPG::done() const {return (_iter == _end);} // } // namespace calor #endif // USE_CDFEDM2 #endif // _SOURCE_HEPG_HH_