Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-09 23:01:15

0001 #ifndef Container2D_h
0002 #define Container2D_h
0003 
0004 /*
0005  *      file:           Container2D.h
0006  *      Author:         Viktor Khristenko
0007  *
0008  *      Description:
0009  *              Container to hold TH2D or like
0010  *
0011  */
0012 
0013 #include "DQM/HcalCommon/interface/Container1D.h"
0014 
0015 #include <string>
0016 #include <vector>
0017 
0018 namespace hcaldqm {
0019   class Container2D : public Container1D {
0020   public:
0021     Container2D();
0022     Container2D(std::string const &folder,
0023                 hashfunctions::HashType,
0024                 quantity::Quantity *,
0025                 quantity::Quantity *,
0026                 quantity::Quantity *qz = new quantity::ValueQuantity(quantity::fN));
0027     ~Container2D() override;
0028 
0029     //  Initialize Container
0030     //  @folder
0031     //  @nametitle,
0032     virtual void initialize(std::string const &folder,
0033                             hashfunctions::HashType,
0034                             quantity::Quantity *,
0035                             quantity::Quantity *,
0036                             quantity::Quantity *qz = new quantity::ValueQuantity(quantity::fN),
0037                             int debug = 0);
0038 
0039     //  @qname - quantity name replacer
0040     virtual void initialize(std::string const &folder,
0041                             std::string const &qname,
0042                             hashfunctions::HashType,
0043                             quantity::Quantity *,
0044                             quantity::Quantity *,
0045                             quantity::Quantity *qz = new quantity::ValueQuantity(quantity::fN),
0046                             int debug = 0);
0047     using Container::initialize;
0048     using Container1D::initialize;
0049     //  redeclare what to override
0050     void fill(HcalDetId const &) override;
0051     void fill(HcalDetId const &, int) override;
0052     void fill(HcalDetId const &, double) override;
0053     void fill(HcalDetId const &, int, double) override;
0054     void fill(HcalDetId const &, int, int) override;
0055     void fill(HcalDetId const &, double, double) override;
0056 
0057     double getBinEntries(HcalDetId const &) override;
0058     double getBinEntries(HcalDetId const &, int) override;
0059     double getBinEntries(HcalDetId const &, double) override;
0060     double getBinEntries(HcalDetId const &, int, int) override;
0061     double getBinEntries(HcalDetId const &, int, double) override;
0062     double getBinEntries(HcalDetId const &, double, double) override;
0063 
0064     double getBinContent(HcalDetId const &) override;
0065     double getBinContent(HcalDetId const &, int) override;
0066     double getBinContent(HcalDetId const &, double) override;
0067     double getBinContent(HcalDetId const &, int, int) override;
0068     double getBinContent(HcalDetId const &, int, double) override;
0069     double getBinContent(HcalDetId const &, double, double) override;
0070 
0071     void setBinContent(HcalDetId const &, int) override;
0072     void setBinContent(HcalDetId const &, double) override;
0073     void setBinContent(HcalDetId const &, int, int) override;
0074     void setBinContent(HcalDetId const &, int, double) override;
0075     void setBinContent(HcalDetId const &, double, int) override;
0076     void setBinContent(HcalDetId const &, double, double) override;
0077     void setBinContent(HcalDetId const &, int, int, int) override;
0078     void setBinContent(HcalDetId const &, int, double, int) override;
0079     void setBinContent(HcalDetId const &, double, int, int) override;
0080     void setBinContent(HcalDetId const &, double, double, int) override;
0081     void setBinContent(HcalDetId const &, int, int, double) override;
0082     void setBinContent(HcalDetId const &, int, double, double) override;
0083     void setBinContent(HcalDetId const &, double, int, double) override;
0084     void setBinContent(HcalDetId const &, double, double, double) override;
0085 
0086     void fill(HcalElectronicsId const &) override;
0087     void fill(HcalElectronicsId const &, int) override;
0088     void fill(HcalElectronicsId const &, double) override;
0089     void fill(HcalElectronicsId const &, int, double) override;
0090     void fill(HcalElectronicsId const &, int, int) override;
0091     void fill(HcalElectronicsId const &, double, double) override;
0092 
0093     double getBinEntries(HcalElectronicsId const &) override;
0094     double getBinEntries(HcalElectronicsId const &, int) override;
0095     double getBinEntries(HcalElectronicsId const &, double) override;
0096     double getBinEntries(HcalElectronicsId const &, int, int) override;
0097     double getBinEntries(HcalElectronicsId const &, int, double) override;
0098     double getBinEntries(HcalElectronicsId const &, double, double) override;
0099 
0100     double getBinContent(HcalElectronicsId const &) override;
0101     double getBinContent(HcalElectronicsId const &, int) override;
0102     double getBinContent(HcalElectronicsId const &, double) override;
0103     double getBinContent(HcalElectronicsId const &, int, int) override;
0104     double getBinContent(HcalElectronicsId const &, int, double) override;
0105     double getBinContent(HcalElectronicsId const &, double, double) override;
0106 
0107     void setBinContent(HcalElectronicsId const &, int) override;
0108     void setBinContent(HcalElectronicsId const &, double) override;
0109     void setBinContent(HcalElectronicsId const &, int, int) override;
0110     void setBinContent(HcalElectronicsId const &, int, double) override;
0111     void setBinContent(HcalElectronicsId const &, double, int) override;
0112     void setBinContent(HcalElectronicsId const &, double, double) override;
0113     void setBinContent(HcalElectronicsId const &, int, int, int) override;
0114     void setBinContent(HcalElectronicsId const &, int, double, int) override;
0115     void setBinContent(HcalElectronicsId const &, double, int, int) override;
0116     void setBinContent(HcalElectronicsId const &, double, double, int) override;
0117     void setBinContent(HcalElectronicsId const &, int, int, double) override;
0118     void setBinContent(HcalElectronicsId const &, int, double, double) override;
0119     void setBinContent(HcalElectronicsId const &, double, int, double) override;
0120     void setBinContent(HcalElectronicsId const &, double, double, double) override;
0121 
0122     void fill(HcalTrigTowerDetId const &) override;
0123     void fill(HcalTrigTowerDetId const &, int) override;
0124     void fill(HcalTrigTowerDetId const &, double) override;
0125     void fill(HcalTrigTowerDetId const &, int, int) override;
0126     void fill(HcalTrigTowerDetId const &, int, double) override;
0127     void fill(HcalTrigTowerDetId const &, double, double) override;
0128 
0129     void fill(HcalTrigTowerDetId const &, HcalElectronicsId const &, int, int);
0130 
0131     double getBinEntries(HcalTrigTowerDetId const &) override;
0132     double getBinEntries(HcalTrigTowerDetId const &, int) override;
0133     double getBinEntries(HcalTrigTowerDetId const &, double) override;
0134     double getBinEntries(HcalTrigTowerDetId const &, int, int) override;
0135     double getBinEntries(HcalTrigTowerDetId const &, int, double) override;
0136     double getBinEntries(HcalTrigTowerDetId const &, double, double) override;
0137 
0138     double getBinContent(HcalTrigTowerDetId const &) override;
0139     double getBinContent(HcalTrigTowerDetId const &, int) override;
0140     double getBinContent(HcalTrigTowerDetId const &, double) override;
0141     double getBinContent(HcalTrigTowerDetId const &, int, int) override;
0142     double getBinContent(HcalTrigTowerDetId const &, int, double) override;
0143     double getBinContent(HcalTrigTowerDetId const &, double, double) override;
0144 
0145     void setBinContent(HcalTrigTowerDetId const &, int) override;
0146     void setBinContent(HcalTrigTowerDetId const &, double) override;
0147     void setBinContent(HcalTrigTowerDetId const &, int, int) override;
0148     void setBinContent(HcalTrigTowerDetId const &, int, double) override;
0149     void setBinContent(HcalTrigTowerDetId const &, double, int) override;
0150     void setBinContent(HcalTrigTowerDetId const &, double, double) override;
0151     void setBinContent(HcalTrigTowerDetId const &, int, int, int) override;
0152     void setBinContent(HcalTrigTowerDetId const &, int, double, int) override;
0153     void setBinContent(HcalTrigTowerDetId const &, double, int, int) override;
0154     void setBinContent(HcalTrigTowerDetId const &, double, double, int) override;
0155     void setBinContent(HcalTrigTowerDetId const &, int, int, double) override;
0156     void setBinContent(HcalTrigTowerDetId const &, int, double, double) override;
0157     void setBinContent(HcalTrigTowerDetId const &, double, int, double) override;
0158     void setBinContent(HcalTrigTowerDetId const &, double, double, double) override;
0159 
0160     //  booking. see Container1D.h
0161     void book(DQMStore::IBooker &,
0162               HcalElectronicsMap const *,
0163               std::string subsystem = "Hcal",
0164               std::string aux = "") override;
0165     void book(DQMStore::IBooker &,
0166               HcalElectronicsMap const *,
0167               filter::HashFilter const &,
0168               std::string subsystem = "Hcal",
0169               std::string aux = "") override;
0170 
0171     void showOverflowZ(bool showOverflow);
0172 
0173   protected:
0174     quantity::Quantity *_qz;
0175 
0176     void customize(MonitorElement *) override;
0177 
0178   private:
0179     using Container1D::fill;
0180   };
0181 }  // namespace hcaldqm
0182 
0183 #endif