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 (MESet const &, unsigned=0, int=1)
 
 ConstBin (ConstBin const &_orig)
 
double getBinContent () const
 
double getBinEntries () const
 
double getBinError () const
 
uint32_t getId () const
 
MonitorElement const * getME () const
 
MESet const * getMESet () 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

MESet const * meSet_
 

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) {}
MESet const * meSet_
Definition: MESet.h:166
binning::ObjectType otype
Definition: MESet.h:171

◆ ConstBin() [2/3]

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

Definition at line 303 of file MESet.cc.

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.

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  }
virtual std::string const & getPath() const
Definition: MESet.h:120
MonitorElement::Kind getKind() const
Definition: MESet.h:123
MESet const * meSet_
Definition: MESet.h:166
binning::ObjectType otype
Definition: MESet.h:171
ObjectType getObject(ObjectType, unsigned)
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:126
binning::ObjectType getObjType() const
Definition: MESet.h:121

◆ 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) {}
MESet const * meSet_
Definition: MESet.h:166
binning::ObjectType otype
Definition: MESet.h:171

Member Function Documentation

◆ getBinContent()

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

Definition at line 192 of file MESet.h.

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

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

192  {
193  if (meSet_ && iME != unsigned(-1))
194  return meSet_->getME(iME)->getBinContent(iBin);
195  else
196  return 0.;
197  }
MESet const * meSet_
Definition: MESet.h:166
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:126
virtual double getBinContent(int binx) const
get content of bin (1-D)

◆ getBinEntries()

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

Definition at line 204 of file MESet.h.

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().

204  {
205  if (meSet_ && iME != unsigned(-1))
206  return meSet_->getME(iME)->getBinEntries(iBin);
207  else
208  return 0.;
209  }
virtual double getBinEntries(int bin) const
get # of bin entries (for profiles)
MESet const * meSet_
Definition: MESet.h:166
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:126

◆ getBinError()

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

Definition at line 198 of file MESet.h.

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().

198  {
199  if (meSet_ && iME != unsigned(-1))
200  return meSet_->getME(iME)->getBinError(iBin);
201  else
202  return 0.;
203  }
MESet const * meSet_
Definition: MESet.h:166
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:126
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details

◆ getId()

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

Definition at line 186 of file MESet.h.

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

186  {
187  if (meSet_)
189  else
190  return 0;
191  }
MESet const * meSet_
Definition: MESet.h:166
binning::ObjectType otype
Definition: MESet.h:171
binning::BinningType getBinType() const
Definition: MESet.h:122
uint32_t idFromBin(ObjectType, BinningType, unsigned, int)

◆ getME()

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

Definition at line 210 of file MESet.h.

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

210  {
211  if (meSet_ && iME != unsigned(-1))
212  return meSet_->getME(iME);
213  else
214  return nullptr;
215  }
MESet const * meSet_
Definition: MESet.h:166
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:126

◆ getMESet()

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

Definition at line 217 of file MESet.h.

References meSet_.

217 { return meSet_; }
MESet const * meSet_
Definition: MESet.h:166

◆ isChannel()

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

Definition at line 180 of file MESet.h.

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

180  {
181  if (meSet_)
182  return binning::isValidIdBin(electronicsMap, otype, meSet_->getBinType(), iME, iBin);
183  else
184  return false;
185  }
bool isValidIdBin(EcalElectronicsMapping const *, ObjectType, BinningType, unsigned, int)
MESet const * meSet_
Definition: MESet.h:166
binning::ObjectType otype
Definition: MESet.h:171
binning::BinningType getBinType() const
Definition: MESet.h:122

◆ operator=()

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

Definition at line 329 of file MESet.cc.

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

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

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  }
virtual std::string const & getPath() const
Definition: MESet.h:120
MESet const * meSet_
Definition: MESet.h:166
binning::ObjectType otype
Definition: MESet.h:171
binning::ObjectType getObjType() const
Definition: MESet.h:121
binning::BinningType getBinType() const
Definition: MESet.h:122

◆ operator==()

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

Definition at line 177 of file MESet.h.

References iBin, iME, and meSet_.

177  {
178  return meSet_ != nullptr && meSet_ == _rhs.meSet_ && iME == _rhs.iME && iBin == _rhs.iBin;
179  }
MESet const * meSet_
Definition: MESet.h:166

◆ setMESet()

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

Definition at line 216 of file MESet.h.

References meSet_.

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

216 { meSet_ = &_meSet; }
MESet const * meSet_
Definition: MESet.h:166

Member Data Documentation

◆ iBin

int ecaldqm::MESet::ConstBin::iBin

◆ iME

unsigned ecaldqm::MESet::ConstBin::iME

◆ meSet_

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

◆ otype

binning::ObjectType ecaldqm::MESet::ConstBin::otype