#ifndef CESCLUSTERCOLL_HH #define CESCLUSTERCOLL_HH /****************************************************************************** * CesClusterColl class header file * * * *****************************************************************************/ #include #include #include #include //--------------- // C++ Headers -- //--------------- #include "CalorObjects/CesCluster.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 CesClusterColl; // needed for global typedefs //-------------------------------------------------------- // Global typedef's for EDM2 Handles for the collection -- //-------------------------------------------------------- typedef Handle CesClusterColl_h; typedef ConstHandle CesClusterColl_ch; class CesClusterColl : public StorableObject { public: //-------------------------------------------------------------------------- // typedef's for the collection //-------------------------------------------------------------------------- typedef CesCluster value_type; typedef CesCluster& reference; typedef const CesCluster& const_reference; typedef CesCluster* pointer; typedef const CesCluster* const_pointer; typedef std::vector CesClusterVector; typedef CesClusterVector::iterator iterator; typedef CesClusterVector::const_iterator const_iterator; 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(CesClusterColl_ch & setHandle); static Error find(CesClusterColl_ch & setHandle, const StorableObject::Selector & selector ); static Error find(CesClusterColl_ch & setHandle, const std::string& description); //-------------------------------------------------------------------------- // Constructors //-------------------------------------------------------------------------- // Default constructor : CesClusterColl(); //Copy constructor : CesClusterColl(const CesClusterColl& rhs); //-------------------------------------------------------------------------- // Access to the underlying set of tracks. //-------------------------------------------------------------------------- CesClusterVector& contents() { return _container.contents(); } const CesClusterVector& 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 ~CesClusterColl(); private: //-------------------------------------------------------------------------- // Private data //-------------------------------------------------------------------------- ValueVector _container; ClassDef(CesClusterColl, 2) }; #endif // !CESCLUSTERCOLL_HH