CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MESetDet0D.cc
Go to the documentation of this file.
2 
3 namespace ecaldqm {
5  binning::ObjectType _otype,
8  : MESetEcal(_fullPath, _otype, _btype, _kind, 0, nullptr, nullptr) {
9  switch (kind_) {
11  break;
12  default:
13  throw_("Unsupported MonitorElement kind");
14  }
15  }
16 
17  MESetDet0D::MESetDet0D(MESetDet0D const &_orig) : MESetEcal(_orig) {}
18 
20 
21  MESet *MESetDet0D::clone(std::string const &_path /* = ""*/) const {
23  if (!_path.empty())
24  path_ = _path;
25  MESet *copy(new MESetDet0D(*this));
26  path_ = path;
27  return copy;
28  }
29 
30  void MESetDet0D::fill(EcalDQMSetupObjects const edso, DetId const &_id, double _value, double, double) {
31  if (!active_)
32  return;
33 
34  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
35  checkME_(iME);
36 
37  mes_[iME]->Fill(_value);
38  }
39 
40  void MESetDet0D::fill(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _value, double, double) {
41  if (!active_)
42  return;
43 
44  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
45  checkME_(iME);
46 
47  mes_[iME]->Fill(_value);
48  }
49 
50  void MESetDet0D::fill(EcalDQMSetupObjects const edso, int _dcctccid, double _value, double, double) {
51  if (!active_)
52  return;
53 
54  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _dcctccid, btype_));
55  checkME_(iME);
56 
57  mes_[iME]->Fill(_value);
58  }
59 
60  double MESetDet0D::getBinContent(EcalDQMSetupObjects const edso, DetId const &_id, int) const {
61  if (!active_)
62  return 0.;
63 
64  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
65  checkME_(iME);
66 
67  return mes_[iME]->getFloatValue();
68  }
69 
70  double MESetDet0D::getBinContent(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int) const {
71  if (!active_)
72  return 0.;
73 
74  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
75  checkME_(iME);
76 
77  return mes_[iME]->getFloatValue();
78  }
79 
80  double MESetDet0D::getBinContent(EcalDQMSetupObjects const edso, int _dcctccid, int) const {
81  if (!active_)
82  return 0.;
83 
84  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _dcctccid, btype_));
85  checkME_(iME);
86 
87  return mes_[iME]->getFloatValue();
88  }
89 
90  void MESetDet0D::reset(EcalElectronicsMapping const *electronicsMap, double _value /* = 0.*/, double, double) {
91  unsigned nME(mes_.size());
92  for (unsigned iME(0); iME < nME; iME++)
93  mes_[iME]->Fill(_value);
94  }
95 } // namespace ecaldqm
MonitorElement::Kind kind_
Definition: MESet.h:156
~MESetDet0D() override
Definition: MESetDet0D.cc:19
void reset(EcalElectronicsMapping const *, double=0., double=0., double=0.) override
Definition: MESetDet0D.cc:90
virtual void checkME_(unsigned _iME) const
Definition: MESet.h:141
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
MESet * clone(std::string const &="") const override
Definition: MESetDet0D.cc:21
double getBinContent(EcalDQMSetupObjects const, DetId const &, int=0) const override
Definition: MESetDet0D.cc:60
void throw_(std::string const &_message) const
Definition: MESet.h:149
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
void fill(EcalDQMSetupObjects const, DetId const &, double, double=0., double=0.) override
Definition: MESetDet0D.cc:30
MESetDet0D(std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind)
Definition: MESetDet0D.cc:4
EcalElectronicsMapping const * electronicsMap
Definition: MESet.h:34
Definition: DetId.h:17
unsigned findPlotIndex(EcalElectronicsMapping const *, ObjectType, DetId const &)
bool active_
Definition: MESet.h:161
binning::ObjectType otype_
Definition: MESet.h:154
binning::BinningType btype_
Definition: MESet.h:155
std::string path_
Definition: MESet.h:153
std::vector< MonitorElement * > mes_
Definition: MESet.h:151