CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Protected Attributes
ecaldqm::MESet::ConstBin Struct Reference

#include <MESet.h>

Inheritance diagram for ecaldqm::MESet::ConstBin:
ecaldqm::MESet::Bin

Public Member Functions

 ConstBin ()
 
 ConstBin (ConstBin const &_orig)
 
 ConstBin (MESet const &, unsigned=0, int=1)
 
double getBinContent () const
 
double getBinEntries () const
 
double getBinError () const
 
uint32_t getId () const
 
const MonitorElementgetME () const
 
const MESetgetMESet () const
 
bool isChannel (EcalElectronicsMapping const *electronicsMap) const
 
ConstBinoperator= (ConstBin const &)
 
bool operator== (ConstBin const &_rhs) const
 
void setMESet (MESet const &_meSet)
 

Public Attributes

int iBin
 
unsigned iME
 
binning::ObjectType otype
 

Protected Attributes

const MESetmeSet_
 

Detailed Description

Definition at line 164 of file MESet.h.

Constructor & Destructor Documentation

◆ ConstBin() [1/3]

ecaldqm::MESet::ConstBin::ConstBin ( )
inline

Definition at line 173 of file MESet.h.

173 : meSet_(nullptr), iME(-1), iBin(-1), otype(binning::nObjType) {}

◆ ConstBin() [2/3]

ecaldqm::MESet::ConstBin::ConstBin ( MESet const &  _meSet,
unsigned  _iME = 0,
int  _iBin = 1 
)

Definition at line 303 of file MESet.cc.

304  : meSet_(&_meSet), iME(_iME), iBin(_iBin), otype(binning::nObjType) {
305  if (iME == unsigned(-1))
306  return;
307 
308  // current internal bin numbering scheme does not allow 1D histograms
309  // (overflow & underflow in each y)
311  // if(kind != MonitorElement::Kind::TH1F && kind !=
312  // MonitorElement::Kind::TPROFILE &&
314  throw cms::Exception("InvalidOperation") << "MESet::ConstBin::Ctor: const_iterator only available for MESet of "
315  "2D histograms";
316 
317  MonitorElement const *me(meSet_->getME(iME));
318 
319  if (!me)
320  throw cms::Exception("InvalidOperation")
321  << "MESet::ConstBin::Ctor: ME " << iME << " does not exist for MESet " << meSet_->getPath();
322 
324  iBin = me->getNbinsX() + 3;
325 
327  }

References Exception, ecaldqm::MESet::getKind(), ecaldqm::MESet::getME(), ecaldqm::binning::getObject(), ecaldqm::MESet::getObjType(), ecaldqm::MESet::getPath(), iBin, iME, CalibrationSummaryClient_cfi::kind, hlt_dqm_clientPB-live_cfg::me, meSet_, otype, MonitorElementData::TH2F, and MonitorElementData::TPROFILE2D.

◆ ConstBin() [3/3]

ecaldqm::MESet::ConstBin::ConstBin ( ConstBin const &  _orig)
inline

Definition at line 175 of file MESet.h.

175 : meSet_(_orig.meSet_), iME(_orig.iME), iBin(_orig.iBin), otype(_orig.otype) {}

Member Function Documentation

◆ getBinContent()

double ecaldqm::MESet::ConstBin::getBinContent ( ) const
inline

◆ getBinEntries()

double ecaldqm::MESet::ConstBin::getBinEntries ( ) const
inline

Definition at line 204 of file MESet.h.

204  {
205  if (meSet_ && iME != unsigned(-1))
206  return meSet_->getME(iME)->getBinEntries(iBin);
207  else
208  return 0.;
209  }

References dqm::impl::MonitorElement::getBinEntries(), ecaldqm::MESet::getME(), iBin, iME, and meSet_.

Referenced by ecaldqm::PresampleClient::producePlots(), ecaldqm::TimingClient::producePlots(), ecaldqm::LaserWriter::run(), and ecaldqm::LedWriter::run().

◆ getBinError()

double ecaldqm::MESet::ConstBin::getBinError ( ) const
inline

Definition at line 198 of file MESet.h.

198  {
199  if (meSet_ && iME != unsigned(-1))
200  return meSet_->getME(iME)->getBinError(iBin);
201  else
202  return 0.;
203  }

References dqm::impl::MonitorElement::getBinError(), ecaldqm::MESet::getME(), iBin, iME, and meSet_.

Referenced by ecaldqm::PresampleClient::producePlots(), ecaldqm::TimingClient::producePlots(), ecaldqm::LaserWriter::run(), and ecaldqm::LedWriter::run().

◆ getId()

uint32_t ecaldqm::MESet::ConstBin::getId ( ) const
inline

Definition at line 186 of file MESet.h.

186  {
187  if (meSet_)
189  else
190  return 0;
191  }

References ecaldqm::MESet::getBinType(), iBin, ecaldqm::binning::idFromBin(), iME, meSet_, and otype.

◆ getME()

const MonitorElement* ecaldqm::MESet::ConstBin::getME ( ) const
inline

Definition at line 210 of file MESet.h.

210  {
211  if (meSet_ && iME != unsigned(-1))
212  return meSet_->getME(iME);
213  else
214  return nullptr;
215  }

