CMS 3D CMS Logo

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

#include <EcalCondObjectContainer.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 EcalCondObjectContainer< Tself
 
typedef Item value_type
 

Public Member Functions

const Itembarrel (size_t hashedIndex) const
 
const ItemsbarrelItems () const
 
const_iterator begin () const
 
void clear ()
 
 EcalCondObjectContainer ()
 
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
 
void summary (float &arg_mean_x_EB, float &arg_rms_EB, int &arg_num_x_EB, float &arg_mean_x_EE, float &arg_rms_EE, int &arg_num_x_EE) const
 
 ~EcalCondObjectContainer ()
 

Private Member Functions

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

Private Attributes

EcalContainer< EBDetId, Itemeb_
 
EcalContainer< EEDetId, Itemee_
 

Friends

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

Detailed Description

template<typename T>
class EcalCondObjectContainer< T >

Definition at line 11 of file EcalCondObjectContainer.h.

Member Typedef Documentation

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

Definition at line 17 of file EcalCondObjectContainer.h.

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

Definition at line 13 of file EcalCondObjectContainer.h.

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

Definition at line 16 of file EcalCondObjectContainer.h.

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

Definition at line 18 of file EcalCondObjectContainer.h.

template<typename T>
typedef EcalCondObjectContainer<T> EcalCondObjectContainer< T >::self

Definition at line 15 of file EcalCondObjectContainer.h.

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

Definition at line 14 of file EcalCondObjectContainer.h.

Constructor & Destructor Documentation

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

Definition at line 20 of file EcalCondObjectContainer.h.

20 {};
template<typename T>
EcalCondObjectContainer< T >::~EcalCondObjectContainer ( )
inline

Definition at line 21 of file EcalCondObjectContainer.h.

21 {};

Member Function Documentation

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

Definition at line 32 of file EcalCondObjectContainer.h.

Referenced by popcon::EcalLaserHandler::checkAPDPNs(), popcon::EcalPedestalsHandler::getNewObjectsP5(), and popcon::EcalPedestalsHandler::readPedestal2017().

32  {
33  return eb_.item(hashedIndex);
34  }
const Item & item(size_t hashid) const
Definition: EcalContainer.h:34
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:42
EcalContainer< EBDetId, Item > eb_
template<typename T>
const Items& EcalCondObjectContainer< T >::barrelItems ( ) const
inline
template<typename T>
const_iterator EcalCondObjectContainer< T >::begin ( void  ) const
inline

Definition at line 84 of file EcalCondObjectContainer.h.

Referenced by EcalTPGParamBuilder::analyze().

84  {
85  return eb_.begin();
86  }
const_iterator begin() const
Definition: EcalContainer.h:80
EcalContainer< EBDetId, Item > eb_
template<typename T>
void EcalCondObjectContainer< T >::clear ( void  )
inline
template<typename T>
const_iterator EcalCondObjectContainer< T >::end ( void  ) const
inline

Definition at line 88 of file EcalCondObjectContainer.h.

Referenced by EcalTrivialObjectAnalyzer::analyze(), EcalBarrelRecHitsValidation::analyze(), EcalEndcapRecHitsValidation::analyze(), EcalRecHitsValidation::analyze(), EcalTPGParamBuilder::analyze(), EcalClusterLazyToolsBase::BasicClusterTime(), EcalBoundaryInfoCalculator< EcalDetId >::boundaryRecHits(), EcalBoundaryInfoCalculator< EBDetId >::checkRecHitHasDeadNeighbour(), Types.LuminosityBlockRange::cppID(), Types.EventRange::cppID(), EcalTools::deadNeighbour(), EcalPulseShapesXMLTranslator::dumpXML(), EcalPulseSymmCovariancesXMLTranslator::dumpXML(), EcalPedestalsXMLTranslator::dumpXML(), EcalGainRatiosXMLTranslator::dumpXML(), EcalFloatCondObjectContainerXMLTranslator::dumpXML(), Pi0FixedMassWindowCalibration::duringLoop(), fillEBMap_DiffIOV(), fillEBMap_SingleIOV(), fillEEMap_DiffIOV(), fillEEMap_SingleIOV(), EcalMIPRecHitFilter::filter(), EcalDeadCellBoundaryEnergyFilter::filter(), EcalCoder::findIntercalibConstant(), EcalMixingModuleValidation::findPedestal(), EcalBoundaryInfoCalculator< EcalDetId >::gapRecHits(), DCCDataUnpacker::getChannelStatus(), EcalTPGParamBuilder::getCoeff(), EcalTrivialConditionRetriever::getIntercalibConstantsFromConfiguration(), EcalLaserDbService::getLaserCorrection(), edm::DataMixingEMDigiWorker::GetPedestals(), EcalDccWeightBuilder::intercalib(), ECALpedestalPCLHarvester::isGood(), EcalTools::isNextToDead(), PFRecoTauDiscriminationAgainstElectronDeadECAL::loopXtals(), EcalRecalibRecHitProducer::produce(), EcalTBWeightUncalibRecHitProducer::produce(), EcalTPSkimmer::produce(), EcalRecHitProducer::produce(), EcalDetIdToBeRecoveredProducer::produce(), EcalRecHitRecalib::produce(), EcalRecHitWorkerSimple::run(), EcalUncalibRecHitWorkerFixedAlphaBetaFit::run(), EcalUncalibRecHitWorkerAnalFit::run(), EcalSignalGenerator< EBDigitizerTraits >::samplesInPE(), EcalSignalGenerator< EEDigitizerTraits >::samplesInPE(), and EcalFenixLinearizer::setParameters().

