CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
ecaldqm::MESet Class Reference

#include <MESet.h>

Inheritance diagram for ecaldqm::MESet:
ecaldqm::MESetChannel ecaldqm::MESetEcal ecaldqm::MESetNonObject ecaldqm::MESetDet0D ecaldqm::MESetDet1D ecaldqm::MESetDet2D ecaldqm::MESetTrend

Public Member Functions

virtual void book ()
 
virtual void clear () const
 
virtual void fill (DetId const &, double _wx=1., double _wy=1., double _w=1.)
 
virtual void fill (EcalElectronicsId const &, double _wx=1., double _wy=1., double _w=1.)
 
virtual void fill (unsigned, double _wx=1., double _wy=1., double _w=1.)
 
virtual void fill (double, double _wy=1., double _w=1.)
 
virtual double getBinContent (DetId const &, int _bin=0) const
 
virtual double getBinContent (EcalElectronicsId const &, int _bin=0) const
 
virtual double getBinContent (unsigned, int _bin=0) const
 
virtual double getBinEntries (DetId const &, int _bin=0) const
 
virtual double getBinEntries (EcalElectronicsId const &, int _bin=0) const
 
virtual double getBinEntries (unsigned, int _bin=0) const
 
virtual double getBinError (DetId const &, int _bin=0) const
 
virtual double getBinError (EcalElectronicsId const &, int _bin=0) const
 
virtual double getBinError (unsigned, int _bin=0) const
 
BinService::BinningType getBinType () const
 
std::string const & getDir () const
 
virtual MonitorElement const * getME (unsigned _offset) const
 
std::string const & getName () const
 
BinService::ObjectType getObjType () const
 
bool isActive () const
 
 MESet (std::string const &, MEData const &, bool _readOnly=false)
 
void name (std::map< std::string, std::string > const &) const
 
virtual void reset (double _content=0., double _err=0., double _entries=0.)
 
virtual void resetAll (double _content=0., double _err=0., double _entries=0.)
 
virtual bool retrieve () const
 
virtual void setAxisTitle (std::string const &, int _axis=1)
 
virtual void setBinContent (DetId const &, double, double _err=0.)
 
virtual void setBinContent (EcalElectronicsId const &, double, double _err=0.)
 
virtual void setBinContent (unsigned, double, double _err=0.)
 
virtual void setBinEntries (DetId const &, double)
 
virtual void setBinEntries (EcalElectronicsId const &, double)
 
virtual void setBinEntries (unsigned, double)
 
virtual void setBinLabel (unsigned, int, std::string const &, int _axis=1)
 
void setDir (std::string const &_dir)
 
void setName (std::string const &_name)
 
virtual ~MESet ()
 

Protected Member Functions

virtual void fill_ (unsigned, int, double)
 
virtual void fill_ (unsigned, double, double, double)
 
virtual double getBinContent_ (unsigned, int) const
 
virtual double getBinEntries_ (unsigned, int) const
 
virtual double getBinError_ (unsigned, int) const
 
virtual void setBinContent_ (unsigned, int, double, double)
 
virtual void setBinEntries_ (unsigned, int, double)
 

Protected Attributes

bool active_
 
MEData const * data_
 
std::string dir_
 
std::vector< MonitorElement * > mes_
 
std::string name_
 
bool readOnly_
 

Static Protected Attributes

static BinService const * binService_
 
static DQMStoredqmStore_
 

Detailed Description

Definition at line 65 of file MESet.h.

Constructor & Destructor Documentation

ecaldqm::MESet::MESet ( std::string const &  _fullpath,
MEData const &  _data,
bool  _readOnly = false 
)

Definition at line 16 of file MESet.cc.

References binService_, dqmStore_, and edm::hlt::Exception.

