CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
EcalCondTowerObjectContainer< T > Class Template Reference

#include <EcalCondTowerObjectContainer.h>

Public Types

typedef std::vector< Item >::const_iterator const_iterator
 
typedef T Item
 
typedef std::vector< ItemItems
 
typedef std::vector< Item >::iterator iterator
 
typedef EcalCondTowerObjectContainer< Tself
 
typedef Item value_type
 

Public Member Functions

const Itembarrel (size_t hashedIndex) const
 
const ItemsbarrelItems () const
 
const_iterator begin () const
 
 EcalCondTowerObjectContainer ()
 
const_iterator end () const
 
const Itemendcap (size_t hashedIndex) const
 
const ItemsendcapItems () const
 
const_iterator find (uint32_t rawId) const
 
const selfgetMap () const
 
void insert (std::pair< uint32_t, Item > const &a)
 
Itemoperator[] (uint32_t rawId)
 
Item operator[] (uint32_t rawId) const
 
void setValue (const uint32_t id, const Item &item)
 
size_t size () const
 
 ~EcalCondTowerObjectContainer ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

EcalContainer< EcalTrigTowerDetId, Itemeb_
 
EcalContainer< EcalScDetId, Itemee_
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

template<typename T>
class EcalCondTowerObjectContainer< T >

Definition at line 13 of file EcalCondTowerObjectContainer.h.

Member Typedef Documentation

◆ const_iterator

template<typename T >
typedef std::vector<Item>::const_iterator EcalCondTowerObjectContainer< T >::const_iterator

Definition at line 19 of file EcalCondTowerObjectContainer.h.

◆ Item

template<typename T >
typedef T EcalCondTowerObjectContainer< T >::Item

Definition at line 15 of file EcalCondTowerObjectContainer.h.

◆ Items

template<typename T >
typedef std::vector<Item> EcalCondTowerObjectContainer< T >::Items

Definition at line 18 of file EcalCondTowerObjectContainer.h.

◆ iterator

template<typename T >
typedef std::vector<Item>::iterator EcalCondTowerObjectContainer< T >::iterator

Definition at line 20 of file EcalCondTowerObjectContainer.h.

◆ self

Definition at line 17 of file EcalCondTowerObjectContainer.h.

◆ value_type

template<typename T >
typedef Item EcalCondTowerObjectContainer< T >::value_type

Definition at line 16 of file EcalCondTowerObjectContainer.h.

Constructor & Destructor Documentation

◆ EcalCondTowerObjectContainer()

template<typename T >
EcalCondTowerObjectContainer< T >::EcalCondTowerObjectContainer ( )
inline

Definition at line 22 of file EcalCondTowerObjectContainer.h.

References EcalContainer< DetId, T >::checkAndResize(), EcalCondTowerObjectContainer< T >::eb_, EcalCondTowerObjectContainer< T >::ee_, and EcalTrigTowerDetId::kEBTowersPerSM.

22  {
23  size_t ebsize = (size_t)EcalTrigTowerDetId::kEBTowersPerSM * 18 * 2;
24  eb_.checkAndResize(ebsize);
25  size_t eesize = (size_t)632;
26  ee_.checkAndResize(eesize);
27  };
EcalContainer< EcalScDetId, Item > ee_
void checkAndResize()
Definition: EcalContainer.h:47
EcalContainer< EcalTrigTowerDetId, Item > eb_
static const int kEBTowersPerSM

◆ ~EcalCondTowerObjectContainer()

template<typename T >
EcalCondTowerObjectContainer< T >::~EcalCondTowerObjectContainer ( )
inline

Definition at line 28 of file EcalCondTowerObjectContainer.h.

28 {};

Member Function Documentation

◆ barrel()

template<typename T >
const Item& EcalCondTowerObjectContainer< T >::barrel ( size_t  hashedIndex) const
inline

◆ barrelItems()

template<typename T >
const Items& EcalCondTowerObjectContainer< T >::barrelItems ( ) const
inline

Definition at line 30 of file EcalCondTowerObjectContainer.h.

References EcalCondTowerObjectContainer< T >::eb_, and EcalContainer< DetId, T >::items().

Referenced by ecaldqm::StatusManager::readFromObj().

30 { return eb_.items(); };
const Items & items() const
Definition: EcalContainer.h:36
EcalContainer< EcalTrigTowerDetId, Item > eb_

◆ begin()

template<typename T >
const_iterator EcalCondTowerObjectContainer< T >::begin ( void  ) const
inline

Definition at line 65 of file EcalCondTowerObjectContainer.h.

References EcalContainer< DetId, T >::begin(), and EcalCondTowerObjectContainer< T >::eb_.

65 { return eb_.begin(); }
const_iterator begin() const
Definition: EcalContainer.h:80
EcalContainer< EcalTrigTowerDetId, Item > eb_

◆ end()

template<typename T >
const_iterator EcalCondTowerObjectContainer< T >::end ( void  ) const
inline

◆ endcap()

template<typename T >
const Item& EcalCondTowerObjectContainer< T >::endcap ( size_t  hashedIndex) const
inline

◆ endcapItems()

template<typename T >
const Items& EcalCondTowerObjectContainer< T >::endcapItems ( ) const
inline

Definition at line 32 of file EcalCondTowerObjectContainer.h.

References EcalCondTowerObjectContainer< T >::ee_, and EcalContainer< DetId, T >::items().

Referenced by ecaldqm::StatusManager::readFromObj().

32 { return ee_.items(); };
EcalContainer< EcalScDetId, Item > ee_
const Items & items() const
Definition: EcalContainer.h:36

◆ find()