References ecaldqm::MESet::getME(), iME, and meSet_.

◆ getMESet()

const MESet* ecaldqm::MESet::ConstBin::getMESet ( ) const
inline

Definition at line 217 of file MESet.h.

217 { return meSet_; }

References meSet_.

◆ isChannel()

bool ecaldqm::MESet::ConstBin::isChannel ( EcalElectronicsMapping const *  electronicsMap) const
inline

Definition at line 180 of file MESet.h.

180  {
181  if (meSet_)
182  return binning::isValidIdBin(electronicsMap, otype, meSet_->getBinType(), iME, iBin);
183  else
184  return false;
185  }

References ecaldqm::MESet::getBinType(), iBin, iME, ecaldqm::binning::isValidIdBin(), meSet_, and otype.

◆ operator=()

MESet::ConstBin & ecaldqm::MESet::ConstBin::operator= ( ConstBin const &  _rhs)

Definition at line 329 of file MESet.cc.

329  {
330  if (meSet_->getObjType() != _rhs.meSet_->getObjType() || meSet_->getBinType() != _rhs.meSet_->getBinType())
331  throw cms::Exception("IncompatibleAssignment")
332  << "Iterator of otype " << _rhs.meSet_->getObjType() << " and btype " << _rhs.meSet_->getBinType()
333  << " to otype " << meSet_->getObjType() << " and btype " << meSet_->getBinType() << " ("
334  << _rhs.meSet_->getPath() << " to " << meSet_->getPath() << ")";
335 
336  iME = _rhs.iME;
337  iBin = _rhs.iBin;
338  otype = _rhs.otype;
339 
340  return *this;
341  }

References ecaldqm::MESet::getBinType(), ecaldqm::MESet::getObjType(), ecaldqm::MESet::getPath(), iBin, iME, meSet_, CalibrationSummaryClient_cfi::otype, and otype.

Referenced by ecaldqm::MESet::Bin::operator=().

◆ operator==()

bool ecaldqm::MESet::ConstBin::operator== ( ConstBin const &  _rhs) const
inline

Definition at line 177 of file MESet.h.

177  {
178  return meSet_ != nullptr && meSet_ == _rhs.meSet_ && iME == _rhs.iME && iBin == _rhs.iBin;
179  }

References iBin, iME, and meSet_.

◆ setMESet()

void ecaldqm::MESet::ConstBin::setMESet ( MESet const &  _meSet)
inline

Definition at line 216 of file MESet.h.

216 { meSet_ = &_meSet; }

References meSet_.

Referenced by ecaldqm::MESet::const_iterator::const_iterator().

Member Data Documentation

◆ iBin

int ecaldqm::MESet::ConstBin::iBin

◆ iME

unsigned ecaldqm::MESet::ConstBin::iME

◆ meSet_

const MESet* ecaldqm::MESet::ConstBin::meSet_
protected

◆ otype

binning::ObjectType ecaldqm::MESet::ConstBin::otype
dqm::impl::MonitorElement::getBinEntries
virtual double getBinEntries(int bin) const
get # of bin entries (for profiles)
Definition: MonitorElement.cc:645
ecaldqm::MESet::getObjType
binning::ObjectType getObjType() const
Definition: MESet.h:121
ecaldqm::MESet::getME
virtual const MonitorElement * getME(unsigned _iME) const
Definition: MESet.h:126
ecaldqm::binning::idFromBin
uint32_t idFromBin(ObjectType, BinningType, unsigned, int)
Definition: MESetBinningUtils.cc:752
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
ecaldqm::MESet::ConstBin::otype
binning::ObjectType otype
Definition: MESet.h:171
ecaldqm::MESet::getBinType
binning::BinningType getBinType() const
Definition: MESet.h:122
ecaldqm::MESet::ConstBin::meSet_
const MESet * meSet_
Definition: MESet.h:166
MonitorElementData::Kind::TH2F
ecaldqm::MESet::ConstBin::iBin
int iBin
Definition: MESet.h:170
ecaldqm::binning::getObject
ObjectType getObject(ObjectType, unsigned)
Definition: MESetBinningUtils.cc:490
MonitorElementData::Kind
Kind
Definition: MonitorElementCollection.h:129
CalibrationSummaryClient_cfi.kind
kind
Definition: CalibrationSummaryClient_cfi.py:37
MonitorElementData::Kind::TPROFILE2D
ecaldqm::MESet::ConstBin::iME
unsigned iME
Definition: MESet.h:169
ecaldqm::binning::nObjType
Definition: MESetBinningUtils.h:38
Exception
Definition: hltDiff.cc:245
ecaldqm::MESet::getPath
virtual const std::string & getPath() const
Definition: MESet.h:120
cms::Exception
Definition: Exception.h:70
dqm::impl::MonitorElement::getBinError
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
Definition: MonitorElement.cc:610
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
ecaldqm::MESet::getKind
MonitorElement::Kind getKind() const
Definition: MESet.h:123
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:592
ecaldqm::binning::isValidIdBin
bool isValidIdBin(EcalElectronicsMapping const *, ObjectType, BinningType, unsigned, int)
Definition: MESetBinningUtils.cc:562