#ifndef _SOURCE_CALDATA_HH_ #define _SOURCE_CALDATA_HH_ #ifdef USE_CDFEDM2 ////////////////////////////////////////////////////////////////////////// // // Component: SourceCalData.hh // Purpose: This is a concrete class that uses the CalData object to // fill the EnergyData object. This class inherits from // InputSource. // // Created: 28/06/99 Pierre Savard // History: // ////////////////////////////////////////////////////////////////////////// #include #include #include #include "BaBar/Cdf.hh" #include "Edm/Id.hh" #include "CalorGeometry/CalConstants.hh" #include "CalorObjects/CalData.hh" #include "Calor/InputSource.hh" class AbsEvent; // namespace calor { class SourceCalData : public InputSource { public: // // Memory management // // Constructor will fetch a CalData object SourceCalData(); // Default copy constructor and assignment operator do the right thing. // default destructor // ~SourceCalData(); // // 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: CalData::ConstIterator _iter; CalData::ConstIterator _end; std::string _sourceName; CalData_ch _dataHandle; }; inline std::string SourceCalData::sourceName() const{return _sourceName;} inline bool SourceCalData::done() const {return (_iter == _end);} // } // namespace calor #endif // USE_CDFEDM2 #endif // _SOURCE_CALDATA_HH_