template<typename T >
const_iterator EcalCondTowerObjectContainer< T >::find ( uint32_t  rawId) const
inline

Definition at line 49 of file EcalCondTowerObjectContainer.h.

References EcalCondTowerObjectContainer< T >::eb_, EcalBarrel, EcalEndcap, EcalTriggerTower, EcalCondTowerObjectContainer< T >::ee_, EcalContainer< DetId, T >::end(), EcalContainer< DetId, T >::find(), and l1ctLayer2EG_cff::id.

Referenced by popcon::EcalDAQHandler::getNewObjects(), popcon::EcalDCSHandler::insertHVDataSetToOffline(), and popcon::EcalDCSHandler::insertLVDataSetToOffline().

49  {
50  DetId id(rawId);
51  if (id.subdetId() == EcalBarrel || id.subdetId() == EcalTriggerTower) {
52  const_iterator it = eb_.find(rawId);
53  if (it != eb_.end()) {
54  return it;
55  } else {
56  return ee_.end();
57  }
58  } else if (id.subdetId() == EcalEndcap) {
59  return ee_.find(rawId);
60  } else {
61  return ee_.end();
62  }
63  }
EcalContainer< EcalScDetId, Item > ee_
Definition: DetId.h:17
const_iterator end() const
Definition: EcalContainer.h:82
EcalContainer< EcalTrigTowerDetId, Item > eb_
std::vector< Item >::const_iterator const_iterator
const_iterator find(uint32_t rawId) const
Definition: EcalContainer.h:73

◆ getMap()

template<typename T >
const self& EcalCondTowerObjectContainer< T >::getMap ( ) const
inline

Definition at line 71 of file EcalCondTowerObjectContainer.h.

71 { return *this; }

◆ insert()

template<typename T >
void EcalCondTowerObjectContainer< T >::insert ( std::pair< uint32_t, Item > const &  a)
inline

Definition at line 38 of file EcalCondTowerObjectContainer.h.

References a, EcalCondTowerObjectContainer< T >::eb_, EcalBarrel, EcalEndcap, EcalTriggerTower, EcalCondTowerObjectContainer< T >::ee_, l1ctLayer2EG_cff::id, and EcalContainer< DetId, T >::insert().

Referenced by SequenceTypes.Schedule::_replaceIfHeldDirectly().

38  {
39  DetId id(a.first);
40  if (id.subdetId() == EcalBarrel || id.subdetId() == EcalTriggerTower) {
41  eb_.insert(a);
42  } else if (id.subdetId() == EcalEndcap) {
43  ee_.insert(a);
44  } else {
45  // std::cout <<"*** ERROR it is not barrel nor endcap tower"<< std::endl;
46  }
47  }
EcalContainer< EcalScDetId, Item > ee_
Definition: DetId.h:17
void insert(std::pair< uint32_t, Item > const &a)
Definition: EcalContainer.h:32
double a
Definition: hdecay.h:119
EcalContainer< EcalTrigTowerDetId, Item > eb_

◆ operator[]() [1/2]

template<typename T >
Item& EcalCondTowerObjectContainer< T >::operator[] ( uint32_t  rawId)
inline

Definition at line 76 of file EcalCondTowerObjectContainer.h.

References EcalCondTowerObjectContainer< T >::eb_, EcalBarrel, EcalTriggerTower, EcalCondTowerObjectContainer< T >::ee_, and l1ctLayer2EG_cff::id.

76  {
77  DetId id(rawId);
78  return ((id.subdetId() == EcalBarrel) | (id.subdetId() == EcalTriggerTower)) ? eb_[rawId] : ee_[rawId];
79  }
EcalContainer< EcalScDetId, Item > ee_
Definition: DetId.h:17
EcalContainer< EcalTrigTowerDetId, Item > eb_

◆ operator[]() [2/2]

template<typename T >
Item EcalCondTowerObjectContainer< T >::operator[] ( uint32_t  rawId) const
inline

Definition at line 81 of file EcalCondTowerObjectContainer.h.

References EcalCondTowerObjectContainer< T >::eb_, EcalBarrel, EcalEndcap, EcalTriggerTower, EcalCondTowerObjectContainer< T >::ee_, and l1ctLayer2EG_cff::id.

81  {
82  DetId id(rawId);
83 
84  if (id.subdetId() == EcalBarrel || id.subdetId() == EcalTriggerTower) {
85  return eb_[rawId];
86  } else if (id.subdetId() == EcalEndcap) {
87  return ee_[rawId];
88  } else {
89  return Item();
90  }
91  }
EcalContainer< EcalScDetId, Item > ee_
Definition: DetId.h:17
EcalContainer< EcalTrigTowerDetId, Item > eb_

◆ serialize()

template<typename T >
template<class Archive >
void EcalCondTowerObjectContainer< T >::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ setValue()

template<typename T >
void EcalCondTowerObjectContainer< T >::setValue ( const uint32_t  id,
const Item item 
)
inline

◆ size()

template<typename T >
size_t EcalCondTowerObjectContainer< T >::size ( void  ) const
inline

Friends And Related Function Documentation

◆ boost::serialization::access

template<typename T >
friend class boost::serialization::access
friend

Definition at line 97 of file EcalCondTowerObjectContainer.h.

◆ cond::serialization::access

template<typename T >
template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 97 of file EcalCondTowerObjectContainer.h.

Member Data Documentation

◆ eb_

template<typename T >
EcalContainer<EcalTrigTowerDetId, Item> EcalCondTowerObjectContainer< T >::eb_
private

◆ ee_

template<typename T >
EcalContainer<EcalScDetId, Item> EcalCondTowerObjectContainer< T >::ee_
private