Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:07:12

0001 #ifndef MESetTrend_H
0002 #define MESetTrend_H
0003 
0004 #include "MESetEcal.h"
0005 
0006 namespace ecaldqm {
0007   /* class MESetTrend
0008    time on xaxis
0009    channel id is used to identify the plot
0010 */
0011 
0012   class MESetTrend : public MESetEcal {
0013   public:
0014     MESetTrend(std::string const &,
0015                binning::ObjectType,
0016                binning::BinningType,
0017                MonitorElement::Kind,
0018                binning::AxisSpecs const * = nullptr,
0019                binning::AxisSpecs const * = nullptr);
0020     MESetTrend(MESetTrend const &);
0021     ~MESetTrend() override {}
0022 
0023     MESet &operator=(MESet const &) override;
0024 
0025     MESet *clone(std::string const & = "") const override;
0026 
0027     void book(DQMStore::IBooker &, EcalElectronicsMapping const *) override;
0028 
0029     void fill(EcalDQMSetupObjects const, DetId const &, double, double = 1., double = 1.) override;
0030     void fill(EcalDQMSetupObjects const, EcalElectronicsId const &, double, double = 1., double = 1.) override;
0031     void fill(EcalDQMSetupObjects const, int, double, double = 1., double = 1.) override;
0032     void fill(EcalDQMSetupObjects const, double, double = 1., double = 1.) override;
0033 
0034     int findBin(EcalDQMSetupObjects const, DetId const &, double, double = 0.) const override;
0035     int findBin(EcalDQMSetupObjects const, EcalElectronicsId const &, double, double = 0.) const override;
0036     int findBin(EcalDQMSetupObjects const, int, double, double = 0.) const override;
0037     int findBin(EcalDQMSetupObjects const, double, double = 0.) const;
0038 
0039     bool isVariableBinning() const override { return true; }
0040 
0041     void setMinutely() { minutely_ = true; }
0042     void setShiftAxis() { shiftAxis_ = true; }
0043     void setCumulative();
0044     bool isMinutely() const { return minutely_; }
0045     bool canShiftAxis() const { return shiftAxis_; }
0046     bool isCumulative() const { return currentBin_ > 0; }
0047 
0048   private:
0049     bool shift_(unsigned);
0050 
0051     bool minutely_;   // if true, bins in minutes instead of lumis
0052     bool shiftAxis_;  // if true, shift x values
0053     int currentBin_;  // only used for cumulative case
0054   };
0055 }  // namespace ecaldqm
0056 
0057 #endif