test
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 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
< 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 Member Functions

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

Private Attributes

EcalContainer
< EcalTrigTowerDetId, Item
eb_
 
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 14 of file EcalCondTowerObjectContainer.h.

Member Typedef Documentation

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

Definition at line 20 of file EcalCondTowerObjectContainer.h.

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

Definition at line 16 of file EcalCondTowerObjectContainer.h.

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

Definition at line 19 of file EcalCondTowerObjectContainer.h.

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

Definition at line 21 of file EcalCondTowerObjectContainer.h.

Definition at line 18 of file EcalCondTowerObjectContainer.h.

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

Definition at line 17 of file EcalCondTowerObjectContainer.h.

Constructor & Destructor Documentation

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

Definition at line 23 of file EcalCondTowerObjectContainer.h.

23  {
24  size_t ebsize=(size_t)EcalTrigTowerDetId::kEBTowersPerSM*18*2;
25  eb_.checkAndResize(ebsize);
26  size_t eesize=(size_t)632;
27  ee_.checkAndResize(eesize);
28  };
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 29 of file EcalCondTowerObjectContainer.h.

29 {};

Member Function Documentation

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

Definition at line 38 of file EcalCondTowerObjectContainer.h.

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

38  {
39  return eb_.item(hashedIndex);
40  }
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 76 of file EcalCondTowerObjectContainer.h.

76  {
77  return eb_.begin();
78  }
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 43 of file EcalCondTowerObjectContainer.h.

Referenced by geometryXMLparser.CSCAlignable::index().

43  {
44  return ee_.item(hashedIndex);
45  }
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 59 of file EcalCondTowerObjectContainer.h.

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

59  {
60  DetId id(rawId);
61  if( id.subdetId() == EcalBarrel || id.subdetId() == EcalTriggerTower ) {
62  const_iterator it = eb_.find(rawId);
63  if ( it != eb_.end() ) {
64  return it;
65  } else {
66  return ee_.end();
67  }
68  } else if( id.subdetId() == EcalEndcap ) {
69  return ee_.find(rawId);
70  } else {
71  return ee_.end();
72  }
73  }
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 91 of file EcalCondTowerObjectContainer.h.

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

Definition at line 47 of file EcalCondTowerObjectContainer.h.

Referenced by BeautifulSoup.PageElement::_invert().

47  {
48  DetId id(a.first);
49  if( id.subdetId() == EcalBarrel || id.subdetId() == EcalTriggerTower ) {
50  eb_.insert(a);
51  } else if( id.subdetId() == EcalEndcap ) {
52  ee_.insert(a);
53  } else {
54 // std::cout <<"*** ERROR it is not barrel nor endcap tower"<< std::endl;
55  }
56  }
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 102 of file EcalCondTowerObjectContainer.h.

103  {
104  DetId id(rawId);
105  return ( (id.subdetId() == EcalBarrel) | (id.subdetId() == EcalTriggerTower) ) ?
106  eb_[rawId] :
107  ee_[rawId];
108  }
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 111 of file EcalCondTowerObjectContainer.h.

111  {
112  DetId id(rawId);
113 
114  if( id.subdetId() == EcalBarrel || id.subdetId() == EcalTriggerTower ) {
115  return eb_[rawId];
116  } else if( id.subdetId() == EcalEndcap ) {
117  return ee_[rawId];
118  } else {
119  return Item();
120  }
121  }
EcalContainer< EcalTrigTowerDetId, Item > eb_
EcalContainer< EcalScDetId, Item > ee_
Definition: DetId.h:18
template<typename T>
template<class Archive >
void EcalCondTowerObjectContainer< T >::serialize ( Archive &  ar,
const unsigned int  version 
)
private
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 96 of file EcalCondTowerObjectContainer.h.

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

Friends And Related Function Documentation

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

Definition at line 127 of file EcalCondTowerObjectContainer.h.

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

Definition at line 127 of file EcalCondTowerObjectContainer.h.

Member Data Documentation

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