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
EcalContainer::end
const_iterator end() const
Definition: EcalContainer.h:82
EcalContainer::items
const Items & items() const
Definition: EcalContainer.h:36
EcalContainer::item
const Item & item(size_t hashid) const
Definition: EcalContainer.h:34
ESCondObjectContainer::end
const_iterator end() const
Definition: ESCondObjectContainer.h:37
EcalContainer< ESDetId, Item >
ESCondObjectContainer::Items
std::vector< Item > Items
Definition: ESCondObjectContainer.h:16
ESCondObjectContainer::find
const_iterator find(uint32_t rawId) const
Definition: ESCondObjectContainer.h:33
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
ESDetId.h
EcalContainer.h
DetId
Definition: DetId.h:17
ESCondObjectContainer::preshowerItems
const Items & preshowerItems() const
Definition: ESCondObjectContainer.h:23
ESFloatCondObjectContainer
ESCondObjectContainer< float > ESFloatCondObjectContainer
Definition: ESCondObjectContainer.h:56
ESCondObjectContainer::insert
void insert(std::pair< uint32_t, Item > const &a)
Definition: ESCondObjectContainer.h:27
ESCondObjectContainer::const_iterator
std::vector< Item >::const_iterator const_iterator
Definition: ESCondObjectContainer.h:17
ESStripGroupId
Definition: ESStripGroupId.h:6
ESCondObjectContainer::size
size_t size() const
Definition: ESCondObjectContainer.h:43
ESCondObjectContainer::begin
const_iterator begin() const
Definition: ESCondObjectContainer.h:35
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
a
double a
Definition: hdecay.h:119
ESCondObjectContainer::preshower
const Item & preshower(size_t hashedIndex) const
Definition: ESCondObjectContainer.h:25
Serializable.h
EcalContainer::find
const_iterator find(uint32_t rawId) const
Definition: EcalContainer.h:73
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
ESCondObjectContainer
Definition: ESCondObjectContainer.h:11
EcalPreshower
Definition: EcalSubdetector.h:10
ESCondObjectContainer::ESCondObjectContainer
ESCondObjectContainer()
Definition: ESCondObjectContainer.h:20
ESCondObjectContainer::~ESCondObjectContainer
~ESCondObjectContainer()
Definition: ESCondObjectContainer.h:21
ESCondObjectContainer::getMap
const self & getMap() const
Definition: ESCondObjectContainer.h:41
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
T
long double T
Definition: Basic3DVectorLD.h:48
ESCondObjectContainer::operator[]
const Item & operator[](uint32_t rawId) const
Definition: ESCondObjectContainer.h:48
Exception.h
ESCondObjectContainer::es_
EcalContainer< ESDetId, Item > es_
Definition: ESCondObjectContainer.h:51
ESCondObjectContainer::operator[]
Item & operator[](uint32_t rawId)
Definition: ESCondObjectContainer.h:46
ESCondObjectContainer::Item
T Item
Definition: ESCondObjectContainer.h:13
ESCondObjectContainer::value_type
Item value_type
Definition: ESCondObjectContainer.h:14
EcalContainer::insert
void insert(std::pair< uint32_t, Item > const &a)
Definition: EcalContainer.h:32
EcalContainer::begin
const_iterator begin() const
Definition: EcalContainer.h:80
ESCondObjectContainer::iterator
std::vector< Item >::iterator iterator
Definition: ESCondObjectContainer.h:18
ecalpyutils::hashedIndex
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:38
EcalContainer::size
size_t size() const
Definition: EcalContainer.h:84
ESCondObjectContainer::setValue
void setValue(const uint32_t id, const Item &item)
Definition: ESCondObjectContainer.h:39