16  :
17  mes_(0),
18  dir_(_fullpath.substr(0, _fullpath.find_last_of('/'))),
19  name_(_fullpath.substr(_fullpath.find_last_of('/') + 1)),
20  data_(&_data),
21  active_(false),
22  readOnly_(_readOnly)
23  {
24  if (!binService_) {
26  if(!binService_)
27  throw cms::Exception("Service") << "EcalDQMBinningService not found" << std::endl;
28  }
29 
30  if (!dqmStore_) {
32  if(!dqmStore_)
33  throw cms::Exception("Service") << "DQMStore not found" << std::endl;
34  }
35 
36  // expand full path into dir & name
37  if(_fullpath.size() == 0)
38  throw cms::Exception("InvalidConfiguration") << "MonitorElement path empty";
39  }
bool readOnly_
Definition: MESet.h:136
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
static DQMStore * dqmStore_
Definition: MESet.h:127
std::string dir_
Definition: MESet.h:131
std::string name_
Definition: MESet.h:132
static BinService const * binService_
Definition: MESet.h:126
bool active_
Definition: MESet.h:135
MEData const * data_
Definition: MESet.h:133
ecaldqm::MESet::~MESet ( )
virtual

Definition at line 41 of file MESet.cc.

42  {
43  }

Member Function Documentation

void ecaldqm::MESet::book ( )
virtual

Reimplemented in ecaldqm::MESetTrend, ecaldqm::MESetEcal, and ecaldqm::MESetNonObject.

Definition at line 46 of file MESet.cc.

References active_, and clear().

47  {
48  clear();
49  active_ = true;
50  }
virtual void clear() const
Definition: MESet.cc:59
bool active_
Definition: MESet.h:135
void ecaldqm::MESet::clear ( void  ) const
virtual
void ecaldqm::MESet::fill ( DetId const &  ,
double  _wx = 1.,
double  _wy = 1.,
double  _w = 1. 
)
virtual

Reimplemented in ecaldqm::MESetChannel, ecaldqm::MESetTrend, ecaldqm::MESetEcal, ecaldqm::MESetDet1D, ecaldqm::MESetDet0D, and ecaldqm::MESetDet2D.

Definition at line 133 of file MESet.cc.

Referenced by fill().

134  {
135  }
void ecaldqm::MESet::fill ( EcalElectronicsId const &  _id,
double  _wx = 1.,
double  _wy = 1.,
double  _w = 1. 
)
virtual

Reimplemented in ecaldqm::MESetChannel.

Definition at line 138 of file MESet.cc.

References fill(), and ecaldqm::getElectronicsMap().

139  {
140  fill(getElectronicsMap()->getDetId(_id), _wx, _wy, _w);
141  }
const EcalElectronicsMapping * getElectronicsMap()
virtual void fill(DetId const &, double _wx=1., double _wy=1., double _w=1.)
Definition: MESet.cc:133
void ecaldqm::MESet::fill ( unsigned  _dcctccid,
double  _wx = 1.,
double  _wy = 1.,
double  _w = 1. 
)
virtual

Reimplemented in ecaldqm::MESetTrend, ecaldqm::MESetEcal, ecaldqm::MESetDet1D, and ecaldqm::MESetDet0D.

Definition at line 144 of file MESet.cc.

145  {
146  }
void ecaldqm::MESet::fill ( double  ,
double  _wy = 1.,
double  _w = 1. 
)
virtual

Reimplemented in ecaldqm::MESetTrend, ecaldqm::MESetEcal, ecaldqm::MESetNonObject, and ecaldqm::MESetDet0D.

Definition at line 149 of file MESet.cc.

150  {
151  }
void ecaldqm::MESet::fill_ ( unsigned  _index,
int  _bin,
double  _w 
)
protectedvirtual

Definition at line 262 of file MESet.cc.

References data_, MonitorElement::DQM_KIND_TH1F, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE, h, ecaldqm::MEData::kind, mes_, x, and detailsBasic3DVector::y.

Referenced by ecaldqm::MESetEcal::fill(), ecaldqm::MESetTrend::fill(), ecaldqm::MESetDet1D::fill_(), and ecaldqm::MESetEcal::fill_().

