MESetEcal

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
#ifndef MESetEcal_H
#define MESetEcal_H

#include "MESet.h"

namespace ecaldqm {

  /* class MESetEcal
   implements plot <-> detector part relationship
   base class for channel-binned histograms
   MESetEcal is only filled given an object identifier and a bin (channel id
   does not give a bin)
*/

  class MESetEcal : public MESet {
  public:
    MESetEcal(std::string const &,
              binning::ObjectType,
              binning::BinningType,
              MonitorElement::Kind,
              unsigned,
              binning::AxisSpecs const * = nullptr,
              binning::AxisSpecs const * = nullptr,
              binning::AxisSpecs const * = nullptr);
    MESetEcal(MESetEcal const &);
    ~MESetEcal() override;

    MESet &operator=(MESet const &) override;

    MESet *clone(std::string const & = "") const override;

    void book(DQMStore::IBooker &, EcalElectronicsMapping const *) override;
    bool retrieve(EcalElectronicsMapping const *, DQMStore::IGetter &, std::string * = nullptr) const override;

    void fill(EcalDQMSetupObjects const, DetId const &, double = 1., double = 1., double = 1.) override;
    void fill(EcalDQMSetupObjects const, EcalElectronicsId const &, double = 1., double = 1., double = 1.) override;
    void fill(EcalDQMSetupObjects const, int, double = 1., double = 1., double = 1.) override;
    void fill(EcalDQMSetupObjects const, double, double = 1., double = 1.) override;

    void setBinContent(EcalDQMSetupObjects const, DetId const &, int, double) override;
    void setBinContent(EcalDQMSetupObjects const, EcalElectronicsId const &, int, double) override;
    void setBinContent(EcalDQMSetupObjects const, int, int, double) override;

    void setBinError(EcalDQMSetupObjects const, DetId const &, int, double) override;
    void setBinError(EcalDQMSetupObjects const, EcalElectronicsId const &, int, double) override;
    void setBinError(EcalDQMSetupObjects const, int, int, double) override;

    void setBinEntries(EcalDQMSetupObjects const, DetId const &, int, double) override;
    void setBinEntries(EcalDQMSetupObjects const, EcalElectronicsId const &, int, double) override;
    void setBinEntries(EcalDQMSetupObjects const, int, int, double) override;

    double getBinContent(EcalDQMSetupObjects const, DetId const &, int) const override;
    double getBinContent(EcalDQMSetupObjects const, EcalElectronicsId const &, int) const override;
    double getBinContent(EcalDQMSetupObjects const, int, int) const override;

    double getBinError(EcalDQMSetupObjects const, DetId const &, int) const override;
    double getBinError(EcalDQMSetupObjects const, EcalElectronicsId const &, int) const override;
    double getBinError(EcalDQMSetupObjects const, int, int) const override;

    double getBinEntries(EcalDQMSetupObjects const, DetId const &, int) const override;
    double getBinEntries(EcalDQMSetupObjects const, EcalElectronicsId const &, int) const override;
    double getBinEntries(EcalDQMSetupObjects const, int, int) const override;

    virtual int findBin(EcalDQMSetupObjects const, DetId const &, double, double = 0.) const;
    virtual int findBin(EcalDQMSetupObjects const, EcalElectronicsId const &, double, double = 0.) const;
    virtual int findBin(EcalDQMSetupObjects const, int, double, double = 0.) const;

    bool isVariableBinning() const override;

    std::vector<std::string> generatePaths(EcalElectronicsMapping const *) const;

  protected:
    unsigned logicalDimensions_;
    binning::AxisSpecs const *xaxis_;
    binning::AxisSpecs const *yaxis_;
    binning::AxisSpecs const *zaxis_;

  private:
    template <class Bookable>
    void doBook_(Bookable &);
  };

}  // namespace ecaldqm

#endif