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 &) override;
26  bool retrieve(DQMStore::IGetter &, std::string * = nullptr) const override;
27  void clear() const override;
28 
29  void fill(DetId const &_id, double _xyw = 1., double _yw = 1., double _w = 1.) override {
30  current_->fill(_id, _xyw, _yw, _w);
31  }
32  void fill(EcalElectronicsId const &_id, double _xyw = 1., double _yw = 1., double _w = 1.) override {
33  current_->fill(_id, _xyw, _yw, _w);
34  }
35  void fill(int _dcctccid, double _xyw = 1., double _yw = 1., double _w = 1.) override {
36  current_->fill(_dcctccid, _xyw, _yw, _w);
37  }
38  void fill(double _x, double _yw = 1., double _w = 1.) override { current_->fill(_x, _yw, _w); }
39 
40  void setBinContent(DetId const &_id, double _content) override { current_->setBinContent(_id, _content); }
41  void setBinContent(EcalElectronicsId const &_id, double _content) override {
43  }
44  void setBinContent(int _dcctccid, double _content) override { current_->setBinContent(_dcctccid, _content); }
45  void setBinContent(DetId const &_id, int _bin, double _content) override {
46  current_->setBinContent(_id, _bin, _content);
47  }
48  void setBinContent(EcalElectronicsId const &_id, int _bin, double _content) override {
49  current_->setBinContent(_id, _bin, _content);
50  }
51  void setBinContent(int _dcctccid, int _bin, double _content) override {
52  current_->setBinContent(_dcctccid, _bin, _content);
53  }
54 
55  void setBinError(DetId const &_id, double _error) override { current_->setBinError(_id, _error); }
56  void setBinError(EcalElectronicsId const &_id, double _error) override { current_->setBinError(_id, _error); }
57  void setBinError(int _dcctccid, double _error) override { current_->setBinError(_dcctccid, _error); }
58  void setBinError(DetId const &_id, int _bin, double _error) override { current_->setBinError(_id, _bin, _error); }
59  void setBinError(EcalElectronicsId const &_id, int _bin, double _error) override {
60  current_->setBinError(_id, _bin, _error);
61  }
62  void setBinError(int _dcctccid, int _bin, double _error) override {
63  current_->setBinError(_dcctccid, _bin, _error);
64  }
65 
66  void setBinEntries(DetId const &_id, double _entries) override { current_->setBinEntries(_id, _entries); }
67  void setBinEntries(EcalElectronicsId const &_id, double _entries) override {
68  current_->setBinEntries(_id, _entries);
69  }
70  void setBinEntries(int _dcctccid, double _entries) override { current_->setBinEntries(_dcctccid, _entries); }
71  void setBinEntries(DetId const &_id, int _bin, double _entries) override {
72  current_->setBinEntries(_id, _bin, _entries);
73  }
74  void setBinEntries(EcalElectronicsId const &_id, int _bin, double _entries) override {
75  current_->setBinEntries(_id, _bin, _entries);
76  }
77  void setBinEntries(int _dcctccid, int _bin, double _entries) override {
78  current_->setBinEntries(_dcctccid, _bin, _entries);
79  }
80 
81  double getBinContent(DetId const &_id, int _bin = 0) const override { return current_->getBinContent(_id, _bin); }
82  double getBinContent(EcalElectronicsId const &_id, int _bin = 0) const override {
83  return current_->getBinContent(_id, _bin);
84  }
85  double getBinContent(int _dcctccid, int _bin = 0) const override {
86  return current_->getBinContent(_dcctccid, _bin);
87  }
88 
89  double getBinError(DetId const &_id, int _bin = 0) const override { return current_->getBinError(_id, _bin); }
90  double getBinError(EcalElectronicsId const &_id, int _bin = 0) const override {
91  return current_->getBinError(_id, _bin);
92  }
93  double getBinError(int _dcctccid, int _bin = 0) const override { return current_->getBinError(_dcctccid, _bin); }
94 
95  double getBinEntries(DetId const &_id, int _bin = 0) const override { return current_->getBinEntries(_id, _bin); }
96  double getBinEntries(EcalElectronicsId const &_id, int _bin = 0) const override {
97  return current_->getBinEntries(_id, _bin);
98  }
99  double getBinEntries(int _dcctccid, int _bin = 0) const override {
100  return current_->getBinEntries(_dcctccid, _bin);
101  }
102 
103  void reset(double = 0., double = 0., double = 0.) override;
104  void resetAll(double = 0., double = 0., double = 0.) override;
105 
106  bool maskMatches(DetId const &_id, uint32_t _mask, StatusManager const *_statusManager) const override {
107  return current_ && current_->maskMatches(_id, _mask, _statusManager);
108  }
109 
110  bool isVariableBinning() const override { return current_->isVariableBinning(); }
111 
112  std::string const &getPath() const override { return current_->getPath(); }
113  MonitorElement const *getME(unsigned _iME) const override { return current_->getME(_iME); }
114  MonitorElement *getME(unsigned _iME) override { return current_->getME(_iME); }
115 
116  void use(unsigned) const;
117  MESet *getCurrent() const { return current_; }
118  unsigned getMultiplicity() const { return sets_.size(); }
119  unsigned getIndex(PathReplacements const &) const;
120 
121  const_iterator begin() const override { return const_iterator(*current_); }
122  const_iterator end() const override { return const_iterator(*current_, -1, -1); }
123  const_iterator beginChannel() const override { return current_->beginChannel(); }
124  iterator begin() override { return iterator(*current_); }
125  iterator end() override { return iterator(*current_, -1, -1); }
126  iterator beginChannel() override { return current_->beginChannel(); }
127 
128  protected:
129  mutable MESet *current_;
130  std::vector<MESet *> sets_;
132  };
133 } // namespace ecaldqm
134 
135 #endif
ecaldqm::MESetMulti::fill
void fill(int _dcctccid, double _xyw=1., double _yw=1., double _w=1.) override
Definition: MESetMulti.h:35
ecaldqm::MESetMulti::isVariableBinning
bool isVariableBinning() const override
Definition: MESetMulti.h:110
ecaldqm::MESetMulti::getBinError
double getBinError(EcalElectronicsId const &_id, int _bin=0) const override
Definition: MESetMulti.h:90
ecaldqm::MESetMulti::fill
void fill(DetId const &_id, double _xyw=1., double _yw=1., double _w=1.) override
Definition: MESetMulti.h:29
ecaldqm::MESetMulti::setBinError
void setBinError(int _dcctccid, int _bin, double _error) override
Definition: MESetMulti.h:62
ecaldqm
Definition: DQWorker.h:24
ecaldqm::MESet::getME
virtual const MonitorElement * getME(unsigned _iME) const
Definition: MESet.h:98
ecaldqm::MESetMulti::fill
void fill(double _x, double _yw=1., double _w=1.) override
Definition: MESetMulti.h:38
ecaldqm::MESet::setBinEntries
virtual void setBinEntries(DetId const &, double)
Definition: MESet.h:65
ecaldqm::MESetMulti::end
const_iterator end() const override
Definition: MESetMulti.h:122
ecaldqm::MESet::setBinError
virtual void setBinError(DetId const &, double)
Definition: MESet.h:58
ecaldqm::MESet::PathReplacements
std::map< std::string, std::string > PathReplacements
Definition: MESet.h:31
MESet.h
ecaldqm::MESetMulti::begin
const_iterator begin() const override
Definition: MESetMulti.h:121
ecaldqm::MESetMulti::getBinError
double getBinError(DetId const &_id, int _bin=0) const override
Definition: MESetMulti.h:89
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
ecaldqm::MESetMulti::replCandidates_
ReplCandidates replCandidates_
Definition: MESetMulti.h:131
ecaldqm::MESetMulti::use
void use(unsigned) const
Definition: MESetMulti.cc:130
ecaldqm::MESetMulti::MESetMulti
MESetMulti(MESet const &, ReplCandidates const &)
Definition: MESetMulti.cc:4
ecaldqm::MESetMulti::setBinEntries
void setBinEntries(DetId const &_id, double _entries) override
Definition: MESetMulti.h:66
ecaldqm::MESetMulti::beginChannel
const_iterator beginChannel() const override
Definition: MESetMulti.h:123
ecaldqm::MESetMulti::getBinContent
double getBinContent(DetId const &_id, int _bin=0) const override
Definition: MESetMulti.h:81
ecaldqm::MESetMulti::setBinEntries
void setBinEntries(DetId const &_id, int _bin, double _entries) override
Definition: MESetMulti.h:71
ecaldqm::MESet::fill
virtual void fill(DetId const &, double=1., double=1., double=1.)
Definition: MESet.h:46
DetId
Definition: DetId.h:17
ecaldqm::MESet::getBinContent
virtual double getBinContent(DetId const &, int=0) const
Definition: MESet.h:72
ecaldqm::MESetMulti::setBinContent
void setBinContent(EcalElectronicsId const &_id, double _content) override
Definition: MESetMulti.h:41
ecaldqm::MESetMulti::getIndex
unsigned getIndex(PathReplacements const &) const
Definition: MESetMulti.cc:137
ecaldqm::MESetMulti::getME
const MonitorElement * getME(unsigned _iME) const override
Definition: MESetMulti.h:113
ecaldqm::MESetMulti::getME
MonitorElement * getME(unsigned _iME) override
Definition: MESetMulti.h:114
ecaldqm::MESetMulti::resetAll
void resetAll(double=0., double=0., double=0.) override
Definition: MESetMulti.cc:125
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::book
void book(DQMStore::IBooker &) override
Definition: MESetMulti.cc:97
ecaldqm::MESetMulti::setBinEntries
void setBinEntries(EcalElectronicsId const &_id, int _bin, double _entries) override
Definition: MESetMulti.h:74
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ecaldqm::MESetMulti::getBinEntries
double getBinEntries(int _dcctccid, int _bin=0) const override
Definition: MESetMulti.h:99
ecaldqm::MESetMulti::end
iterator end() override
Definition: MESetMulti.h:125
ecaldqm::MESetMulti::fill
void fill(EcalElectronicsId const &_id, double _xyw=1., double _yw=1., double _w=1.) override
Definition: MESetMulti.h:32
ecaldqm::MESetMulti::getBinEntries
double getBinEntries(DetId const &_id, int _bin=0) const override
Definition: MESetMulti.h:95
ecaldqm::MESetMulti
Definition: MESetMulti.h:13
ecaldqm::MESetMulti::~MESetMulti
~MESetMulti() override
Definition: MESetMulti.cc:61
ecaldqm::MESetMulti::setBinEntries
void setBinEntries(int _dcctccid, int _bin, double _entries) override
Definition: MESetMulti.h:77
ecaldqm::MESetMulti::setBinContent
void setBinContent(int _dcctccid, double _content) override
Definition: MESetMulti.h:44
ecaldqm::MESetMulti::clear
void clear() const override
Definition: MESetMulti.cc:113
ecaldqm::MESetMulti::setBinError
void setBinError(int _dcctccid, double _error) override
Definition: MESetMulti.h:57
ecaldqm::MESet::iterator
Definition: MESet.h:268
ecaldqm::MESet::isVariableBinning
virtual bool isVariableBinning() const
Definition: MESet.h:97
ecaldqm::MESet::getBinError
virtual double getBinError(DetId const &, int=0) const
Definition: MESet.h:76
ecaldqm::MESetMulti::getBinEntries
double getBinEntries(EcalElectronicsId const &_id, int _bin=0) const override
Definition: MESetMulti.h:96
ecaldqm::MESetMulti::maskMatches
bool maskMatches(DetId const &_id, uint32_t _mask, StatusManager const *_statusManager) const override
Definition: MESetMulti.h:106
ecaldqm::MESetMulti::beginChannel
iterator beginChannel() override
Definition: MESetMulti.h:126
ecaldqm::MESetMulti::operator=
MESet & operator=(MESet const &) override
Definition: MESetMulti.cc:66
ecaldqm::MESet::getBinEntries
virtual double getBinEntries(DetId const &, int=0) const
Definition: MESet.h:80
ecaldqm::MESetMulti::reset
void reset(double=0., double=0., double=0.) override
Definition: MESetMulti.cc:120
ecaldqm::MESetMulti::getPath
const std::string & getPath() const override
Definition: MESetMulti.h:112
ecaldqm::MESetMulti::setBinContent
void setBinContent(DetId const &_id, int _bin, double _content) override
Definition: MESetMulti.h:45
ecaldqm::MESetMulti::sets_
std::vector< MESet * > sets_
Definition: MESetMulti.h:130
ecaldqm::MESetMulti::getBinContent
double getBinContent(int _dcctccid, int _bin=0) const override
Definition: MESetMulti.h:85
ecaldqm::StatusManager
Definition: StatusManager.h:14
ecaldqm::MESetMulti::setBinError
void setBinError(DetId const &_id, double _error) override
Definition: MESetMulti.h:55
ecaldqm::MESetMulti::getCurrent
MESet * getCurrent() const
Definition: MESetMulti.h:117
ecaldqm::MESetMulti::setBinEntries
void setBinEntries(EcalElectronicsId const &_id, double _entries) override
Definition: MESetMulti.h:67
ecaldqm::MESetMulti::begin
iterator begin() override
Definition: MESetMulti.h:124
ecaldqm::MESetMulti::retrieve
bool retrieve(DQMStore::IGetter &, std::string *=nullptr) const override
Definition: MESetMulti.cc:104
ecaldqm::MESetMulti::setBinContent
void setBinContent(int _dcctccid, int _bin, double _content) override
Definition: MESetMulti.h:51
ecaldqm::MESetMulti::setBinContent
void setBinContent(DetId const &_id, double _content) override
Definition: MESetMulti.h:40
ecaldqm::MESet::const_iterator
Definition: MESet.h:245
ecaldqm::MESetMulti::current_
MESet * current_
Definition: MESetMulti.h:129
ecaldqm::MESet::setBinContent
virtual void setBinContent(DetId const &, double)
Definition: MESet.h:51
ecaldqm::MESetMulti::setBinEntries
void setBinEntries(int _dcctccid, double _entries) override
Definition: MESetMulti.h:70
dqm::implementation::IGetter
Definition: DQMStore.h:484
ecaldqm::MESetMulti::getBinContent
double getBinContent(EcalElectronicsId const &_id, int _bin=0) const override
Definition: MESetMulti.h:82
ecaldqm::MESetMulti::setBinError
void setBinError(EcalElectronicsId const &_id, int _bin, double _error) override
Definition: MESetMulti.h:59
ecaldqm::MESetMulti::getMultiplicity
unsigned getMultiplicity() const
Definition: MESetMulti.h:118
ecaldqm::MESet::beginChannel
virtual const_iterator beginChannel() const
Definition: MESet.h:323
ecaldqm::MESetMulti::setBinError
void setBinError(DetId const &_id, int _bin, double _error) override
Definition: MESetMulti.h:58
ecaldqm::MESet::getPath
virtual const std::string & getPath() const
Definition: MESet.h:92
dqm::implementation::IBooker
Definition: DQMStore.h:43
ecaldqm::MESetMulti::setBinError
void setBinError(EcalElectronicsId const &_id, double _error) override
Definition: MESetMulti.h:56
ecaldqm::MESet::maskMatches
virtual bool maskMatches(DetId const &, uint32_t, StatusManager const *) const
Definition: MESet.cc:167
btvTracks_cfi._content
_content
Definition: btvTracks_cfi.py:5
ecaldqm::MESetMulti::getBinError
double getBinError(int _dcctccid, int _bin=0) const override
Definition: MESetMulti.h:93
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::setBinContent
void setBinContent(EcalElectronicsId const &_id, int _bin, double _content) override
Definition: MESetMulti.h:48
ecaldqm::MESet
Definition: MESet.h:27