263  {
264  MonitorElement* me(mes_.at(_index));
265 
266  TH1* h(me->getTH1());
267 
268  int nbinsX(h->GetNbinsX());
269 
270  double x(h->GetXaxis()->GetBinCenter((_bin - 1) % nbinsX + 1));
271 
273  me->Fill(x, _w);
274  return;
275  }
276 
277  double y(h->GetYaxis()->GetBinCenter((_bin - 1) / nbinsX + 1));
278 
279  me->Fill(x, y, _w);
280  }
MonitorElement::Kind kind
Definition: MESet.h:24
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
MEData const * data_
Definition: MESet.h:133
Definition: DDAxes.h:10
void ecaldqm::MESet::fill_ ( unsigned  _offset,
double  _x,
double  _wy,
double  _w 
)
protectedvirtual

Definition at line 283 of file MESet.cc.

References data_, MonitorElement::DQM_KIND_REAL, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE, ecaldqm::MEData::kind, and mes_.

284  {
286  mes_.at(_offset)->Fill(_x);
288  mes_.at(_offset)->Fill(_x, _wy);
289  else
290  mes_.at(_offset)->Fill(_x, _wy, _w);
291  }
MonitorElement::Kind kind
Definition: MESet.h:24
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
MEData const * data_
Definition: MESet.h:133
double ecaldqm::MESet::getBinContent ( DetId const &  ,
int  _bin = 0 
) const
virtual

Reimplemented in ecaldqm::MESetTrend, ecaldqm::MESetChannel, ecaldqm::MESetEcal, and ecaldqm::MESetDet1D.

Definition at line 186 of file MESet.cc.

Referenced by getBinContent().

187  {
188  return 0.;
189  }
double ecaldqm::MESet::getBinContent ( EcalElectronicsId const &  _id,
int  _bin = 0 
) const
virtual

Reimplemented in ecaldqm::MESetChannel.

Definition at line 192 of file MESet.cc.

References getBinContent(), and ecaldqm::getElectronicsMap().

193  {
194  return getBinContent(getElectronicsMap()->getDetId(_id), _bin);
195  }
const EcalElectronicsMapping * getElectronicsMap()
virtual double getBinContent(DetId const &, int _bin=0) const
Definition: MESet.cc:186
double ecaldqm::MESet::getBinContent ( unsigned  ,
int  _bin = 0 
) const
virtual

Reimplemented in ecaldqm::MESetTrend, ecaldqm::MESetEcal, and ecaldqm::MESetDet1D.

Definition at line 198 of file MESet.cc.

199  {
200  return 0.;
201  }
double ecaldqm::MESet::getBinContent_ ( unsigned  _index,
int  _bin 
) const
protectedvirtual

Definition at line 330 of file MESet.cc.

References data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE, MonitorElement::getBinContent(), h, ecaldqm::MEData::kind, and mes_.

Referenced by ecaldqm::MESetDet1D::getBinContent(), and ecaldqm::MESetEcal::getBinContent().

331  {
332  MonitorElement* me(mes_.at(_index));
333 
335  return me->getBinContent(_bin);
336  else{
337  TH1* h(me->getTH1());
338  int nbinsX(h->GetNbinsX());
339  int ix((_bin - 1) % nbinsX + 1);
340  int iy((_bin - 1) / nbinsX + 1);
341  return h->GetBinContent(ix, iy);
342  }
343  }
MonitorElement::Kind kind
Definition: MESet.h:24
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
double getBinContent(int binx) const
get content of bin (1-D)
MEData const * data_
Definition: MESet.h:133
double ecaldqm::MESet::getBinEntries ( DetId const &  ,
int  _bin = 0 
) const
virtual

Reimplemented in ecaldqm::MESetTrend, ecaldqm::MESetEcal, ecaldqm::MESetChannel, and ecaldqm::MESetDet1D.

Definition at line 222 of file MESet.cc.

Referenced by getBinEntries().

223  {
224  return 0.;
225  }
double ecaldqm::MESet::getBinEntries ( EcalElectronicsId const &  _id,
int  _bin = 0 
) const
virtual

Reimplemented in ecaldqm::MESetChannel.

Definition at line 228 of file MESet.cc.

References getBinEntries(), and ecaldqm::getElectronicsMap().

