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