CMS 3D CMS Logo

ESCondObjectContainer.h
Go to the documentation of this file.
1 #ifndef ES_COND_OBJECT_CONTAINER_HH
2 #define ES_COND_OBJECT_CONTAINER_HH
3 
5 
9 
10 template <typename T>
12 public:
13  typedef T Item;
14  typedef Item value_type;
16  typedef typename std::vector<Item> Items;
17  typedef typename std::vector<Item>::const_iterator const_iterator;
18  typedef typename std::vector<Item>::iterator iterator;
19 
22 
23  inline const Items &preshowerItems() const { return es_.items(); };
24 
25  inline const Item &preshower(size_t hashedIndex) const { return es_.item(hashedIndex); }
26 
27  inline void insert(std::pair<uint32_t, Item> const &a) {
28  if (DetId(a.first).subdetId() == EcalPreshower) {
29  es_.insert(a);
30  }
31  }
32 
33  inline const_iterator find(uint32_t rawId) const { return es_.find(rawId); }
34 
35  inline const_iterator begin() const { return es_.begin(); }
36 
37  inline const_iterator end() const { return es_.end(); }
38 
39  inline void setValue(const uint32_t id, const Item &item) { (*this)[id] = item; }
40 
41  inline const self &getMap() const { return *this; }
42 
43  inline size_t size() const { return es_.size(); }
44  // add coherent operator++, not needed now -- FIXME
45 
46  inline Item &operator[](uint32_t rawId) { return es_[rawId]; }
47 
48  inline Item const &operator[](uint32_t rawId) const { return es_[rawId]; }
49 
50 private:
52 
54 };
55 
57 #endif
ESCondObjectContainer< float > ESFloatCondObjectContainer
std::vector< Item > Items
size_t size() const
Definition: EcalContainer.h:84
const Item & item(size_t hashid) const
Definition: EcalContainer.h:34
const_iterator find(uint32_t rawId) const
Item & operator[](uint32_t rawId)
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:36
const Item & preshower(size_t hashedIndex) const
const Items & preshowerItems() const
void insert(std::pair< uint32_t, Item > const &a)
void setValue(const uint32_t id, const Item &item)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
const Items & items() const
Definition: EcalContainer.h:36
Definition: DetId.h:17
const_iterator end() const
Definition: EcalContainer.h:82
const_iterator end() const
#define COND_SERIALIZABLE
Definition: Serializable.h:39
std::vector< Item >::const_iterator const_iterator
void insert(std::pair< uint32_t, Item > const &a)
Definition: EcalContainer.h:32
const_iterator begin() const
Definition: EcalContainer.h:80
const_iterator begin() const
std::vector< Item >::iterator iterator
double a
Definition: hdecay.h:121
Item const & operator[](uint32_t rawId) const
const_iterator find(uint32_t rawId) const
Definition: EcalContainer.h:73
const self & getMap() const
long double T
EcalContainer< ESDetId, Item > es_