229  {
230  return getBinEntries(getElectronicsMap()->getDetId(_id), _bin);
231  }
const EcalElectronicsMapping * getElectronicsMap()
virtual double getBinEntries(DetId const &, int _bin=0) const
Definition: MESet.cc:222
double ecaldqm::MESet::getBinEntries ( unsigned  ,
int  _bin = 0 
) const
virtual

Reimplemented in ecaldqm::MESetTrend, ecaldqm::MESetEcal, and ecaldqm::MESetDet1D.

Definition at line 234 of file MESet.cc.

235  {
236  return 0.;
237  }
double ecaldqm::MESet::getBinEntries_ ( unsigned  _index,
int  _bin 
) const
protectedvirtual

Definition at line 362 of file MESet.cc.

References newFWLiteAna::bin, data_, MonitorElement::DQM_KIND_TH1F, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE, MonitorElement::DQM_KIND_TPROFILE2D, h, ecaldqm::MEData::kind, and mes_.

Referenced by ecaldqm::MESetDet1D::getBinEntries(), and ecaldqm::MESetEcal::getBinEntries().

363  {
364  MonitorElement* me(mes_.at(_index));
365 
366  switch(data_->kind){
368  return me->getBinContent(_bin);
370  return me->getBinEntries(_bin);
372  {
373  TH1* h(me->getTH1());
374  int nbinsX(h->GetNbinsX());
375  int ix((_bin - 1) % nbinsX + 1);
376  int iy((_bin - 1) / nbinsX + 1);
377  int bin(h->GetBin(ix, iy));
378  return me->getBinContent(bin);
379  }
381  {
382  TH1* h(me->getTH1());
383  int nbinsX(h->GetNbinsX());
384  int ix((_bin - 1) % nbinsX + 1);
385  int iy((_bin - 1) / nbinsX + 1);
386  int bin(h->GetBin(ix, iy));
387  return me->getBinEntries(bin);
388  }
389  default:
390  return 0.;
391  }
392  }
MonitorElement::Kind kind
Definition: MESet.h:24
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
MEData const * data_
Definition: MESet.h:133
double ecaldqm::MESet::getBinError ( DetId const &  ,
int  _bin = 0 
) const
virtual

Reimplemented in ecaldqm::MESetTrend, ecaldqm::MESetEcal, and ecaldqm::MESetDet1D.

Definition at line 204 of file MESet.cc.

Referenced by getBinError().

205  {
206  return 0.;
207  }
double ecaldqm::MESet::getBinError ( EcalElectronicsId const &  _id,
int  _bin = 0 
) const
virtual

Definition at line 210 of file MESet.cc.

References getBinError(), and ecaldqm::getElectronicsMap().

211  {
212  return getBinError(getElectronicsMap()->getDetId(_id), _bin);
213  }
const EcalElectronicsMapping * getElectronicsMap()
virtual double getBinError(DetId const &, int _bin=0) const
Definition: MESet.cc:204
double ecaldqm::MESet::getBinError ( unsigned  ,
int  _bin = 0 
) const
virtual

Reimplemented in ecaldqm::MESetTrend, ecaldqm::MESetEcal, and ecaldqm::MESetDet1D.

Definition at line 216 of file MESet.cc.

217  {
218  return 0.;
219  }
double ecaldqm::MESet::getBinError_ ( unsigned  _index,
int  _bin 
) const
protectedvirtual

Definition at line 346 of file MESet.cc.

References data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE, MonitorElement::getBinError(), h, ecaldqm::MEData::kind, and mes_.

Referenced by ecaldqm::MESetDet1D::getBinError(), and ecaldqm::MESetEcal::getBinError().

347  {
348  MonitorElement* me(mes_.at(_index));
349 
351  return me->getBinError(_bin);
352  else{
353  TH1* h(me->getTH1());
354  int nbinsX(h->GetNbinsX());
355  int ix((_bin - 1) % nbinsX + 1);
356  int iy((_bin - 1) / nbinsX + 1);
357  return h->GetBinError(ix, iy);
358  }
359  }
MonitorElement::Kind kind
Definition: MESet.h:24
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
MEData const * data_
Definition: MESet.h:133
BinService::BinningType ecaldqm::MESet::getBinType ( ) const
inline

