CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ESCondObjectContainer.h
Go to the documentation of this file.
1 #ifndef ES_COND_OBJECT_CONTAINER_HH
2 #define ES_COND_OBJECT_CONTAINER_HH
3 
7 
8 template < typename T >
10  public:
11  typedef T Item;
12  typedef Item value_type;
14  typedef typename std::vector<Item> Items;
15  typedef typename std::vector<Item>::const_iterator const_iterator;
16  typedef typename std::vector<Item>::iterator iterator;
17 
20 
21  inline
22  const Items & preshowerItems() const { return es_.items(); };
23 
24  inline
25  const Item & preshower( size_t hashedIndex ) const {
26  return es_.item(hashedIndex);
27  }
28 
29  inline
30  void insert( std::pair<uint32_t, Item> const &a ) {
31  if (DetId(a.first).subdetId() == EcalPreshower) {
32  es_.insert(a);
33  }
34  }
35 
36  inline
37  const_iterator find( uint32_t rawId ) const {
38  return es_.find(rawId);
39  }
40 
41  inline
43  return es_.begin();
44  }
45 
46  inline
47  const_iterator end() const {
48  return es_.end();
49  }
50 
51  inline
52  void setValue(const uint32_t id, const Item &item) {
53  (*this)[id] = item;
54  }
55 
56  inline
57  const self & getMap() const {
58  return *this;
59  }
60 
61  inline
62  size_t size() const {
63  return es_.size() ;
64  }
65  // add coherent operator++, not needed now -- FIXME
66 
67  inline
68  Item & operator[]( uint32_t rawId ) {
69  return es_[rawId];
70  }
71 
72  inline
73  Item const & operator[]( uint32_t rawId ) const {
74  return es_[rawId];
75  }
76 
77  private:
79 };
80 
82 #endif
const_iterator begin() const
Definition: EcalContainer.h:85
ESCondObjectContainer< float > ESFloatCondObjectContainer
const Item & item(size_t hashid) const
Definition: EcalContainer.h:36
std::vector< Item > Items
const Items & items() const
Definition: EcalContainer.h:40
const_iterator end() const
Definition: EcalContainer.h:89
const_iterator end() const
const self & getMap() const
EcalContainer< ESDetId, Item > es_
Item & operator[](uint32_t rawId)
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:42
const_iterator find(uint32_t rawId) const
Definition: EcalContainer.h:79
void insert(std::pair< uint32_t, Item > const &a)
void setValue(const uint32_t id, const Item &item)
const_iterator find(uint32_t rawId) const
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
const Item & preshower(size_t hashedIndex) const
Definition: DetId.h:18
std::vector< Item >::const_iterator const_iterator
void insert(std::pair< uint32_t, Item > const &a)
Definition: EcalContainer.h:32
std::vector< Item >::iterator iterator
double a
Definition: hdecay.h:121
const_iterator begin() const
size_t size() const
Definition: EcalContainer.h:93
Item const & operator[](uint32_t rawId) const
long double T
const Items & preshowerItems() const