001
002
003
004
005
006
007
008
009
010
011 #ifndef PES2DCLUSTERCOLL_HH
012 #define PES2DCLUSTERCOLL_HH
013
014 #include <algorithm>
015 #include <iosfwd>
016 #include <string>
017 #include <vector>
018
019
020
021
022 #include "CalorObjects/Pes2dCluster.hh"
023 #include "Edm/ConstHandle.hh"
024 #include "Edm/Handle.hh"
025 #include "Edm/StorableObject.hh"
026 #include "StorableContainers/ValueVector.hh"
027
028
029 #include "Rtypes.h"
030
031
032
033
034 class Pes2dClusterColl;
035
036
037
038
039
040 typedef Handle<Pes2dClusterColl> Pes2dClusterColl_h;
041 typedef ConstHandle<Pes2dClusterColl> Pes2dClusterColl_ch;
042
043 class Pes2dClusterColl : public StorableObject
044 {
045 public:
046
047
048
049
050
051 typedef Pes2dCluster value_type;
052 typedef Pes2dCluster& reference;
053 typedef const Pes2dCluster& const_reference;
054 typedef Pes2dCluster* pointer;
055 typedef const Pes2dCluster* const_pointer;
056 typedef std::vector<value_type> Pes2dClusterVector;
057 typedef Pes2dClusterVector::iterator iterator;
058 typedef Pes2dClusterVector::const_iterator const_iterator;
059 typedef ConstHandle<Pes2dClusterColl> const_handle;
060 typedef std::vector<value_type>::difference_type difference_type;
061 typedef std::vector<value_type>::size_type size_type;
062 typedef std::vector<value_type> CollType;
063 typedef CollType collection_type;
064
065
066
067
068
069 enum Error
070 {
071 ERROR,
072 OK
073 };
074
075 static Error find(Pes2dClusterColl_ch & setHandle);
076 static Error find(Pes2dClusterColl_ch & setHandle,
077 const StorableObject::Selector & selector );
078
079
080
081
082
083
084 Pes2dClusterColl();
085
086
087 Pes2dClusterColl(const Pes2dClusterColl& rhs);
088
089
090
091
092
093 Pes2dClusterVector& contents() { return _container.contents(); }
094 const Pes2dClusterVector& contents() const { return _container.contents(); }
095
096
097
098
099
100
101 virtual std::string class_name() const ;
102 virtual Version_t class_version() const;
103
104
105 bool postread(EventRecord* p);
106 bool prewrite(EventRecord* p);
107 bool activate(EventRecord* p);
108 bool deactivate(EventRecord* p);
109
110
111
112 virtual void destroy();
113 virtual void deallocate();
114
115 void print(std::ostream& os = std::cout) const;
116
117 protected:
118
119
120 virtual ~Pes2dClusterColl();
121
122 private:
123
124
125
126
127
128 ValueVector<Pes2dCluster> _container;
129
130 ClassDef(Pes2dClusterColl, 2)
131 };
132
133
134
135 #endif
136
Send problems or questions to cdfcode@fnal.gov