Definition at line 112 of file MESet.h.

References ecaldqm::MEData::btype, and data_.

112 { return data_->btype; }
BinService::BinningType btype
Definition: MESet.h:23
MEData const * data_
Definition: MESet.h:133
std::string const& ecaldqm::MESet::getDir ( ) const
inline

Definition at line 106 of file MESet.h.

References dir_.

106 { return dir_; }
std::string dir_
Definition: MESet.h:131
virtual MonitorElement const* ecaldqm::MESet::getME ( unsigned  _offset) const
inlinevirtual

Definition at line 115 of file MESet.h.

References mes_.

115 { return (_offset < mes_.size() ? mes_[_offset] : 0); }
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
std::string const& ecaldqm::MESet::getName ( ) const
inline

Definition at line 108 of file MESet.h.

References name_.

108 { return name_; }
std::string name_
Definition: MESet.h:132
BinService::ObjectType ecaldqm::MESet::getObjType ( ) const
inline

Definition at line 111 of file MESet.h.

References data_, and ecaldqm::MEData::otype.

111 { return data_->otype; }
BinService::ObjectType otype
Definition: MESet.h:22
MEData const * data_
Definition: MESet.h:133
bool ecaldqm::MESet::isActive ( ) const
inline

Definition at line 113 of file MESet.h.

References active_.

113 { return active_; }
bool active_
Definition: MESet.h:135
void ecaldqm::MESet::name ( std::map< std::string, std::string > const &  _replacements) const

Definition at line 240 of file MESet.cc.

References dir, dir_, name_, and listBenchmarks::pattern.

Referenced by BeautifulSoup.Tag::_invert(), ecaldqm::MESetChannel::fill(), ecaldqm::MESetEcal::generateNames(), ecaldqm::MESetChannel::setBinContent(), and Vispa.Views.PropertyView.Property::valueChanged().

241  {
242  TString dir(dir_);
243  TString name(name_);
244 
245  for(std::map<std::string, std::string>::const_iterator repItr(_replacements.begin()); repItr != _replacements.end(); ++repItr){
246 
247  TString pattern("\\%\\(");
248  pattern += repItr->first;
249  pattern += "\\)s";
250 
251  TPRegexp re(pattern);
252 
253  re.Substitute(dir, repItr->second, "g");
254  re.Substitute(name, repItr->second, "g");
255  }
256 
257  dir_ = dir.Data();
258  name_ = name.Data();
259  }
std::string dir_
Definition: MESet.h:131
std::string name_
Definition: MESet.h:132
dbl *** dir
Definition: mlp_gen.cc:35
void name(std::map< std::string, std::string > const &) const
Definition: MESet.cc:240
void ecaldqm::MESet::reset ( double  _content = 0.,
double  _err = 0.,
double  _entries = 0. 
)
virtual

Reimplemented in ecaldqm::MESetEcal, and ecaldqm::MESetChannel.

Definition at line 87 of file MESet.cc.

References resetAll().

Referenced by ecaldqm::MESetEcal::reset().

88  {
89  resetAll(_content, _err, _entries);
90  }
virtual void resetAll(double _content=0., double _err=0., double _entries=0.)
Definition: MESet.cc:93
void ecaldqm::MESet::resetAll ( double  _content = 0.,
double  _err = 0.,
double  _entries = 0. 
)
virtual

Definition at line 93 of file MESet.cc.

References newFWLiteAna::bin, data_, MonitorElement::DQM_KIND_REAL, MonitorElement::DQM_KIND_TPROFILE, MonitorElement::DQM_KIND_TPROFILE2D, python.tagInventory::entries, h, ecaldqm::MEData::kind, and mes_.

Referenced by ecaldqm::MESetEcal::book(), and reset().

