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 const & 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.

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

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.

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

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.

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

74  {
75  return eb_.begin();
76  }
const_iterator begin() const
Definition: EcalContainer.h:86
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.

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

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.

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

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:90
EcalContainer< EcalTrigTowerDetId, Item > eb_
const_iterator find(uint32_t rawId) const
Definition: EcalContainer.h:80
EcalContainer< EcalScDetId, Item > ee_
Definition: DetId.h:20
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.

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

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:20
void insert(std::pair< uint32_t, Item > const &a)
Definition: EcalContainer.h:32
double a
Definition: hdecay.h:121
tuple cout
Definition: gather_cfg.py:121
template<typename T >
Item& EcalCondTowerObjectContainer< T >::operator[] ( uint32_t  rawId)
inline

Definition at line 100 of file EcalCondTowerObjectContainer.h.

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

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

Definition at line 114 of file EcalCondTowerObjectContainer.h.

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

114  {
115  DetId id(rawId);
116  static Item dummy;
117 
118  if( id.subdetId() == EcalBarrel || id.subdetId() == EcalTriggerTower ) {
119  return eb_[rawId];
120  } else if( id.subdetId() == EcalEndcap ) {
121  return ee_[rawId];
122  } else {
123  return dummy;
124  }
125  }
EcalContainer< EcalTrigTowerDetId, Item > eb_
EcalContainer< EcalScDetId, Item > ee_
Definition: DetId.h:20
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.

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

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

Member Data Documentation

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