#ifndef CPRCLUSTERCOLL_HH #define CPRCLUSTERCOLL_HH /****************************************************************************** * CprClusterColl class header file * * * *****************************************************************************/ #include #include #include #include //--------------- // C++ Headers -- //--------------- #include "CalorObjects/CprCluster.hh" #include "Edm/ConstHandle.hh" #include "Edm/Handle.hh" #include "Edm/StorableObject.hh" #include "StorableContainers/ValueVector.hh" //---------------------------------- // Forward Declaration of Classes -- //---------------------------------- class CprClusterColl; // needed for global typedefs //-------------------------------------------------------- // Global typedef's for EDM2 Handles for the collection -- //-------------------------------------------------------- typedef Handle CprClusterColl_h; typedef ConstHandle CprClusterColl_ch; class CprClusterColl : public StorableObject { public: //-------------------------------------------------------------------------- // typedef's for the collection //-------------------------------------------------------------------------- typedef CprCluster value_type; typedef CprCluster& reference; typedef const CprCluster& const_reference; typedef CprCluster* pointer; typedef const CprCluster* const_pointer; typedef std::vector CprClusterVector; typedef CprClusterVector::iterator iterator; typedef CprClusterVector::const_iterator const_iterator; //-------------------------------------------------------------------------- // Functions to retrieve the collection from the event //-------------------------------------------------------------------------- enum Error { ERROR, OK }; static Error find(CprClusterColl_ch & setHandle); static Error find(CprClusterColl_ch & setHandle, const StorableObject::Selector & selector ); //-------------------------------------------------------------------------- // Constructors //-------------------------------------------------------------------------- // Default constructor : CprClusterColl(); //Copy constructor : CprClusterColl(const CprClusterColl& rhs); //-------------------------------------------------------------------------- // Access to the underlying set of tracks. //-------------------------------------------------------------------------- CprClusterVector& contents() { return _container.contents(); } const CprClusterVector& 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 ~CprClusterColl(); private: //-------------------------------------------------------------------------- // Private data //-------------------------------------------------------------------------- ValueVector _container; ClassDef(CprClusterColl, 1) }; #endif // !CPRCLUSTERCOLL_HH