94  {
96  for(std::vector<MonitorElement*>::iterator meItr(mes_.begin()); meItr != mes_.end(); ++meItr)
97  (*meItr)->Fill(_content);
98  return;
99  }
100 
101  bool simple(true);
102  if(_content != 0. || _err != 0. || _entries != 0.) simple = false;
103 
104  for(std::vector<MonitorElement*>::iterator meItr(mes_.begin()); meItr != mes_.end(); ++meItr){
105  TH1* h((*meItr)->getTH1());
106  h->Reset();
107  if(simple) continue;
108 
109  int nbinsX(h->GetNbinsX());
110  int nbinsY(h->GetNbinsY());
111  double entries(0.);
112  for(int ix(1); ix <= nbinsX; ix++){
113  for(int iy(1); iy <= nbinsY; iy++){
114  int bin(h->GetBin(ix, iy));
115  h->SetBinContent(bin, _content);
116  h->SetBinError(bin, _err);
118  static_cast<TProfile*>(h)->SetBinEntries(bin, _entries);
119  entries += _entries;
120  }
122  static_cast<TProfile2D*>(h)->SetBinEntries(bin, _entries);
123  entries += _entries;
124  }
125  }
126  }
127  if(entries == 0.) entries = _entries;
128  h->SetEntries(_entries);
129  }
130  }
MonitorElement::Kind kind
Definition: MESet.h:24
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
MEData const * data_
Definition: MESet.h:133
bool ecaldqm::MESet::retrieve ( ) const
virtual

Reimplemented in ecaldqm::MESetChannel, ecaldqm::MESetEcal, and ecaldqm::MESetNonObject.

Definition at line 53 of file MESet.cc.

54  {
55  return false;
56  }
void ecaldqm::MESet::setAxisTitle ( std::string const &  _title,
int  _axis = 1 
)
virtual

Definition at line 66 of file MESet.cc.

References mes_.

67  {
68  for(std::vector<MonitorElement*>::iterator meItr(mes_.begin()); meItr != mes_.end(); ++meItr)
69  (*meItr)->setAxisTitle(_title, _axis);
70  }
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
void ecaldqm::MESet::setBinContent ( DetId const &  ,
double  ,
double  _err = 0. 
)
virtual

Reimplemented in ecaldqm::MESetChannel, ecaldqm::MESetTrend, and ecaldqm::MESetEcal.

Definition at line 154 of file MESet.cc.

Referenced by setBinContent().

155  {
156  }
void ecaldqm::MESet::setBinContent ( EcalElectronicsId const &  _id,
double  _content,
double  _err = 0. 
)
virtual

Reimplemented in ecaldqm::MESetChannel.

Definition at line 159 of file MESet.cc.

References ecaldqm::getElectronicsMap(), and setBinContent().

160  {
161  setBinContent(getElectronicsMap()->getDetId(_id), _content, _err);
162  }
const EcalElectronicsMapping * getElectronicsMap()
virtual void setBinContent(DetId const &, double, double _err=0.)
Definition: MESet.cc:154
void ecaldqm::MESet::setBinContent ( unsigned  ,
double  ,
double  _err = 0. 
)
virtual

Reimplemented in ecaldqm::MESetTrend, and ecaldqm::MESetEcal.

Definition at line 165 of file MESet.cc.

166  {
167  }
void ecaldqm::MESet::setBinContent_ ( unsigned  _index,
int  _bin,
double  _content,
double  _err 
)
protectedvirtual

Definition at line 294 of file MESet.cc.

References data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE, h, ecaldqm::MEData::kind, mes_, and MonitorElement::setBinContent().

Referenced by ecaldqm::MESetEcal::reset(), and ecaldqm::MESetEcal::setBinContent().

295  {
296  MonitorElement* me(mes_.at(_index));
297 
299  me->setBinContent(_bin, _content);
300  me->setBinError(_bin, _err);
301  }
302  else{
303  TH1* h(me->getTH1());
304  int nbinsX(h->GetNbinsX());
305  int ix((_bin - 1) % nbinsX + 1);
306  int iy((_bin - 1) / nbinsX + 1);
307  me->setBinContent(ix, iy, _content);
308  me->setBinError(ix, iy, _err);
309  }
310  }
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement::Kind kind
Definition: MESet.h:24
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
MEData const * data_
Definition: MESet.h:133
void ecaldqm::MESet::setBinEntries ( DetId const &  ,
double   
)
virtual

