#ifndef TOWER_CORRECTIONCOLL_HH_ #define TOWER_CORRECTIONCOLL_HH_ ////////////////////////////////////////////////////////////////////////////////////////////////////// // // Component: TowerCorrectionColl.hh // Purpose: This class contains corrections for every tower in a // given PhysicsTowerData object. // // Created: 13/09/99 Pierre Savard // ///////////////////////////////////////////////////////////////////////////////////////////////////// #include #include #include #include #include //--------------- // C++ Headers -- //--------------- #include "CalorObjects/TowerCorrection.hh" #include "Edm/ConstHandle.hh" #include "Edm/Handle.hh" #include "Edm/StorableObject.hh" #include "StorableContainers/ValueVector.hh" //---------------------------------- // Forward Declaration of Classes -- //---------------------------------- class TowerCorrection; class TowerCorrectionColl; // needed for global typedefs //-------------------------------------------------------- // Global typedef's for EDM2 Handles for the collection -- //-------------------------------------------------------- typedef Handle TowerCorrectionColl_h; typedef ConstHandle TowerCorrectionColl_ch; class TowerCorrectionColl : public StorableObject { public: //-------------------------------------------------------------------------- // typedef's for the collection //-------------------------------------------------------------------------- typedef TowerCorrection value_type; typedef TowerCorrection& reference; typedef const TowerCorrection& const_reference; typedef TowerCorrection* pointer; typedef const TowerCorrection* const_pointer; typedef std::vector TowerCorrectionVector; typedef TowerCorrectionVector::iterator iterator; typedef TowerCorrectionVector::const_iterator const_iterator; //-------------------------------------------------------------------------- // Functions to retrieve the collection from the event //-------------------------------------------------------------------------- enum Error { ERROR, OK }; static Error find(TowerCorrectionColl_ch & setHandle); static Error find(TowerCorrectionColl_ch & setHandle, const StorableObject::Selector & selector ); //-------------------------------------------------------------------------- // Constructors //-------------------------------------------------------------------------- // Default constructor : TowerCorrectionColl(); //Copy constructor : TowerCorrectionColl(const TowerCorrectionColl& rhs); //-------------------------------------------------------------------------- // Access to the underlying set of tracks. //-------------------------------------------------------------------------- TowerCorrectionVector& contents() { return _container.contents(); } const TowerCorrectionVector& contents() const { return _container.contents(); } //-------------------------------------------------------------------------- // EDM: functions required by StorableObject //-------------------------------------------------------------------------- virtual std::string class_name() const ; virtual Version_t class_version() const; // void Streamer(TBuffer& iobuffer); bool postread(EventRecord* p); bool prewrite(EventRecord* p); bool activate(EventRecord* p); bool deactivate(EventRecord* p); // Destructors virtual void destroy(); virtual void deallocate(); void print(std::ostream& os = std::cout) const; protected: // Destructor virtual ~TowerCorrectionColl(){}; private: //-------------------------------------------------------------------------- // Private data //-------------------------------------------------------------------------- ValueVector _container; ClassDef(TowerCorrectionColl, 1) }; #endif // TOWER_CORRECTION_COLL_HH