Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:20

0001 
0002 #ifndef ElectronDqmAnalyzerBase_h
0003 #define ElectronDqmAnalyzerBase_h
0004 
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006 #include <Rtypes.h>
0007 #include <string>
0008 #include <vector>
0009 
0010 //DQM
0011 #include "FWCore/ServiceRegistry/interface/Service.h"
0012 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0013 #include "DQMServices/Core/interface/DQMStore.h"
0014 
0015 namespace edab {
0016   struct Empty {};
0017 }  // namespace edab
0018 class ElectronDqmAnalyzerBase : public DQMEDAnalyzer {
0019 protected:
0020   explicit ElectronDqmAnalyzerBase(const edm::ParameterSet &conf);
0021   ~ElectronDqmAnalyzerBase() override;
0022 
0023   // specific implementation of EDAnalyzer
0024   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0025 
0026   // interface to implement in derived classes
0027   void analyze(const edm::Event &e, const edm::EventSetup &c) override {}
0028 
0029   // utility methods
0030   int verbosity() { return verbosity_; }
0031 
0032   void setBookPrefix(const std::string &);
0033   void setBookIndex(short);
0034   void setBookEfficiencyFlag(const bool &);
0035   void setBookStatOverflowFlag(const bool &);
0036 
0037   MonitorElement *bookH1(DQMStore::IBooker &,
0038                          const std::string &name,
0039                          const std::string &title,
0040                          int nchX,
0041                          double lowX,
0042                          double highX,
0043                          const std::string &titleX = "",
0044                          const std::string &titleY = "Events",
0045                          Option_t *option = "E1 P");
0046 
0047   MonitorElement *bookH1withSumw2(DQMStore::IBooker &,
0048                                   const std::string &name,
0049                                   const std::string &title,
0050                                   int nchX,
0051                                   double lowX,
0052                                   double highX,
0053                                   const std::string &titleX = "",
0054                                   const std::string &titleY = "Events",
0055                                   Option_t *option = "E1 P");
0056 
0057   MonitorElement *bookH2(DQMStore::IBooker &,
0058                          const std::string &name,
0059                          const std::string &title,
0060                          int nchX,
0061                          double lowX,
0062                          double highX,
0063                          int nchY,
0064                          double lowY,
0065                          double highY,
0066                          const std::string &titleX = "",
0067                          const std::string &titleY = "",
0068                          Option_t *option = "COLZ");
0069 
0070   MonitorElement *bookH2withSumw2(DQMStore::IBooker &,
0071                                   const std::string &name,
0072                                   const std::string &title,
0073                                   int nchX,
0074                                   double lowX,
0075                                   double highX,
0076                                   int nchY,
0077                                   double lowY,
0078                                   double highY,
0079                                   const std::string &titleX = "",
0080                                   const std::string &titleY = "",
0081                                   Option_t *option = "COLZ");
0082 
0083   MonitorElement *bookP1(DQMStore::IBooker &,
0084                          const std::string &name,
0085                          const std::string &title,
0086                          int nchX,
0087                          double lowX,
0088                          double highX,
0089                          double lowY,
0090                          double highY,
0091                          const std::string &titleX = "",
0092                          const std::string &titleY = "",
0093                          Option_t *option = "E1 P");
0094 
0095   MonitorElement *cloneH1(DQMStore::IBooker &iBooker,
0096                           const std::string &name,
0097                           MonitorElement *original,
0098                           const std::string &title = "");
0099 
0100   MonitorElement *cloneH1(DQMStore::IBooker &iBooker,
0101                           const std::string &name,
0102                           const std::string &original,
0103                           const std::string &title = "");
0104 
0105 private:
0106   int verbosity_;
0107   std::string bookPrefix_;
0108   short bookIndex_;
0109   bool bookEfficiencyFlag_ = false;
0110   bool bookStatOverflowFlag_ = false;
0111   bool histoNamesReady;
0112   std::vector<std::string> histoNames_;
0113   std::string finalStep_;
0114   std::string inputFile_;
0115   std::string outputFile_;
0116   std::string inputInternalPath_;
0117   std::string outputInternalPath_;
0118 
0119   // utility methods
0120   std::string newName(const std::string &name);
0121 };
0122 
0123 #endif