Reimplemented in ecaldqm::MESetTrend, and ecaldqm::MESetEcal.

Definition at line 170 of file MESet.cc.

Referenced by setBinEntries().

171  {
172  }
void ecaldqm::MESet::setBinEntries ( EcalElectronicsId const &  _id,
double  _entries 
)
virtual

Definition at line 175 of file MESet.cc.

References ecaldqm::getElectronicsMap(), and setBinEntries().

176  {
177  setBinEntries(getElectronicsMap()->getDetId(_id), _entries);
178  }
const EcalElectronicsMapping * getElectronicsMap()
virtual void setBinEntries(DetId const &, double)
Definition: MESet.cc:170
void ecaldqm::MESet::setBinEntries ( unsigned  ,
double   
)
virtual

Reimplemented in ecaldqm::MESetTrend, and ecaldqm::MESetEcal.

Definition at line 181 of file MESet.cc.

182  {
183  }
void ecaldqm::MESet::setBinEntries_ ( unsigned  _index,
int  _bin,
double  _entries 
)
protectedvirtual

Definition at line 313 of file MESet.cc.

References data_, MonitorElement::DQM_KIND_TPROFILE, MonitorElement::DQM_KIND_TPROFILE2D, h, ecaldqm::MEData::kind, mes_, and MonitorElement::setBinEntries().

Referenced by ecaldqm::MESetEcal::reset(), and ecaldqm::MESetEcal::setBinEntries().

314  {
315  MonitorElement* me(mes_.at(_index));
316 
318  me->setBinEntries(_bin, _entries);
319  }
321  TH1* h(me->getTH1());
322  int nbinsX(h->GetNbinsX());
323  int ix((_bin - 1) % nbinsX + 1);
324  int iy((_bin - 1) / nbinsX + 1);
325  me->setBinEntries(h->GetBin(ix, iy), _entries);
326  }
327  }
MonitorElement::Kind kind
Definition: MESet.h:24
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
MEData const * data_
Definition: MESet.h:133
void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
void ecaldqm::MESet::setBinLabel ( unsigned  _offset,
int  _bin,
std::string const &  _label,
int  _axis = 1 
)
virtual

Definition at line 73 of file MESet.cc.

References mes_.

74  {
75  if(_offset == unsigned(-1)){
76  for(std::vector<MonitorElement*>::iterator meItr(mes_.begin()); meItr != mes_.end(); ++meItr)
77  (*meItr)->setBinLabel(_bin, _label, _axis);
78 
79  return;
80  }
81 
82  if(_offset >= mes_.size() || !mes_[_offset]) return;
83  mes_[_offset]->setBinLabel(_bin, _label, _axis);
84  }
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
void ecaldqm::MESet::setDir ( std::string const &  _dir)
inline

Definition at line 107 of file MESet.h.

References dir_.

107 { dir_ = _dir; }
std::string dir_
Definition: MESet.h:131
void ecaldqm::MESet::setName ( std::string const &  _name)
inline

Definition at line 109 of file MESet.h.

References name_.

Referenced by Vispa.Gui.PortWidget.PortWidget::__init__(), and Vispa.Views.PropertyView.Property::__init__().

109 { name_ = _name; }
std::string name_
Definition: MESet.h:132

Member Data Documentation

bool ecaldqm::MESet::active_
mutableprotected
BinService const * ecaldqm::MESet::binService_
staticprotected
MEData const* ecaldqm::MESet::data_
protected
std::string ecaldqm::MESet::dir_
mutableprotected
DQMStore * ecaldqm::MESet::dqmStore_
staticprotected
std::vector<MonitorElement*> ecaldqm::MESet::mes_
mutableprotected
std::string ecaldqm::MESet::name_
mutableprotected
bool ecaldqm::MESet::readOnly_
protected

Definition at line 136 of file MESet.h.

Referenced by ecaldqm::MESetChannel::clear(), and ecaldqm::MESetChannel::reset().