/** \class Pes2dClusterColl StorableObject for Pes2d clusters. \author Dave Waters \date 15-Mar-2000 Dave Waters Initial creation. */ #ifndef PES2DCLUSTERCOLL_HH #define PES2DCLUSTERCOLL_HH #include #include #include #include //--------------- // C++ Headers -- //--------------- #include "CalorObjects/Pes2dCluster.hh" #include "Edm/ConstHandle.hh" #include "Edm/Handle.hh" #include "Edm/StorableObject.hh" #include "StorableContainers/ValueVector.hh" // Root headers: #include "Rtypes.h" //---------------------------------- // Forward Declaration of Classes -- //---------------------------------- class Pes2dClusterColl; // needed for global typedefs //-------------------------------------------------------- // Global typedef's for EDM2 Handles for the collection -- //-------------------------------------------------------- typedef Handle Pes2dClusterColl_h; typedef ConstHandle Pes2dClusterColl_ch; class Pes2dClusterColl : public StorableObject { public: //-------------------------------------------------------------------------- // typedef's for the collection //-------------------------------------------------------------------------- typedef Pes2dCluster value_type; typedef Pes2dCluster& reference; typedef const Pes2dCluster& const_reference; typedef Pes2dCluster* pointer; typedef const Pes2dCluster* const_pointer; typedef std::vector Pes2dClusterVector; typedef Pes2dClusterVector::iterator iterator; typedef Pes2dClusterVector::const_iterator const_iterator; typedef ConstHandle const_handle; typedef std::vector::difference_type difference_type; typedef std::vector::size_type size_type; typedef std::vector CollType; typedef CollType collection_type; //-------------------------------------------------------------------------- // Functions to retrieve the collection from the event //-------------------------------------------------------------------------- enum Error { ERROR, OK }; static Error find(Pes2dClusterColl_ch & setHandle); static Error find(Pes2dClusterColl_ch & setHandle, const StorableObject::Selector & selector ); //-------------------------------------------------------------------------- // Constructors //-------------------------------------------------------------------------- // Default constructor : Pes2dClusterColl(); //Copy constructor : Pes2dClusterColl(const Pes2dClusterColl& rhs); //-------------------------------------------------------------------------- // Access to the underlying set of tracks. //-------------------------------------------------------------------------- Pes2dClusterVector& contents() { return _container.contents(); } const Pes2dClusterVector& 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& buf); // Declared by ClassDef() 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 ~Pes2dClusterColl(); private: //-------------------------------------------------------------------------- // Private data //-------------------------------------------------------------------------- ValueVector _container; ClassDef(Pes2dClusterColl, 2) }; #endif // !PES2DCLUSTERCOLL_HH