CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 142 of file MESet.h.

Constructor & Destructor Documentation

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

Definition at line 151 of file MESet.h.

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

Definition at line 331 of file MESet.cc.

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

331  :
332  meSet_(&_meSet),
333  iME(_iME),
334  iBin(_iBin),
336  {
337  if(iME == unsigned(-1)) return;
338 
339  // current internal bin numbering scheme does not allow 1D histograms (overflow & underflow in each y)
341  // if(kind != MonitorElement::DQM_KIND_TH1F && kind != MonitorElement::DQM_KIND_TPROFILE &&
343  throw cms::Exception("InvalidOperation") << "MESet::ConstBin::Ctor: const_iterator only available for MESet of 2D histograms";
344 
345  MonitorElement const* me(meSet_->getME(iME));
346 
347  if(!me)
348  throw cms::Exception("InvalidOperation") << "MESet::ConstBin::Ctor: ME " << iME << " does not exist for MESet " << meSet_->getPath();
349 
351  iBin = me->getNbinsX() + 3;
352 
354  }
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:144
binning::ObjectType otype
Definition: MESet.h:149
ObjectType getObject(ObjectType, unsigned)
binning::ObjectType getObjType() const
Definition: MESet.h:93
ecaldqm::MESet::ConstBin::ConstBin ( ConstBin const &  _orig)
inline

Definition at line 153 of file MESet.h.

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

Member Function Documentation

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

Definition at line 169 of file MESet.h.

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

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

170  {
171  if(meSet_ && iME != unsigned(-1)) return meSet_->getME(iME)->getBinContent(iBin);
172  else return 0.;
173  }
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:98
MESet const * meSet_
Definition: MESet.h:144
double getBinContent(int binx) const
get content of bin (1-D)
double ecaldqm::MESet::ConstBin::getBinEntries ( ) const
inline

Definition at line 179 of file MESet.h.

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

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

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

Definition at line 174 of file MESet.h.

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

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

175  {
176  if(meSet_ && iME != unsigned(-1)) return meSet_->getME(iME)->getBinError(iBin);
177  else return 0.;
178  }
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:98
MESet const * meSet_
Definition: MESet.h:144
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 164 of file MESet.h.

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

165  {
167  else return 0;
168  }
MESet const * meSet_
Definition: MESet.h:144
binning::ObjectType otype
Definition: MESet.h:149
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 184 of file MESet.h.

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

185  {
186  if(meSet_ && iME != unsigned(-1)) return meSet_->getME(iME);
187  else return 0;
188  }
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:98
MESet const * meSet_
Definition: MESet.h:144
MESet const* ecaldqm::MESet::ConstBin::getMESet ( ) const
inline

Definition at line 190 of file MESet.h.

References meSet_.

190 { return meSet_; }
MESet const * meSet_
Definition: MESet.h:144
bool ecaldqm::MESet::ConstBin::isChannel ( ) const
inline

Definition at line 159 of file MESet.h.

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

160  {
162  else return false;
163  }
bool isValidIdBin(ObjectType, BinningType, unsigned, int)
MESet const * meSet_
Definition: MESet.h:144
binning::ObjectType otype
Definition: MESet.h:149
binning::BinningType getBinType() const
Definition: MESet.h:94
MESet::ConstBin & ecaldqm::MESet::ConstBin::operator= ( ConstBin const &  _rhs)

Definition at line 357 of file MESet.cc.

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

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

358  {
359  if(meSet_->getObjType() != _rhs.meSet_->getObjType() ||
360  meSet_->getBinType() != _rhs.meSet_->getBinType())
361  throw cms::Exception("IncompatibleAssignment")
362  << "Iterator of otype " << _rhs.meSet_->getObjType() << " and btype " << _rhs.meSet_->getBinType()
363  << " to otype " << meSet_->getObjType() << " and btype " << meSet_->getBinType()
364  << " (" << _rhs.meSet_->getPath() << " to " << meSet_->getPath() << ")";
365 
366  iME = _rhs.iME;
367  iBin = _rhs.iBin;
368  otype = _rhs.otype;
369 
370  return *this;
371  }
virtual std::string const & getPath() const
Definition: MESet.h:92
MESet const * meSet_
Definition: MESet.h:144
binning::ObjectType otype
Definition: MESet.h:149
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 155 of file MESet.h.

References iBin, iME, and meSet_.

156  {
157  return meSet_ != 0 && meSet_ == _rhs.meSet_ && iME == _rhs.iME && iBin == _rhs.iBin;
158  }
MESet const * meSet_
Definition: MESet.h:144
void ecaldqm::MESet::ConstBin::setMESet ( MESet const &  _meSet)
inline

Definition at line 189 of file MESet.h.

References meSet_.

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

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

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