CMS 3D CMS Logo

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
EcalElectronicsMapping
Definition: EcalElectronicsMapping.h:28
ecaldqm::MESet::throw_
void throw_(std::string const &_message) const
Definition: MESet.h:149
ecaldqm
Definition: DQWorker.h:29
ecaldqm::MESetDet0D::reset
void reset(EcalElectronicsMapping const *, double=0., double=0., double=0.) override
Definition: MESetDet0D.cc:90
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
ecaldqm::MESetEcal
Definition: MESetEcal.h:15
DetId
Definition: DetId.h:17
MESetDet0D.h
ecaldqm::MESet::otype_
binning::ObjectType otype_
Definition: MESet.h:154
EcalElectronicsId
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
Definition: EcalElectronicsId.h:18
ecaldqm::MESet::active_
bool active_
Definition: MESet.h:161
ecaldqm::MESetDet0D::~MESetDet0D
~MESetDet0D() override
Definition: MESetDet0D.cc:19
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ecaldqm::MESetDet0D::getBinContent
double getBinContent(EcalDQMSetupObjects const, DetId const &, int=0) const override
Definition: MESetDet0D.cc:60
ecaldqm::binning::ObjectType
ObjectType
Definition: MESetBinningUtils.h:18
ecaldqm::EcalDQMSetupObjects
Definition: MESet.h:33
ecaldqm::MESet::btype_
binning::BinningType btype_
Definition: MESet.h:155
MonitorElementData::Kind
Kind
Definition: MonitorElementCollection.h:129
ecaldqm::MESet::path_
std::string path_
Definition: MESet.h:153
ecaldqm::MESetDet0D
Definition: MESetDet0D.h:13
HcalObjRepresent::Fill
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:1053
ecaldqm::MESet::mes_
std::vector< MonitorElement * > mes_
Definition: MESet.h:151
ecaldqm::EcalDQMSetupObjects::electronicsMap
const EcalElectronicsMapping * electronicsMap
Definition: MESet.h:34
ecaldqm::MESet::checkME_
virtual void checkME_(unsigned _iME) const
Definition: MESet.h:141
ecaldqm::MESetDet0D::clone
MESet * clone(std::string const &="") const override
Definition: MESetDet0D.cc:21
ecaldqm::binning::findPlotIndex
unsigned findPlotIndex(EcalElectronicsMapping const *, ObjectType, DetId const &)
Definition: MESetBinningUtils.cc:316
ecaldqm::MESetDet0D::fill
void fill(EcalDQMSetupObjects const, DetId const &, double, double=0., double=0.) override
Definition: MESetDet0D.cc:30
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
ecaldqm::binning::BinningType
BinningType
Definition: MESetBinningUtils.h:41
ecaldqm::MESet::kind_
MonitorElement::Kind kind_
Definition: MESet.h:156
ecaldqm::MESetDet0D::MESetDet0D
MESetDet0D(std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind)
Definition: MESetDet0D.cc:4
MonitorElementData::Kind::REAL
ecaldqm::MESet
Definition: MESet.h:42