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
 
 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 27 of file EcalCondObjectContainer.h.

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

27  {
28  return eb_.item(hashedIndex);
29  }
const Item & item(size_t hashid) const
Definition: EcalContainer.h:36
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 79 of file EcalCondObjectContainer.h.

Referenced by EcalTPGParamBuilder::analyze().

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

Definition at line 83 of file EcalCondObjectContainer.h.

Referenced by EcalTrivialObjectAnalyzer::analyze(), EcalBarrelRecHitsValidation::analyze(), EcalEndcapRecHitsValidation::analyze(), EcalRecHitsValidation::analyze(), EcalTPGParamBuilder::analyze(), EcalClusterLazyToolsBase::BasicClusterTime(), AntiElectronDeadECAL::beginEvent(), 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(), 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().

83  {
84  return ee_.end();
85  }
const_iterator end() const
Definition: EcalContainer.h:89
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 54 of file EcalCondObjectContainer.h.

Referenced by BeautifulSoup.Tag::__getattr__(), EcalTrivialObjectAnalyzer::analyze(), EcalPFRecHitThresholdsMaker::analyze(), EcalBarrelRecHitsValidation::analyze(), EcalEndcapRecHitsValidation::analyze(), EcalRecHitsValidation::analyze(), EcalClusterLazyToolsBase::BasicClusterTime(), AntiElectronDeadECAL::beginEvent(), 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(), 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().

54  {
55  DetId id(rawId);
56  switch (id.subdetId()) {
57  case EcalBarrel :
58  {
59  const_iterator it = eb_.find(rawId);
60  if ( it != eb_.end() ) {
61  return it;
62  } else {
63  return ee_.end();
64  }
65  }
66  break;
67  case EcalEndcap :
68  {
69  return ee_.find(rawId);
70  }
71  break;
72  default:
73  // FIXME (add throw)
74  return ee_.end();
75  }
76  return ee_.end();
77  }
const_iterator end() const
Definition: EcalContainer.h:89
EcalContainer< EBDetId, Item > eb_
const_iterator find(uint32_t rawId) const
Definition: EcalContainer.h:79
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 35 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::readPedestalTimestamp(), and popcon::EcalPedestalsHandler::readPedestalTree().

35  {
36  DetId id(a.first);
37  switch (id.subdetId()) {
38  case EcalBarrel :
39  {
40  eb_.insert(a);
41  }
42  break;
43  case EcalEndcap :
44  {
45  ee_.insert(a);
46  }
47  break;
48  default:
49  // FIXME (add throw)
50  return;
51  }
52  }
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 100 of file EcalCondObjectContainer.h.

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

107  {
108  DetId id(rawId);
109  switch (id.subdetId()) {
110  case EcalBarrel :
111  {
112  return eb_[rawId];
113  }
114  break;
115  case EcalEndcap :
116  {
117  return ee_[rawId];
118  }
119  break;
120  default:
121  // FIXME (add throw)
122  // sizeof(Item) <= sizeof(int64_t) for all Items.
123  return Item();
124  }
125  }
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 127 of file EcalCondObjectContainer.h.

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

Friends And Related Function Documentation

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

Definition at line 212 of file EcalCondObjectContainer.h.

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

Definition at line 212 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