88  {
89  return ee_.end();
90  }
const_iterator end() const
Definition: EcalContainer.h:82
EcalContainer< EEDetId, Item > ee_
template<typename T>
const Item& EcalCondObjectContainer< T >::endcap ( size_t  hashedIndex) const
inline
template<typename T>
const Items& EcalCondObjectContainer< T >::endcapItems ( ) const
inline
template<typename T>
const_iterator EcalCondObjectContainer< T >::find ( uint32_t  rawId) const
inline

Definition at line 59 of file EcalCondObjectContainer.h.

Referenced by BeautifulSoup.Tag::__getattr__(), EcalTrivialObjectAnalyzer::analyze(), EcalPFRecHitThresholdsMaker::analyze(), EcalBarrelRecHitsValidation::analyze(), EcalEndcapRecHitsValidation::analyze(), EcalRecHitsValidation::analyze(), EcalTPGParamBuilder::analyze(), EcalClusterLazyToolsBase::BasicClusterTime(), ECALpedestalPCLworker::bookHistograms(), EcalBoundaryInfoCalculator< EcalDetId >::boundaryRecHits(), EcalBoundaryInfoCalculator< EBDetId >::checkRecHitHasDeadNeighbour(), ECALpedestalPCLHarvester::checkStatusCode(), ECALpedestalPCLHarvester::checkVariation(), EcalTools::deadNeighbour(), ECALpedestalPCLHarvester::dqmEndJob(), EcalPedestalsXMLTranslator::dumpXML(), EcalPulseShapesXMLTranslator::dumpXML(), EcalPulseSymmCovariancesXMLTranslator::dumpXML(), EcalGainRatiosXMLTranslator::dumpXML(), EcalFloatCondObjectContainerXMLTranslator::dumpXML(), Pi0FixedMassWindowCalibration::duringLoop(), ZeeCalibration::duringLoop(), fillEBMap_DiffIOV(), fillEBMap_SingleIOV(), fillEEMap_DiffIOV(), fillEEMap_SingleIOV(), EcalMIPRecHitFilter::filter(), EcalDeadCellBoundaryEnergyFilter::filter(), EcalCoder::findGains(), EcalCoder::findIntercalibConstant(), EcalCoder::findPedestal(), EcalMixingModuleValidation::findPedestal(), BeautifulSoup.Tag::firstText(), EcalBoundaryInfoCalculator< EcalDetId >::gapRecHits(), DCCDataUnpacker::getChannelStatus(), EcalTPGParamBuilder::getCoeff(), EcalTrivialConditionRetriever::getIntercalibConstantsFromConfiguration(), EcalLaserDbService::getLaserCorrection(), edm::DataMixingEMDigiWorker::GetPedestals(), EcalDccWeightBuilder::intercalib(), ECALpedestalPCLHarvester::isGood(), EcalTools::isNextToDead(), PFRecoTauDiscriminationAgainstElectronDeadECAL::loopXtals(), CaloMiscalibMapEcal::print(), EcalRecalibRecHitProducer::produce(), EcalTBWeightUncalibRecHitProducer::produce(), EcalTPSkimmer::produce(), EcalRecHitProducer::produce(), EcalDetIdToBeRecoveredProducer::produce(), EcalRecHitRecalib::produce(), pat::PATIsolatedTrackProducer::produce(), EcalRecHitWorkerSimple::run(), EcalUncalibRecHitWorkerFixedAlphaBetaFit::run(), EcalUncalibRecHitWorkerAnalFit::run(), EcalSignalGenerator< EEDigitizerTraits >::samplesInPE(), EcalSignalGenerator< EBDigitizerTraits >::samplesInPE(), EcalFenixLinearizer::setParameters(), and EcalSeverityLevelAlgo::severityLevel().

