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
virtual void setBinContent(EcalDQMSetupObjects const, DetId const &, double)
Definition: MESet.h:79
virtual std::string const & getPath() const
Definition: MESet.h:120
virtual const_iterator beginChannel(EcalElectronicsMapping const *electronicsMap) const
Definition: MESet.h:358
void setBinEntries(EcalDQMSetupObjects const edso, DetId const &_id, double _entries) override
Definition: MESetMulti.h:89
const_iterator begin(EcalElectronicsMapping const *electronicsMap) const override
Definition: MESetMulti.h:162
virtual void setBinEntries(EcalDQMSetupObjects const, DetId const &, double)
Definition: MESet.h:93
void setBinEntries(EcalDQMSetupObjects const edso, int _dcctccid, double _entries) override
Definition: MESetMulti.h:95
void setBinError(EcalDQMSetupObjects const edso, DetId const &_id, double _error) override
Definition: MESetMulti.h:70
void use(unsigned) const
Definition: MESetMulti.cc:133
MonitorElement const * getME(unsigned _iME) const override
Definition: MESetMulti.h:154
void setBinError(EcalDQMSetupObjects const edso, int _dcctccid, double _error) override
Definition: MESetMulti.h:76
void setBinError(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _error) override
Definition: MESetMulti.h:73
void setBinError(EcalDQMSetupObjects const edso, DetId const &_id, int _bin, double _error) override
Definition: MESetMulti.h:79
MESet * getCurrent() const
Definition: MESetMulti.h:158
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
bool retrieve(EcalElectronicsMapping const *, DQMStore::IGetter &, std::string *=nullptr) const override
Definition: MESetMulti.cc:102
double getBinContent(EcalDQMSetupObjects const edso, DetId const &_id, int _bin=0) const override
Definition: MESetMulti.h:111
void setBinError(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin, double _error) override
Definition: MESetMulti.h:82
void setBinContent(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin, double _content) override
Definition: MESetMulti.h:60
const_iterator beginChannel(EcalElectronicsMapping const *electronicsMap) const override
Definition: MESetMulti.h:168
unsigned getMultiplicity() const
Definition: MESetMulti.h:159
iterator end(EcalElectronicsMapping const *electronicsMap) override
Definition: MESetMulti.h:174
void fill(EcalDQMSetupObjects const edso, DetId const &_id, double _xyw=1., double _yw=1., double _w=1.) override
Definition: MESetMulti.h:29
bool isVariableBinning() const override
Definition: MESetMulti.h:151
std::map< std::string, std::vector< std::string > > ReplCandidates
Definition: MESetMulti.h:15
void setBinEntries(EcalDQMSetupObjects const edso, DetId const &_id, int _bin, double _entries) override
Definition: MESetMulti.h:98
double getBinEntries(EcalDQMSetupObjects const edso, int _dcctccid, int _bin=0) const override
Definition: MESetMulti.h:137
double getBinError(EcalDQMSetupObjects const edso, int _dcctccid, int _bin=0) const override
Definition: MESetMulti.h:127
virtual double getBinContent(EcalDQMSetupObjects const, DetId const &, int=0) const
Definition: MESet.h:100
virtual bool maskMatches(DetId const &, uint32_t, StatusManager const *, EcalTrigTowerConstituentsMap const *) const
Definition: MESet.cc:170
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:126
void setBinError(EcalDQMSetupObjects const edso, int _dcctccid, int _bin, double _error) override
Definition: MESetMulti.h:85
MESet * clone(std::string const &="") const override
Definition: MESetMulti.cc:86
void setBinContent(EcalDQMSetupObjects const edso, DetId const &_id, double _content) override
Definition: MESetMulti.h:48
void resetAll(double=0., double=0., double=0.) override
Definition: MESetMulti.cc:128
double getBinEntries(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin=0) const override
Definition: MESetMulti.h:134
virtual double getBinEntries(EcalDQMSetupObjects const, DetId const &, int=0) const
Definition: MESet.h:108
virtual void fill(EcalDQMSetupObjects const, DetId const &, double=1., double=1., double=1.)
Definition: MESet.h:74
virtual void setBinError(EcalDQMSetupObjects const, DetId const &, double)
Definition: MESet.h:86
void setBinEntries(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin, double _entries) override
Definition: MESetMulti.h:101
std::string const & getPath() const override
Definition: MESetMulti.h:153
double getBinError(EcalDQMSetupObjects const edso, DetId const &_id, int _bin=0) const override
Definition: MESetMulti.h:121
void fill(EcalDQMSetupObjects const edso, int _dcctccid, double _xyw=1., double _yw=1., double _w=1.) override
Definition: MESetMulti.h:40
~MESetMulti() override
Definition: MESetMulti.cc:59
void setBinEntries(EcalDQMSetupObjects const edso, int _dcctccid, int _bin, double _entries) override
Definition: MESetMulti.h:107
Definition: DetId.h:17
MonitorElement * getME(unsigned _iME) override
Definition: MESetMulti.h:155
std::vector< MESet * > sets_
Definition: MESetMulti.h:183
unsigned getIndex(PathReplacements const &) const
Definition: MESetMulti.cc:140
void setBinContent(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _content) override
Definition: MESetMulti.h:51
iterator begin(EcalElectronicsMapping const *electronicsMap) override
Definition: MESetMulti.h:171
double getBinEntries(EcalDQMSetupObjects const edso, DetId const &_id, int _bin=0) const override
Definition: MESetMulti.h:131
void setBinContent(EcalDQMSetupObjects const edso, int _dcctccid, double _content) override
Definition: MESetMulti.h:54
MESetMulti(MESet const &, ReplCandidates const &)
Definition: MESetMulti.cc:4
void fill(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _xyw=1., double _yw=1., double _w=1.) override
Definition: MESetMulti.h:33
void reset(EcalElectronicsMapping const *, double=0., double=0., double=0.) override
Definition: MESetMulti.cc:120
double getBinContent(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin=0) const override
Definition: MESetMulti.h:114
void book(DQMStore::IBooker &, EcalElectronicsMapping const *) override
Definition: MESetMulti.cc:95
ReplCandidates replCandidates_
Definition: MESetMulti.h:184
virtual double getBinError(EcalDQMSetupObjects const, DetId const &, int=0) const
Definition: MESet.h:104
bool maskMatches(DetId const &_id, uint32_t _mask, StatusManager const *_statusManager, EcalTrigTowerConstituentsMap const *trigTowerMap) const override
Definition: MESetMulti.h:144
void setBinContent(EcalDQMSetupObjects const edso, int _dcctccid, int _bin, double _content) override
Definition: MESetMulti.h:66
MESet & operator=(MESet const &) override
Definition: MESetMulti.cc:64
std::map< std::string, std::string > PathReplacements
Definition: MESet.h:46
const_iterator end(EcalElectronicsMapping const *electronicsMap) const override
Definition: MESetMulti.h:165
void fill(EcalDQMSetupObjects const edso, double _x, double _yw=1., double _w=1.) override
Definition: MESetMulti.h:44
void setBinEntries(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _entries) override
Definition: MESetMulti.h:92
void clear() const override
Definition: MESetMulti.cc:113
virtual bool isVariableBinning() const
Definition: MESet.h:125
void setBinContent(EcalDQMSetupObjects const edso, DetId const &_id, int _bin, double _content) override
Definition: MESetMulti.h:57
double getBinContent(EcalDQMSetupObjects const edso, int _dcctccid, int _bin=0) const override
Definition: MESetMulti.h:117
double getBinError(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin=0) const override
Definition: MESetMulti.h:124
iterator beginChannel(EcalElectronicsMapping const *electronicsMap) override
Definition: MESetMulti.h:177