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 () 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 136 of file MESet.h.

Constructor & Destructor Documentation

◆ ConstBin() [1/3]

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

Definition at line 145 of file MESet.h.

145 : 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 297 of file MESet.cc.

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

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 147 of file MESet.h.

147 : 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 176 of file MESet.h.

176  {
177  if (meSet_ && iME != unsigned(-1))
178  return meSet_->getME(iME)->getBinEntries(iBin);
179  else
180  return 0.;
181  }

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 170 of file MESet.h.

170  {
171  if (meSet_ && iME != unsigned(-1))
172  return meSet_->getME(iME)->getBinError(iBin);
173  else
174  return 0.;
175  }

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 158 of file MESet.h.

158  {
159  if (meSet_)
161  else
162  return 0;
163  }

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

◆ getME()

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

Definition at line 182 of file MESet.h.

182  {
183  if (meSet_ && iME != unsigned(-1))
184  return meSet_->getME(iME);
185  else
186  return nullptr;
187  }

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

◆ getMESet()

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

Definition at line 189 of file MESet.h.

189 { return meSet_; }

References meSet_.

◆ isChannel()

bool ecaldqm::MESet::ConstBin::isChannel ( ) const
inline

Definition at line 152 of file MESet.h.

152  {
153  if (meSet_)
155  else
156  return false;
157  }

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 323 of file MESet.cc.

323  {
324  if (meSet_->getObjType() != _rhs.meSet_->getObjType() || meSet_->getBinType() != _rhs.meSet_->getBinType())
325  throw cms::Exception("IncompatibleAssignment")
326  << "Iterator of otype " << _rhs.meSet_->getObjType() << " and btype " << _rhs.meSet_->getBinType()
327  << " to otype " << meSet_->getObjType() << " and btype " << meSet_->getBinType() << " ("
328  << _rhs.meSet_->getPath() << " to " << meSet_->getPath() << ")";
329 
330  iME = _rhs.iME;
331  iBin = _rhs.iBin;
332  otype = _rhs.otype;
333 
334  return *this;
335  }

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 149 of file MESet.h.

149  {
150  return meSet_ != nullptr && meSet_ == _rhs.meSet_ && iME == _rhs.iME && iBin == _rhs.iBin;
151  }

References iBin, iME, and meSet_.

◆ setMESet()

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

Definition at line 188 of file MESet.h.

188 { 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:93
ecaldqm::MESet::getME
virtual const MonitorElement * getME(unsigned _iME) const
Definition: MESet.h:98
ecaldqm::binning::idFromBin
uint32_t idFromBin(ObjectType, BinningType, unsigned, int)
Definition: MESetBinningUtils.cc:726
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
ecaldqm::binning::isValidIdBin
bool isValidIdBin(ObjectType, BinningType, unsigned, int)
Definition: MESetBinningUtils.cc:539
ecaldqm::MESet::ConstBin::otype
binning::ObjectType otype
Definition: MESet.h:143
ecaldqm::MESet::getBinType
binning::BinningType getBinType() const
Definition: MESet.h:94
ecaldqm::MESet::ConstBin::meSet_
const MESet * meSet_
Definition: MESet.h:138
MonitorElementData::Kind::TH2F
ecaldqm::MESet::ConstBin::iBin
int iBin
Definition: MESet.h:142
ecaldqm::binning::getObject
ObjectType getObject(ObjectType, unsigned)
Definition: MESetBinningUtils.cc:467
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:141
ecaldqm::binning::nObjType
Definition: MESetBinningUtils.h:37
Exception
Definition: hltDiff.cc:246
ecaldqm::MESet::getPath
virtual const std::string & getPath() const
Definition: MESet.h:92
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:95
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:592