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

Constructor & Destructor Documentation

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

Definition at line 145 of file MESet.h.

145 : meSet_(nullptr), iME(-1), iBin(-1), otype(binning::nObjType) {}
MESet const * meSet_
Definition: MESet.h:138
binning::ObjectType otype
Definition: MESet.h:143
ecaldqm::MESet::ConstBin::ConstBin ( MESet const &  _meSet,
unsigned  _iME = 0,
int  _iBin = 1 
)

Definition at line 297 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.

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  }
virtual std::string const & getPath() const
Definition: MESet.h:92
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:98
MonitorElement::Kind getKind() const
Definition: MESet.h:95
MESet const * meSet_
Definition: MESet.h:138
binning::ObjectType otype
Definition: MESet.h:143
ObjectType getObject(ObjectType, unsigned)
binning::ObjectType getObjType() const
Definition: MESet.h:93
ecaldqm::MESet::ConstBin::ConstBin ( ConstBin const &  _orig)
inline

Definition at line 147 of file MESet.h.

References operator=().

147 : meSet_(_orig.meSet_), iME(_orig.iME), iBin(_orig.iBin), otype(_orig.otype) {}
MESet const * meSet_
Definition: MESet.h:138
binning::ObjectType otype
Definition: MESet.h:143

Member Function Documentation

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

Definition at line 164 of file MESet.h.

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

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

164  {
165  if (meSet_ && iME != unsigned(-1))
166  return meSet_->getME(iME)->getBinContent(iBin);
167  else
168  return 0.;
169  }
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:98
MESet const * meSet_
Definition: MESet.h:138
virtual double getBinContent(int binx) const
get content of bin (1-D)
double ecaldqm::MESet::ConstBin::getBinEntries ( ) const
inline

Definition at line 176 of file MESet.h.

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

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

176  {
177  if (meSet_ && iME != unsigned(-1))
178  return meSet_->getME(iME)->getBinEntries(iBin);
179  else
180  return 0.;
181  }
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:98
MESet const * meSet_
Definition: MESet.h:138
virtual double getBinEntries(int bin) const
get # of bin entries (for profiles)
double ecaldqm::MESet::ConstBin::getBinError ( ) const
inline

Definition at line 170 of file MESet.h.

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

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

170  {
171  if (meSet_ && iME != unsigned(-1))
172  return meSet_->getME(iME)->getBinError(iBin);
173  else
174  return 0.;
175  }
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:98
MESet const * meSet_
Definition: MESet.h:138
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
uint32_t ecaldqm::MESet::ConstBin::getId ( ) const
inline

Definition at line 158 of file MESet.h.

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

158  {
159  if (meSet_)
161  else
162  return 0;
163  }
MESet const * meSet_
Definition: MESet.h:138
binning::ObjectType otype
Definition: MESet.h:143
binning::BinningType getBinType() const
Definition: MESet.h:94
uint32_t idFromBin(ObjectType, BinningType, unsigned, int)
MonitorElement const* ecaldqm::MESet::ConstBin::getME ( ) const
inline

Definition at line 182 of file MESet.h.

References ecaldqm::MESet::getME().

182  {
183  if (meSet_ && iME != unsigned(-1))
184  return meSet_->getME(iME);
185  else
186  return nullptr;
187  }
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:98
MESet const * meSet_
Definition: MESet.h:138
MESet const* ecaldqm::MESet::ConstBin::getMESet ( ) const
inline
bool ecaldqm::MESet::ConstBin::isChannel ( ) const
inline

Definition at line 152 of file MESet.h.

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

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

152  {
153  if (meSet_)
155  else
156  return false;
157  }
bool isValidIdBin(ObjectType, BinningType, unsigned, int)
MESet const * meSet_
Definition: MESet.h:138
binning::ObjectType otype
Definition: MESet.h:143
binning::BinningType getBinType() const
Definition: MESet.h:94
MESet::ConstBin & ecaldqm::MESet::ConstBin::operator= ( ConstBin const &  _rhs)

Definition at line 323 of file MESet.cc.

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

Referenced by ConstBin(), and ecaldqm::MESet::Bin::operator=().

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  }
virtual std::string const & getPath() const
Definition: MESet.h:92
MESet const * meSet_
Definition: MESet.h:138
binning::ObjectType otype
Definition: MESet.h:143
binning::ObjectType getObjType() const
Definition: MESet.h:93
binning::BinningType getBinType() const
Definition: MESet.h:94
bool ecaldqm::MESet::ConstBin::operator== ( ConstBin const &  _rhs) const
inline

Definition at line 149 of file MESet.h.

References iBin, iME, and meSet_.

149  {
150  return meSet_ != nullptr && meSet_ == _rhs.meSet_ && iME == _rhs.iME && iBin == _rhs.iBin;
151  }
MESet const * meSet_
Definition: MESet.h:138
void ecaldqm::MESet::ConstBin::setMESet ( MESet const &  _meSet)
inline

Definition at line 188 of file MESet.h.

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

188 { meSet_ = &_meSet; }
MESet const * meSet_
Definition: MESet.h:138

Member Data Documentation

int ecaldqm::MESet::ConstBin::iBin
unsigned ecaldqm::MESet::ConstBin::iME
MESet const* ecaldqm::MESet::ConstBin::meSet_
protected
binning::ObjectType ecaldqm::MESet::ConstBin::otype