CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
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
< T
self
 
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 Attributes

EcalContainer
< EcalTrigTowerDetId, Item
eb_
 
EcalContainer< EcalScDetId, Itemee_
 

Detailed Description

template<typename T>
class EcalCondTowerObjectContainer< T >

Definition at line 12 of file EcalCondTowerObjectContainer.h.

Member Typedef Documentation

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

Definition at line 18 of file EcalCondTowerObjectContainer.h.

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

Definition at line 14 of file EcalCondTowerObjectContainer.h.

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

Definition at line 17 of file EcalCondTowerObjectContainer.h.

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

Definition at line 19 of file EcalCondTowerObjectContainer.h.

Definition at line 16 of file EcalCondTowerObjectContainer.h.

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

Definition at line 15 of file EcalCondTowerObjectContainer.h.

Constructor & Destructor Documentation

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

Definition at line 21 of file EcalCondTowerObjectContainer.h.

21  {
22  size_t ebsize=(size_t)EcalTrigTowerDetId::kEBTowersPerSM*18*2;
23  eb_.checkAndResize(ebsize);
24  size_t eesize=(size_t)632;
25  ee_.checkAndResize(eesize);
26  };
EcalContainer< EcalTrigTowerDetId, Item > eb_
EcalContainer< EcalScDetId, Item > ee_
void checkAndResize()
Definition: EcalContainer.h:53
static const int kEBTowersPerSM
template<typename T>
EcalCondTowerObjectContainer< T >::~EcalCondTowerObjectContainer ( )
inline

Definition at line 27 of file EcalCondTowerObjectContainer.h.

27 {};

Member Function Documentation

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

Definition at line 36 of file EcalCondTowerObjectContainer.h.

Referenced by popcon::EcalDAQHandler::getNewObjects().

36  {
37  return eb_.item(hashedIndex);
38  }
const Item & item(size_t hashid) const
Definition: EcalContainer.h:36
EcalContainer< EcalTrigTowerDetId, Item > eb_
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:42
template<typename T>
const Items& EcalCondTowerObjectContainer< T >::barrelItems ( ) const
inline
template<typename T>
const_iterator EcalCondTowerObjectContainer< T >::begin ( void  ) const
inline

Definition at line 74 of file EcalCondTowerObjectContainer.h.

74  {
75  return eb_.begin();
76  }
const_iterator begin() const
Definition: EcalContainer.h:85
EcalContainer< EcalTrigTowerDetId, Item > eb_
template<typename T>
const_iterator EcalCondTowerObjectContainer< T >::end ( void  ) const
inline
template<typename T>
const Item& EcalCondTowerObjectContainer< T >::endcap ( size_t  hashedIndex) const
inline

Definition at line 41 of file EcalCondTowerObjectContainer.h.

Referenced by geometryXMLparser.CSCAlignable::index().

41  {
42  return ee_.item(hashedIndex);
43  }
const Item & item(size_t hashid) const
Definition: EcalContainer.h:36
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:42
EcalContainer< EcalScDetId, Item > ee_
template<typename T>
const Items& EcalCondTowerObjectContainer< T >::endcapItems ( ) const
inline
template<typename T>
const_iterator EcalCondTowerObjectContainer< T >::find ( uint32_t  rawId) const
inline

Definition at line 57 of file EcalCondTowerObjectContainer.h.

Referenced by BeautifulSoup.Tag::__getattr__(), EBDaqInfoTask::beginLuminosityBlock(), EBDcsInfoTask::beginLuminosityBlock(), EEDaqInfoTask::beginLuminosityBlock(), EEDcsInfoTask::beginLuminosityBlock(), EcalDQMStatusReader::beginRun(), EcalDAQTowerStatusXMLTranslator::dumpXML(), EcalDCSTowerStatusXMLTranslator::dumpXML(), ecaldqm::DQWorkerClient::fillQuality_(), BeautifulSoup.Tag::firstText(), popcon::EcalDAQHandler::getNewObjects(), popcon::EcalDCSHandler::insertHVDataSetToOffline(), popcon::EcalDCSHandler::insertLVDataSetToOffline(), Masks::maskChannel(), EcalDCSTowerStatusXMLTranslator::plot(), EcalDAQTowerStatusXMLTranslator::plot(), and EcalDQMStatusWriter::readEcalDQMTowerStatusFromFile().

