Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-03-17 23:26:15

0001 #ifndef MESetMulti_H
0002 #define MESetMulti_H
0003 
0004 #include "MESet.h"
0005 
0006 namespace ecaldqm {
0007   /* class MESetMulti
0008    wrapper for a set of MESets
0009    limit() filters out unused MESets
0010    use() method sets the MESet to be used
0011 */
0012 
0013   class MESetMulti : public MESet {
0014   public:
0015     typedef std::map<std::string, std::vector<std::string>> ReplCandidates;
0016 
0017     MESetMulti(MESet const &, ReplCandidates const &);
0018     MESetMulti(MESetMulti const &);
0019     ~MESetMulti() override;
0020 
0021     MESet &operator=(MESet const &) override;
0022 
0023     MESet *clone(std::string const & = "") const override;
0024 
0025     void book(DQMStore::IBooker &, EcalElectronicsMapping const *) override;
0026     bool retrieve(EcalElectronicsMapping const *, DQMStore::IGetter &, std::string * = nullptr) const override;
0027     void clear() const override;
0028 
0029     void fill(
0030         EcalDQMSetupObjects const edso, DetId const &_id, double _xyw = 1., double _yw = 1., double _w = 1.) override {
0031       current_->fill(edso, _id, _xyw, _yw, _w);
0032     }
0033     void fill(EcalDQMSetupObjects const edso,
0034               EcalElectronicsId const &_id,
0035               double _xyw = 1.,
0036               double _yw = 1.,
0037               double _w = 1.) override {
0038       current_->fill(edso, _id, _xyw, _yw, _w);
0039     }
0040     void fill(
0041         EcalDQMSetupObjects const edso, int _dcctccid, double _xyw = 1., double _yw = 1., double _w = 1.) override {
0042       current_->fill(edso, _dcctccid, _xyw, _yw, _w);
0043     }
0044     void fill(EcalDQMSetupObjects const edso, double _x, double _yw = 1., double _w = 1.) override {
0045       current_->fill(edso, _x, _yw, _w);
0046     }
0047 
0048     void setBinContent(EcalDQMSetupObjects const edso, DetId const &_id, double _content) override {
0049       current_->setBinContent(edso, _id, _content);
0050     }
0051     void setBinContent(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _content) override {
0052       current_->setBinContent(edso, _id, _content);
0053     }
0054     void setBinContent(EcalDQMSetupObjects const edso, int _dcctccid, double _content) override {
0055       current_->setBinContent(edso, _dcctccid, _content);
0056     }
0057     void setBinContent(EcalDQMSetupObjects const edso, DetId const &_id, int _bin, double _content) override {
0058       current_->setBinContent(edso, _id, _bin, _content);
0059     }
0060     void setBinContent(EcalDQMSetupObjects const edso,
0061                        EcalElectronicsId const &_id,
0062                        int _bin,
0063                        double _content) override {
0064       current_->setBinContent(edso, _id, _bin, _content);
0065     }
0066     void setBinContent(EcalDQMSetupObjects const edso, int _dcctccid, int _bin, double _content) override {
0067       current_->setBinContent(edso, _dcctccid, _bin, _content);
0068     }
0069 
0070     void setBinError(EcalDQMSetupObjects const edso, DetId const &_id, double _error) override {
0071       current_->setBinError(edso, _id, _error);
0072     }
0073     void setBinError(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _error) override {
0074       current_->setBinError(edso, _id, _error);
0075     }
0076     void setBinError(EcalDQMSetupObjects const edso, int _dcctccid, double _error) override {
0077       current_->setBinError(edso, _dcctccid, _error);
0078     }
0079     void setBinError(EcalDQMSetupObjects const edso, DetId const &_id, int _bin, double _error) override {
0080       current_->setBinError(edso, _id, _bin, _error);
0081     }
0082     void setBinError(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin, double _error) override {
0083       current_->setBinError(edso, _id, _bin, _error);
0084     }
0085     void setBinError(EcalDQMSetupObjects const edso, int _dcctccid, int _bin, double _error) override {
0086       current_->setBinError(edso, _dcctccid, _bin, _error);
0087     }
0088 
0089     void setBinEntries(EcalDQMSetupObjects const edso, DetId const &_id, double _entries) override {
0090       current_->setBinEntries(edso, _id, _entries);
0091     }
0092     void setBinEntries(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _entries) override {
0093       current_->setBinEntries(edso, _id, _entries);
0094     }
0095     void setBinEntries(EcalDQMSetupObjects const edso, int _dcctccid, double _entries) override {
0096       current_->setBinEntries(edso, _dcctccid, _entries);
0097     }
0098     void setBinEntries(EcalDQMSetupObjects const edso, DetId const &_id, int _bin, double _entries) override {
0099       current_->setBinEntries(edso, _id, _bin, _entries);
0100     }
0101     void setBinEntries(EcalDQMSetupObjects const edso,
0102                        EcalElectronicsId const &_id,
0103                        int _bin,
0104                        double _entries) override {
0105       current_->setBinEntries(edso, _id, _bin, _entries);
0106     }
0107     void setBinEntries(EcalDQMSetupObjects const edso, int _dcctccid, int _bin, double _entries) override {
0108       current_->setBinEntries(edso, _dcctccid, _bin, _entries);
0109     }
0110 
0111     double getBinContent(EcalDQMSetupObjects const edso, DetId const &_id, int _bin = 0) const override {
0112       return current_->getBinContent(edso, _id, _bin);
0113     }
0114     double getBinContent(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin = 0) const override {
0115       return current_->getBinContent(edso, _id, _bin);
0116     }
0117     double getBinContent(EcalDQMSetupObjects const edso, int _dcctccid, int _bin = 0) const override {
0118       return current_->getBinContent(edso, _dcctccid, _bin);
0119     }
0120 
0121     double getBinError(EcalDQMSetupObjects const edso, DetId const &_id, int _bin = 0) const override {
0122       return current_->getBinError(edso, _id, _bin);
0123     }
0124     double getBinError(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin = 0) const override {
0125       return current_->getBinError(edso, _id, _bin);
0126     }
0127     double getBinError(EcalDQMSetupObjects const edso, int _dcctccid, int _bin = 0) const override {
0128       return current_->getBinError(edso, _dcctccid, _bin);
0129     }
0130 
0131     double getBinEntries(EcalDQMSetupObjects const edso, DetId const &_id, int _bin = 0) const override {
0132       return current_->getBinEntries(edso, _id, _bin);
0133     }
0134     double getBinEntries(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _bin = 0) const override {
0135       return current_->getBinEntries(edso, _id, _bin);
0136     }
0137     double getBinEntries(EcalDQMSetupObjects const edso, int _dcctccid, int _bin = 0) const override {
0138       return current_->getBinEntries(edso, _dcctccid, _bin);
0139     }
0140 
0141     void reset(EcalElectronicsMapping const *, double = 0., double = 0., double = 0.) override;
0142     void resetAll(double = 0., double = 0., double = 0.) override;
0143 
0144     bool maskMatches(DetId const &_id,
0145                      uint32_t _mask,
0146                      StatusManager const *_statusManager,
0147                      EcalTrigTowerConstituentsMap const *trigTowerMap) const override {
0148       return current_ && current_->maskMatches(_id, _mask, _statusManager, trigTowerMap);
0149     }
0150 
0151     bool isVariableBinning() const override { return current_->isVariableBinning(); }
0152 
0153     std::string const &getPath() const override { return current_->getPath(); }
0154     MonitorElement const *getME(unsigned _iME) const override { return current_->getME(_iME); }
0155     MonitorElement *getME(unsigned _iME) override { return current_->getME(_iME); }
0156 
0157     void use(unsigned) const;
0158     MESet *getCurrent() const { return current_; }
0159     unsigned getMultiplicity() const { return sets_.size(); }
0160     unsigned getIndex(PathReplacements const &) const;
0161 
0162     const_iterator begin(EcalElectronicsMapping const *electronicsMap) const override {
0163       return const_iterator(electronicsMap, *current_);
0164     }
0165     const_iterator end(EcalElectronicsMapping const *electronicsMap) const override {
0166       return const_iterator(electronicsMap, *current_, -1, -1);
0167     }
0168     const_iterator beginChannel(EcalElectronicsMapping const *electronicsMap) const override {
0169       return current_->beginChannel(electronicsMap);
0170     }
0171     iterator begin(EcalElectronicsMapping const *electronicsMap) override {
0172       return iterator(electronicsMap, *current_);
0173     }
0174     iterator end(EcalElectronicsMapping const *electronicsMap) override {
0175       return iterator(electronicsMap, *current_, -1, -1);
0176     }
0177     iterator beginChannel(EcalElectronicsMapping const *electronicsMap) override {
0178       return current_->beginChannel(electronicsMap);
0179     }
0180 
0181   protected:
0182     mutable MESet *current_;
0183     std::vector<MESet *> sets_;
0184     ReplCandidates replCandidates_;
0185   };
0186 }  // namespace ecaldqm
0187 
0188 #endif