59  {
60  DetId id(rawId);
61  switch (id.subdetId()) {
62  case EcalBarrel :
63  {
64  const_iterator it = eb_.find(rawId);
65  if ( it != eb_.end() ) {
66  return it;
67  } else {
68  return ee_.end();
69  }
70  }
71  break;
72  case EcalEndcap :
73  {
74  return ee_.find(rawId);
75  }
76  break;
77  default:
78  // FIXME (add throw)
79  return ee_.end();
80  }
81  return ee_.end();
82  }
const_iterator end() const
Definition: EcalContainer.h:82
EcalContainer< EBDetId, Item > eb_
const_iterator find(uint32_t rawId) const
Definition: EcalContainer.h:73
Definition: DetId.h:18
std::vector< Item >::const_iterator const_iterator
EcalContainer< EEDetId, Item > ee_
template<typename T>
const self& EcalCondObjectContainer< T >::getMap ( ) const
inline
template<typename T>
void EcalCondObjectContainer< T >::insert ( std::pair< uint32_t, Item > const &  a)
inline

Definition at line 40 of file EcalCondObjectContainer.h.

Referenced by EcalPFRecHitThresholdsMaker::analyze(), EcalTPGParamBuilder::analyze(), BeautifulSoup.PageElement::append(), EcalTestDevDB::generateEcalPedestals(), popcon::EcalPulseShapesHandler::getNewObjects(), popcon::EcalPulseSymmCovariancesHandler::getNewObjects(), popcon::EcalLaser_weekly_Linearization::getNewObjects(), popcon::EcalTPGPedfromFile::getNewObjects(), popcon::EcalTPGLinPed::getNewObjects(), popcon::EcalTPGLinConstHandler::getNewObjects(), popcon::EcalTPGPedestalsHandler::getNewObjects(), popcon::EcalPedestalsHandler::getNewObjectsH2(), popcon::EcalPedestalsHandler::getNewObjectsP5(), popcon::EcalPedestalsHandler::readPedestal2017(), popcon::EcalPedestalsHandler::readPedestalFile(), popcon::EcalPedestalsHandler::readPedestalMC(), popcon::EcalPedestalsHandler::readPedestalTimestamp(), and popcon::EcalPedestalsHandler::readPedestalTree().

40  {
41  DetId id(a.first);
42  switch (id.subdetId()) {
43  case EcalBarrel :
44  {
45  eb_.insert(a);
46  }
47  break;
48  case EcalEndcap :
49  {
50  ee_.insert(a);
51  }
52  break;
53  default:
54  // FIXME (add throw)
55  return;
56  }
57  }
EcalContainer< EBDetId, Item > eb_
Definition: DetId.h:18
void insert(std::pair< uint32_t, Item > const &a)
Definition: EcalContainer.h:32
double a
Definition: hdecay.h:121
EcalContainer< EEDetId, Item > ee_
template<typename T>
Item& EcalCondObjectContainer< T >::operator[] ( uint32_t  rawId)
inline

Definition at line 105 of file EcalCondObjectContainer.h.

106  {
107  DetId id(rawId);
108  return (id.subdetId()==EcalBarrel) ? eb_[rawId] : ee_[rawId];
109 
110  }
EcalContainer< EBDetId, Item > eb_
Definition: DetId.h:18
EcalContainer< EEDetId, Item > ee_
template<typename T>
Item EcalCondObjectContainer< T >::operator[] ( uint32_t  rawId) const
inline

Definition at line 112 of file EcalCondObjectContainer.h.

112  {
113  DetId id(rawId);
114  switch (id.subdetId()) {
115  case EcalBarrel :
116  {
117  return eb_[rawId];
118  }
119  break;
120  case EcalEndcap :
121  {
122  return ee_[rawId];
123  }
124  break;
125  default:
126  // FIXME (add throw)
127  // sizeof(Item) <= sizeof(int64_t) for all Items.
128  return Item();
129  }
130  }
EcalContainer< EBDetId, Item > eb_
Definition: DetId.h:18
EcalContainer< EEDetId, Item > ee_
template<typename T>
template<class Archive >
void EcalCondObjectContainer< T >::serialize ( Archive &  ar,
const unsigned int  version 
)
private
template<typename T>
void EcalCondObjectContainer< T >::setValue ( const uint32_t  id,
const Item item 
)
inline
template<typename T>
size_t EcalCondObjectContainer< T >::size ( void  ) const
inline
template<typename T>
void EcalCondObjectContainer< T >::summary ( float &  arg_mean_x_EB,
float &  arg_rms_EB,
int &  arg_num_x_EB,
float &  arg_mean_x_EE,
float &  arg_rms_EE,
int &  arg_num_x_EE 
) const
inline