57  {
58  DetId id(rawId);
59  if( id.subdetId() == EcalBarrel || id.subdetId() == EcalTriggerTower ) {
60  const_iterator it = eb_.find(rawId);
61  if ( it != eb_.end() ) {
62  return it;
63  } else {
64  return ee_.end();
65  }
66  } else if( id.subdetId() == EcalEndcap ) {
67  return ee_.find(rawId);
68  } else {
69  return ee_.end();
70  }
71  }
const_iterator end() const
Definition: EcalContainer.h:89
EcalContainer< EcalTrigTowerDetId, Item > eb_
const_iterator find(uint32_t rawId) const
Definition: EcalContainer.h:79
EcalContainer< EcalScDetId, Item > ee_
Definition: DetId.h:18
std::vector< Item >::const_iterator const_iterator
template<typename T>
const self& EcalCondTowerObjectContainer< T >::getMap ( ) const
inline

Definition at line 89 of file EcalCondTowerObjectContainer.h.

89  {
90  return *this;
91  }
template<typename T>
void EcalCondTowerObjectContainer< T >::insert ( std::pair< uint32_t, Item > const &  a)
inline

Definition at line 45 of file EcalCondTowerObjectContainer.h.

Referenced by BeautifulSoup.PageElement::_invert().

45  {
46  DetId id(a.first);
47  if( id.subdetId() == EcalBarrel || id.subdetId() == EcalTriggerTower ) {
48  eb_.insert(a);
49  } else if( id.subdetId() == EcalEndcap ) {
50  ee_.insert(a);
51  } else {
52 // std::cout <<"*** ERROR it is not barrel nor endcap tower"<< std::endl;
53  }
54  }
EcalContainer< EcalTrigTowerDetId, Item > eb_
EcalContainer< EcalScDetId, Item > ee_
Definition: DetId.h:18
void insert(std::pair< uint32_t, Item > const &a)
Definition: EcalContainer.h:32
double a
Definition: hdecay.h:121
template<typename T>
Item& EcalCondTowerObjectContainer< T >::operator[] ( uint32_t  rawId)
inline

Definition at line 100 of file EcalCondTowerObjectContainer.h.

102  {
103  DetId id(rawId);
104 
105  if( id.subdetId() == EcalBarrel || id.subdetId() == EcalTriggerTower ) {
106  return eb_[rawId];
107  } else if( id.subdetId() == EcalEndcap ) {
108  return ee_[rawId];
109  } else {
110  thread_local static Item dummy;
111  return dummy;
112  }
113  }
EcalContainer< EcalTrigTowerDetId, Item > eb_
EcalContainer< EcalScDetId, Item > ee_
Definition: DetId.h:18
template<typename T>
Item EcalCondTowerObjectContainer< T >::operator[] ( uint32_t  rawId) const
inline

Definition at line 119 of file EcalCondTowerObjectContainer.h.

119  {
120  DetId id(rawId);
121 
122  if( id.subdetId() == EcalBarrel || id.subdetId() == EcalTriggerTower ) {
123  return eb_[rawId];
124  } else if( id.subdetId() == EcalEndcap ) {
125  return ee_[rawId];
126  } else {
127  return Item();
128  }
129  }
EcalContainer< EcalTrigTowerDetId, Item > eb_
EcalContainer< EcalScDetId, Item > ee_
Definition: DetId.h:18
template<typename T>
void EcalCondTowerObjectContainer< T >::setValue ( const uint32_t  id,
const Item item 
)
inline
template<typename T>
size_t EcalCondTowerObjectContainer< T >::size ( void  ) const
inline

Definition at line 94 of file EcalCondTowerObjectContainer.h.

94  {
95  return eb_.size() + ee_.size();
96  }
EcalContainer< EcalTrigTowerDetId, Item > eb_
EcalContainer< EcalScDetId, Item > ee_
size_t size() const
Definition: EcalContainer.h:93

Member Data Documentation

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