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

Constructor & Destructor Documentation

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

Definition at line 146 of file MESet.h.

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

Definition at line 317 of file MESet.cc.

References MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, Exception, ecaldqm::MESet::getKind(), ecaldqm::MESet::getME(), ecaldqm::binning::getObject(), ecaldqm::MESet::getObjType(), ecaldqm::MESet::getPath(), iBin, iME, callgraph::kind, meSet_, and otype.

318  : meSet_(&_meSet), iME(_iME), iBin(_iBin), otype(binning::nObjType) {
319  if (iME == unsigned(-1))
320  return;
321 
322  // current internal bin numbering scheme does not allow 1D histograms
323  // (overflow & underflow in each y)
325  // if(kind != MonitorElement::DQM_KIND_TH1F && kind !=
326  // MonitorElement::DQM_KIND_TPROFILE &&
328  throw cms::Exception("InvalidOperation") << "MESet::ConstBin::Ctor: const_iterator only available for MESet of "
329  "2D histograms";
330 
331  MonitorElement const *me(meSet_->getME(iME));
332 
333  if (!me)
334  throw cms::Exception("InvalidOperation")
335  << "MESet::ConstBin::Ctor: ME " << iME << " does not exist for MESet " << meSet_->getPath();
336 
338  iBin = me->getNbinsX() + 3;
339 
341  }
virtual std::string const & getPath() const
Definition: MESet.h:91
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:97
MonitorElement::Kind getKind() const
Definition: MESet.h:94
MESet const * meSet_
Definition: MESet.h:139
binning::ObjectType otype
Definition: MESet.h:144
ObjectType getObject(ObjectType, unsigned)
binning::ObjectType getObjType() const
Definition: MESet.h:92
ecaldqm::MESet::ConstBin::ConstBin ( ConstBin const &  _orig)
inline

Definition at line 148 of file MESet.h.

References operator=().

148 : meSet_(_orig.meSet_), iME(_orig.iME), iBin(_orig.iBin), otype(_orig.otype) {}
MESet const * meSet_
Definition: MESet.h:139
binning::ObjectType otype
Definition: MESet.h:144

Member Function Documentation

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

Definition at line 165 of file MESet.h.

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

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

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

Definition at line 177 of file MESet.h.

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

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

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

Definition at line 171 of file MESet.h.

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

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

171  {
172  if (meSet_ && iME != unsigned(-1))
173  return meSet_->getME(iME)->getBinError(iBin);
174  else
175  return 0.;
176  }
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:97
MESet const * meSet_
Definition: MESet.h:139
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 159 of file MESet.h.

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

159  {
160  if (meSet_)
162  else
163  return 0;
164  }
MESet const * meSet_
Definition: MESet.h:139
binning::ObjectType otype
Definition: MESet.h:144
binning::BinningType getBinType() const
Definition: MESet.h:93
uint32_t idFromBin(ObjectType, BinningType, unsigned, int)
MonitorElement const* ecaldqm::MESet::ConstBin::getME ( ) const
inline

Definition at line 183 of file MESet.h.

References ecaldqm::MESet::getME().

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

Definition at line 153 of file MESet.h.

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

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

153  {
154  if (meSet_)
156  else
157  return false;
158  }
bool isValidIdBin(ObjectType, BinningType, unsigned, int)
MESet const * meSet_
Definition: MESet.h:139
binning::ObjectType otype
Definition: MESet.h:144
binning::BinningType getBinType() const
Definition: MESet.h:93
MESet::ConstBin & ecaldqm::MESet::ConstBin::operator= ( ConstBin const &  _rhs)

Definition at line 343 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=().

343  {
344  if (meSet_->getObjType() != _rhs.meSet_->getObjType() || meSet_->getBinType() != _rhs.meSet_->getBinType())
345  throw cms::Exception("IncompatibleAssignment")
346  << "Iterator of otype " << _rhs.meSet_->getObjType() << " and btype " << _rhs.meSet_->getBinType()
347  << " to otype " << meSet_->getObjType() << " and btype " << meSet_->getBinType() << " ("
348  << _rhs.meSet_->getPath() << " to " << meSet_->getPath() << ")";
349 
350  iME = _rhs.iME;
351  iBin = _rhs.iBin;
352  otype = _rhs.otype;
353 
354  return *this;
355  }
virtual std::string const & getPath() const
Definition: MESet.h:91
MESet const * meSet_
Definition: MESet.h:139
binning::ObjectType otype
Definition: MESet.h:144
binning::ObjectType getObjType() const
Definition: MESet.h:92
binning::BinningType getBinType() const
Definition: MESet.h:93
bool ecaldqm::MESet::ConstBin::operator== ( ConstBin const &  _rhs) const
inline

Definition at line 150 of file MESet.h.

References iBin, iME, and meSet_.

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

Definition at line 189 of file MESet.h.

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

189 { meSet_ = &_meSet; }
MESet const * meSet_
Definition: MESet.h:139

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