calculate mean and sigma

Definition at line 132 of file EcalCondObjectContainer.h.

133  {
134 
135  //std::stringstream ss;
136 
137  const int kSides = 2;
138  const int kBarlRings = EBDetId::MAX_IETA;
139  const int kBarlWedges = EBDetId::MAX_IPHI;
140  const int kEndcWedgesX = EEDetId::IX_MAX;
141  const int kEndcWedgesY = EEDetId::IY_MAX;
142 
144 
145  float mean_x_EB=0;
146  float mean_xx_EB=0;
147  int num_x_EB=0;
148 
149  float mean_x_EE=0;
150  float mean_xx_EE=0;
151  int num_x_EE=0;
152 
153 
154  for (int sign=0; sign<kSides; sign++) {
155 
156  int thesign = sign==1 ? 1:-1;
157 
158  for (int ieta=0; ieta<kBarlRings; ieta++) {
159  for (int iphi=0; iphi<kBarlWedges; iphi++) {
160  EBDetId id((ieta+1)*thesign, iphi+1);
161 
162  //float x= object()[id.rawId()];
163  float x= eb_[id.rawId()];
164  num_x_EB++;
165  mean_x_EB=mean_x_EB+x;
166  mean_xx_EB=mean_xx_EB+x*x;
167  }
168  }
169 
170  for (int ix=0; ix<kEndcWedgesX; ix++) {
171  for (int iy=0; iy<kEndcWedgesY; iy++) {
172  if (! EEDetId::validDetId(ix+1,iy+1,thesign))
173  continue;
174 
175  EEDetId id(ix+1,iy+1,thesign);
176  //float x=object()[id.rawId()];
177  float x=ee_[id.rawId()];
178  num_x_EE++;
179  mean_x_EE=mean_x_EE+x;
180  mean_xx_EE=mean_xx_EE+x*x;
181 
182  }//iy
183  }//ix
184 
185 
186  }
187 
188  mean_x_EB=mean_x_EB/num_x_EB;
189  mean_x_EE=mean_x_EE/num_x_EE;
190  mean_xx_EB=mean_xx_EB/num_x_EB;
191  mean_xx_EE=mean_xx_EE/num_x_EE;
192  float rms_EB=(mean_xx_EB-mean_x_EB*mean_x_EB);
193  float rms_EE=(mean_xx_EE-mean_x_EE*mean_x_EE);
194 
195 
196  arg_mean_x_EB = mean_x_EB;
197  arg_rms_EB = rms_EB;
198  arg_num_x_EB = num_x_EB;
199 
200 
201  arg_mean_x_EE = mean_x_EE;
202  arg_rms_EE = rms_EE;
203  arg_num_x_EE = num_x_EE;
204 
205  //ss << "ECAL BARREL Mean: "<< mean_x_EB <<" RMS: "<< rms_EB << " Nchan: "<< num_x_EB<< std::endl
206  // << "ECAL Endcap Mean: "<< mean_x_EE <<" RMS: "<< rms_EE << " Nchan: "<< num_x_EE<< std::endl ;
207 
208 
209  //return ss.str();
210  }
static const int kBarlRings
static const int kSides
static const int kBarlWedges
static const int kEndcWedgesX
EcalContainer< EBDetId, Item > eb_
static const int IX_MAX
Definition: EEDetId.h:298
static const int MAX_IPHI
Definition: EBDetId.h:137
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:136
EcalContainer< EEDetId, Item > ee_
static const int IY_MAX
Definition: EEDetId.h:302
static const int kEndcWedgesY

Friends And Related Function Documentation

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

Definition at line 217 of file EcalCondObjectContainer.h.

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

Definition at line 217 of file EcalCondObjectContainer.h.

Member Data Documentation

template<typename T>
EcalContainer< EBDetId, Item > EcalCondObjectContainer< T >::eb_
private
template<typename T>
EcalContainer< EEDetId, Item > EcalCondObjectContainer< T >::ee_
private