CMS 3D CMS Logo

MESetMulti.h
Go to the documentation of this file.
1 #ifndef MESetMulti_H
2 #define MESetMulti_H
3 
4 #include "MESet.h"
5 
6 namespace ecaldqm {
7  /* class MESetMulti
8  wrapper for a set of MESets
9  limit() filters out unused MESets
10  use() method sets the MESet to be used
11 */
12 
13  class MESetMulti : public MESet {
14  public:
15  typedef std::map<std::string, std::vector<std::string>> ReplCandidates;
16 
17  MESetMulti(MESet const &, ReplCandidates const &);
18  MESetMulti(MESetMulti const &);
19  ~MESetMulti() override;
20 
21  MESet &operator=(MESet const &) override;
22 
23  MESet *clone(std::string const & = "") const override;
24 
25  void book(DQMStore::IBooker &, EcalElectronicsMapping const *) override;
26  bool retrieve(EcalElectronicsMapping const *, DQMStore::IGetter &, std::string * = nullptr) const override;
27  void clear() const override;
28 
29  void fill(
30  EcalDQMSetupObjects const edso, DetId const &_id, double _xyw = 1., double _yw = 1., double _w = 1.) override {
31  current_->fill(edso, _id, _xyw, _yw, _w);
32  }
33  void fill(EcalDQMSetupObjects const edso,
34  EcalElectronicsId const &_id,
35  double _xyw = 1.,
36  double _yw = 1.,
37  double _w = 1.) override {
38  current_->fill(edso, _id, _xyw, _yw, _w);
39  }
40  void fill(
41  EcalDQMSetupObjects const edso, int _dcctccid, double _xyw = 1., double _yw = 1., double _w = 1.) override {
42  current_->fill(edso, _dcctccid, _xyw, _yw, _w);
43  }
44  void fill(EcalDQMSetupObjects const edso, double _x, double _yw = 1., double _w = 1.) override {
45  current_->fill(edso, _x, _yw, _w);
46  }
47 
48  void setBinContent(EcalDQMSetupObjects const edso, DetId const &_id, double _content) override {
49  current_->setBinContent(edso, _id, _content);
50  }
51  void setBinContent(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _content) override {
52  current_->setBinContent(edso, _id, _content);
53  }
54  void setBinContent(EcalDQMSetupObjects const edso, int _dcctccid, double _content) override {
55  current_->setBinContent(edso, _dcctccid, _content);
56  }
57  void setBinContent(EcalDQMSetupObjects const edso, DetId const &_id, int _bin, double _content) override {
58  current_->setBinContent(edso, _id, _bin, _content);
59  }
61  EcalElectronicsId const &_id,
62  int _bin,
63  double _content) override {
64  current_->setBinContent(edso, _id, _bin, _content);
65  }
66  void setBinContent(EcalDQMSetupObjects const edso, int _dcctccid, int _bin, double _content) override {
67  current_->setBinContent(edso, _dcctccid, _bin, _content);
68  }
69 
70  void setBinError(EcalDQMSetupObjects const edso, DetId const &_id, double _error) override {
71  current_->setBinError(edso, _id, _error);
72  }
73  void setBinError(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _error) override {
74  current_->setBinError(edso, _id, _error);
75  }
76  void setBinError(EcalDQMSetupObjects const edso, int _dcctccid, double _error) override {
77  current_->setBinError(edso, _dcctccid, _error);
78  }
79  void setBinError(EcalDQMSetupObjects const edso, DetId const &_id, int _bin, double _error) override {
80  current_->setBinError(edso, _id, _bin, _error);
81  }
82  void setBinError(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin, double _error) override {
83  current_->setBinError(edso, _id, _bin, _error);
84  }
85  void setBinError(EcalDQMSetupObjects const edso, int _dcctccid, int _bin, double _error) override {
86  current_->setBinError(edso, _dcctccid, _bin, _error);
87  }
88 
89  void setBinEntries(EcalDQMSetupObjects const edso, DetId const &_id, double _entries) override {
90  current_->setBinEntries(edso, _id, _entries);
91  }
92  void setBinEntries(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _entries) override {
93  current_->setBinEntries(edso, _id, _entries);
94  }
95  void setBinEntries(EcalDQMSetupObjects const edso, int _dcctccid, double _entries) override {
96  current_->setBinEntries(edso, _dcctccid, _entries);
97  }
98  void setBinEntries(EcalDQMSetupObjects const edso, DetId const &_id, int _bin, double _entries) override {
99  current_->setBinEntries(edso, _id, _bin, _entries);
100  }
102  EcalElectronicsId const &_id,
103  int _bin,
104  double _entries) override {
105  current_->setBinEntries(edso, _id, _bin, _entries);
106  }
107  void setBinEntries(EcalDQMSetupObjects const edso, int _dcctccid, int _bin, double _entries) override {
108  current_->setBinEntries(edso, _dcctccid, _bin, _entries);
109  }
110 
111  double getBinContent(EcalDQMSetupObjects const edso, DetId const &_id, int _bin = 0) const override {
112  return current_->getBinContent(edso, _id, _bin);
113  }
114  double getBinContent(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin = 0) const override {
115  return current_->getBinContent(edso, _id, _bin);
116  }
117  double getBinContent(EcalDQMSetupObjects const edso, int _dcctccid, int _bin = 0) const override {
118  return current_->getBinContent(edso, _dcctccid, _bin);
119  }
120 
121  double getBinError(EcalDQMSetupObjects const edso, DetId const &_id, int _bin = 0) const override {
122  return current_->getBinError(edso, _id, _bin);
123  }
124  double getBinError(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin = 0) const override {
125  return current_->getBinError(edso, _id, _bin);
126  }
127  double getBinError(EcalDQMSetupObjects const edso, int _dcctccid, int _bin = 0) const override {
128  return current_->getBinError(edso, _dcctccid, _bin);
129  }
130 
131  double getBinEntries(EcalDQMSetupObjects const edso, DetId const &_id, int _bin = 0) const override {
132  return current_->getBinEntries(edso, _id, _bin);
133  }
134  double getBinEntries(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin = 0) const override {
135  return current_->getBinEntries(edso, _id, _bin);
136  }
137  double getBinEntries(EcalDQMSetupObjects const edso, int _dcctccid, int _bin = 0) const override {
138  return current_->getBinEntries(edso, _dcctccid, _bin);
139  }
140 
141  void reset(EcalElectronicsMapping const *, double = 0., double = 0., double = 0.) override;
142  void resetAll(double = 0., double = 0., double = 0.) override;
143 
144  bool maskMatches(DetId const &_id,
145  uint32_t _mask,
146  StatusManager const *_statusManager,
147  EcalTrigTowerConstituentsMap const *trigTowerMap) const override {
148  return current_ && current_->maskMatches(_id, _mask, _statusManager, trigTowerMap);
149  }
150 
151  bool isVariableBinning() const override { return current_->isVariableBinning(); }
152 
153  std::string const &getPath() const override { return current_->getPath(); }
154  MonitorElement const *getME(unsigned _iME) const override { return current_->getME(_iME); }
155  MonitorElement *getME(unsigned _iME) override { return current_->getME(_iME); }
156 
157  void use(unsigned) const;
158  MESet *getCurrent() const { return current_; }
159  unsigned getMultiplicity() const { return sets_.size(); }
160  unsigned getIndex(PathReplacements const &) const;
161 
162  const_iterator begin(EcalElectronicsMapping const *electronicsMap) const override {
163  return const_iterator(electronicsMap, *current_);
164  }
165  const_iterator end(EcalElectronicsMapping const *electronicsMap) const override {
166  return const_iterator(electronicsMap, *current_, -1, -1);
167  }
168  const_iterator beginChannel(EcalElectronicsMapping const *electronicsMap) const override {
169  return current_->beginChannel(electronicsMap);
170  }
171  iterator begin(EcalElectronicsMapping const *electronicsMap) override {
172  return iterator(electronicsMap, *current_);
173  }
174  iterator end(EcalElectronicsMapping const *electronicsMap) override {
175  return iterator(electronicsMap, *current_, -1, -1);
176  }
177  iterator beginChannel(EcalElectronicsMapping const *electronicsMap) override {
178  return current_->beginChannel(electronicsMap);
179  }
180 
181  protected:
182  mutable MESet *current_;
183  std::vector<MESet *> sets_;
185  };
186 } // namespace ecaldqm
187 
188 #endif
ecaldqm::MESet::getBinError
virtual double getBinError(EcalDQMSetupObjects const, DetId const &, int=0) const
Definition: MESet.h:104
ecaldqm::MESetMulti::isVariableBinning
bool isVariableBinning() const override
Definition: MESetMulti.h:151
EcalElectronicsMapping
Definition: EcalElectronicsMapping.h:28
ecaldqm::MESetMulti::setBinEntries
void setBinEntries(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin, double _entries) override
Definition: MESetMulti.h:101
ecaldqm::MESetMulti::reset
void reset(EcalElectronicsMapping const *, double=0., double=0., double=0.) override
Definition: MESetMulti.cc:122
ecaldqm::MESetMulti::beginChannel
const_iterator beginChannel(EcalElectronicsMapping const *electronicsMap) const override
Definition: MESetMulti.h:168
ecaldqm
Definition: DQWorker.h:37
ecaldqm::MESet::getME
virtual const MonitorElement * getME(unsigned _iME) const
Definition: MESet.h:126
ecaldqm::MESetMulti::setBinContent
void setBinContent(EcalDQMSetupObjects const edso, DetId const &_id, double _content) override
Definition: MESetMulti.h:48
ecaldqm::MESet::setBinContent
virtual void setBinContent(EcalDQMSetupObjects const, DetId const &, double)
Definition: MESet.h:79
ecaldqm::MESet::getBinContent
virtual double getBinContent(EcalDQMSetupObjects const, DetId const &, int=0) const
Definition: MESet.h:100
ecaldqm::MESet::fill
virtual void fill(EcalDQMSetupObjects const, DetId const &, double=1., double=1., double=1.)
Definition: MESet.h:74
ecaldqm::MESetMulti::getBinError
double getBinError(EcalDQMSetupObjects const edso, int _dcctccid, int _bin=0) const override
Definition: MESetMulti.h:127
ecaldqm::MESet::PathReplacements
std::map< std::string, std::string > PathReplacements
Definition: MESet.h:46
MESet.h
ecaldqm::MESetMulti::fill
void fill(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _xyw=1., double _yw=1., double _w=1.) override
Definition: MESetMulti.h:33
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
ecaldqm::MESetMulti::replCandidates_
ReplCandidates replCandidates_
Definition: MESetMulti.h:184
ecaldqm::MESetMulti::use
void use(unsigned) const
Definition: MESetMulti.cc:135
ecaldqm::MESetMulti::setBinContent
void setBinContent(EcalDQMSetupObjects const edso, DetId const &_id, int _bin, double _content) override
Definition: MESetMulti.h:57
ecaldqm::MESet::maskMatches
virtual bool maskMatches(DetId const &, uint32_t, StatusManager const *, EcalTrigTowerConstituentsMap const *) const
Definition: MESet.cc:170
ecaldqm::MESetMulti::MESetMulti
MESetMulti(MESet const &, ReplCandidates const &)
Definition: MESetMulti.cc:4
ecaldqm::MESetMulti::end
iterator end(EcalElectronicsMapping const *electronicsMap) override
Definition: MESetMulti.h:174
ecaldqm::MESetMulti::setBinEntries
void setBinEntries(EcalDQMSetupObjects const edso, int _dcctccid, int _bin, double _entries) override
Definition: MESetMulti.h:107
DetId
Definition: DetId.h:17
ecaldqm::MESet::getBinEntries
virtual double getBinEntries(EcalDQMSetupObjects const, DetId const &, int=0) const
Definition: MESet.h:108
ecaldqm::MESetMulti::setBinError
void setBinError(EcalDQMSetupObjects const edso, int _dcctccid, int _bin, double _error) override
Definition: MESetMulti.h:85
ecaldqm::MESetMulti::setBinContent
void setBinContent(EcalDQMSetupObjects const edso, int _dcctccid, double _content) override
Definition: MESetMulti.h:54
ecaldqm::MESetMulti::begin
const_iterator begin(EcalElectronicsMapping const *electronicsMap) const override
Definition: MESetMulti.h:162
ecaldqm::MESetMulti::getBinEntries
double getBinEntries(EcalDQMSetupObjects const edso, DetId const &_id, int _bin=0) const override
Definition: MESetMulti.h:131
ecaldqm::MESetMulti::getIndex
unsigned getIndex(PathReplacements const &) const
Definition: MESetMulti.cc:142
ecaldqm::MESetMulti::getME
const MonitorElement * getME(unsigned _iME) const override
Definition: MESetMulti.h:154
ecaldqm::MESetMulti::fill
void fill(EcalDQMSetupObjects const edso, double _x, double _yw=1., double _w=1.) override
Definition: MESetMulti.h:44
ecaldqm::MESetMulti::getME
MonitorElement * getME(unsigned _iME) override
Definition: MESetMulti.h:155
ecaldqm::MESetMulti::getBinContent
double getBinContent(EcalDQMSetupObjects const edso, int _dcctccid, int _bin=0) const override
Definition: MESetMulti.h:117
ecaldqm::MESetMulti::resetAll
void resetAll(double=0., double=0., double=0.) override
Definition: MESetMulti.cc:130
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::MESetMulti::getBinContent
double getBinContent(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin=0) const override
Definition: MESetMulti.h:114
ecaldqm::MESetMulti::setBinContent
void setBinContent(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _content) override
Definition: MESetMulti.h:51
EcalTrigTowerConstituentsMap
Definition: EcalTrigTowerConstituentsMap.h:19
ecaldqm::MESetMulti::setBinError
void setBinError(EcalDQMSetupObjects const edso, DetId const &_id, int _bin, double _error) override
Definition: MESetMulti.h:79
ecaldqm::MESetMulti::setBinError
void setBinError(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _error) override
Definition: MESetMulti.h:73
ecaldqm::MESetMulti
Definition: MESetMulti.h:13
ecaldqm::MESetMulti::~MESetMulti
~MESetMulti() override
Definition: MESetMulti.cc:61
ecaldqm::MESetMulti::clear
void clear() const override
Definition: MESetMulti.cc:115
ecaldqm::EcalDQMSetupObjects
Definition: MESet.h:33
ecaldqm::MESet::iterator
Definition: MESet.h:297
ecaldqm::MESet::isVariableBinning
virtual bool isVariableBinning() const
Definition: MESet.h:125
ecaldqm::MESetMulti::maskMatches
bool maskMatches(DetId const &_id, uint32_t _mask, StatusManager const *_statusManager, EcalTrigTowerConstituentsMap const *trigTowerMap) const override
Definition: MESetMulti.h:144
ecaldqm::MESetMulti::setBinError
void setBinError(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin, double _error) override
Definition: MESetMulti.h:82
ecaldqm::MESetMulti::operator=
MESet & operator=(MESet const &) override
Definition: MESetMulti.cc:66
ecaldqm::MESet::setBinEntries
virtual void setBinEntries(EcalDQMSetupObjects const, DetId const &, double)
Definition: MESet.h:93
ecaldqm::MESetMulti::beginChannel
iterator beginChannel(EcalElectronicsMapping const *electronicsMap) override
Definition: MESetMulti.h:177
ecaldqm::MESetMulti::getBinError
double getBinError(EcalDQMSetupObjects const edso, DetId const &_id, int _bin=0) const override
Definition: MESetMulti.h:121
ecaldqm::MESetMulti::setBinError
void setBinError(EcalDQMSetupObjects const edso, DetId const &_id, double _error) override
Definition: MESetMulti.h:70
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ecaldqm::MESetMulti::setBinError
void setBinError(EcalDQMSetupObjects const edso, int _dcctccid, double _error) override
Definition: MESetMulti.h:76
ecaldqm::MESetMulti::getBinEntries
double getBinEntries(EcalDQMSetupObjects const edso, int _dcctccid, int _bin=0) const override
Definition: MESetMulti.h:137
ecaldqm::MESetMulti::getBinError
double getBinError(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin=0) const override
Definition: MESetMulti.h:124
ecaldqm::MESetMulti::getPath
const std::string & getPath() const override
Definition: MESetMulti.h:153
ecaldqm::MESetMulti::sets_
std::vector< MESet * > sets_
Definition: MESetMulti.h:183
ecaldqm::StatusManager
Definition: StatusManager.h:16
ecaldqm::MESet::setBinError
virtual void setBinError(EcalDQMSetupObjects const, DetId const &, double)
Definition: MESet.h:86
ecaldqm::MESetMulti::setBinContent
void setBinContent(EcalDQMSetupObjects const edso, int _dcctccid, int _bin, double _content) override
Definition: MESetMulti.h:66
ecaldqm::MESetMulti::getCurrent
MESet * getCurrent() const
Definition: MESetMulti.h:158
ecaldqm::MESet::const_iterator
Definition: MESet.h:273
ecaldqm::MESetMulti::setBinContent
void setBinContent(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin, double _content) override
Definition: MESetMulti.h:60
ecaldqm::MESetMulti::end
const_iterator end(EcalElectronicsMapping const *electronicsMap) const override
Definition: MESetMulti.h:165
ecaldqm::MESetMulti::getBinEntries
double getBinEntries(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin=0) const override
Definition: MESetMulti.h:134
ecaldqm::MESetMulti::current_
MESet * current_
Definition: MESetMulti.h:182
ecaldqm::MESetMulti::retrieve
bool retrieve(EcalElectronicsMapping const *, DQMStore::IGetter &, std::string *=nullptr) const override
Definition: MESetMulti.cc:104
ecaldqm::MESetMulti::begin
iterator begin(EcalElectronicsMapping const *electronicsMap) override
Definition: MESetMulti.h:171
ecaldqm::MESetMulti::setBinEntries
void setBinEntries(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _entries) override
Definition: MESetMulti.h:92
dqm::implementation::IGetter
Definition: DQMStore.h:484
ecaldqm::MESet::beginChannel
virtual const_iterator beginChannel(EcalElectronicsMapping const *electronicsMap) const
Definition: MESet.h:358
ecaldqm::MESetMulti::getMultiplicity
unsigned getMultiplicity() const
Definition: MESetMulti.h:159
ecaldqm::MESetMulti::setBinEntries
void setBinEntries(EcalDQMSetupObjects const edso, int _dcctccid, double _entries) override
Definition: MESetMulti.h:95
ecaldqm::MESet::getPath
virtual const std::string & getPath() const
Definition: MESet.h:120
dqm::implementation::IBooker
Definition: DQMStore.h:43
ecaldqm::MESetMulti::fill
void fill(EcalDQMSetupObjects const edso, int _dcctccid, double _xyw=1., double _yw=1., double _w=1.) override
Definition: MESetMulti.h:40
ecaldqm::MESetMulti::fill
void fill(EcalDQMSetupObjects const edso, DetId const &_id, double _xyw=1., double _yw=1., double _w=1.) override
Definition: MESetMulti.h:29
ecaldqm::MESetMulti::setBinEntries
void setBinEntries(EcalDQMSetupObjects const edso, DetId const &_id, double _entries) override
Definition: MESetMulti.h:89
ecaldqm::MESetMulti::book
void book(DQMStore::IBooker &, EcalElectronicsMapping const *) override
Definition: MESetMulti.cc:97
btvTracks_cfi._content
_content
Definition: btvTracks_cfi.py:5
ecaldqm::MESetMulti::clone
MESet * clone(std::string const &="") const override
Definition: MESetMulti.cc:88
ecaldqm::MESetMulti::ReplCandidates
std::map< std::string, std::vector< std::string > > ReplCandidates
Definition: MESetMulti.h:15
ecaldqm::MESetMulti::getBinContent
double getBinContent(EcalDQMSetupObjects const edso, DetId const &_id, int _bin=0) const override
Definition: MESetMulti.h:111
ecaldqm::MESetMulti::setBinEntries
void setBinEntries(EcalDQMSetupObjects const edso, DetId const &_id, int _bin, double _entries) override
Definition: MESetMulti.h:98
ecaldqm::MESet
Definition: MESet.h:42