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.

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  };

References EcalContainer< DetId, T >::checkAndResize(), EcalCondTowerObjectContainer< T >::eb_, EcalCondTowerObjectContainer< T >::ee_, and EcalTrigTowerDetId::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

◆ begin()

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

◆ 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

◆ find()

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

Definition at line 49 of file EcalCondTowerObjectContainer.h.

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  }

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

Referenced by BeautifulSoup.Tag::__getattr__(), BeautifulSoup.Tag::firstText(), popcon::EcalDAQHandler::getNewObjects(), popcon::EcalDCSHandler::insertHVDataSetToOffline(), and popcon::EcalDCSHandler::insertLVDataSetToOffline().

◆ 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.

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  }

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

Referenced by BeautifulSoup.PageElement::append().

◆ operator[]() [1/2]

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

Definition at line 76 of file EcalCondTowerObjectContainer.h.

76  {
77  DetId id(rawId);
78  return ((id.subdetId() == EcalBarrel) | (id.subdetId() == EcalTriggerTower)) ? eb_[rawId] : ee_[rawId];
79  }

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

◆ operator[]() [2/2]

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

Definition at line 81 of file EcalCondTowerObjectContainer.h.

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  }

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

◆ 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
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
EcalCondTowerObjectContainer::eb_
EcalContainer< EcalTrigTowerDetId, Item > eb_
Definition: EcalCondTowerObjectContainer.h:94
EcalContainer::checkAndResize
void checkAndResize()
Definition: EcalContainer.h:47
EcalBarrel
Definition: EcalSubdetector.h:10
DetId
Definition: DetId.h:17
EcalCondTowerObjectContainer::const_iterator
std::vector< Item >::const_iterator const_iterator
Definition: EcalCondTowerObjectContainer.h:19
EcalEndcap
Definition: EcalSubdetector.h:10
a
double a
Definition: hdecay.h:119
EcalCondTowerObjectContainer::Item
T Item
Definition: EcalCondTowerObjectContainer.h:15
EcalContainer::find
const_iterator find(uint32_t rawId) const
Definition: EcalContainer.h:73
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
EcalTrigTowerDetId::kEBTowersPerSM
static const int kEBTowersPerSM
Definition: EcalTrigTowerDetId.h:101
EcalTriggerTower
Definition: EcalSubdetector.h:10
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
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
ecalpyutils::hashedIndex
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:38
EcalContainer::size
size_t size() const
Definition: EcalContainer.h:84
EcalCondTowerObjectContainer::ee_
EcalContainer< EcalScDetId, Item > ee_
Definition: EcalCondTowerObjectContainer.h:95