CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DTLocalTriggerBaseTest.h
Go to the documentation of this file.
1 #ifndef DTLocalTriggerBaseTest_H
2 #define DTLocalTriggerBaseTest_H
3 
24 
27 
29 
30 #include <string>
31 #include <map>
32 
33 class DTChamberId;
34 class DTGeometry;
35 class TH1F;
36 class TH2F;
37 class TH1D;
38 
40 public:
43 
45  ~DTLocalTriggerBaseTest() override;
46 
47 protected:
49  void beginRun(edm::Run const& run, edm::EventSetup const& context) override;
50 
54  edm::LuminosityBlock const&,
55  edm::EventSetup const&) override;
56 
58  void endRun(edm::Run const& run, edm::EventSetup const& context) override;
59 
61 
64 
66  void bookSectorHistos(DQMStore::IBooker&, int wheel, int sector, std::string hTag, std::string folder = "");
67 
69  void bookWheelHistos(DQMStore::IBooker&, int wheel, std::string hTag, std::string folder = "");
70 
72  void bookCmsHistos(DQMStore::IBooker&, std::string hTag, std::string folder = "", bool isGlb = false);
73 
75  std::pair<float, float> phiRange(const DTChamberId& id);
76 
78  template <class T>
80 
83 
86 
88  std::string getMEName(std::string histoTag, std::string subfolder, const DTChamberId& chambid);
89 
91  std::string getMEName(std::string histoTag, std::string subfolder, int wh);
92 
94  inline std::string& topFolder() { return baseFolderTM; };
95 
97  inline std::string category() { return "DTDQM|DTMonitorClient|" + testName + "Test"; };
98 
99  int nevents;
100  unsigned int nLumiSegs;
102  int run;
104  std::vector<std::string> trigSources;
105  std::vector<std::string> hwSources;
106 
109  bool runOnline;
113 
116  std::map<int, std::map<std::string, MonitorElement*> > secME;
117  std::map<int, std::map<std::string, MonitorElement*> > whME;
118  std::map<std::string, MonitorElement*> cmsME;
119 };
120 
121 template <class T>
123  return me ? dynamic_cast<T*>(me->getRootObject()) : nullptr;
124 }
125 
126 #endif
std::vector< std::string > trigSources
std::string & topFolder()
Get top folder name.
DTLocalTriggerBaseTest()
Constructor.
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
Perform client diagnostic in online.
T * getHisto(MonitorElement *me)
Convert ME to Histogram fo type T.
std::map< int, std::map< std::string, MonitorElement * > > whME
Transition
Definition: Transition.h:12
std::string category()
Get message logger name.
void endRun(edm::Run const &run, edm::EventSetup const &context) override
Perform client diagnostic in offline.
std::pair< float, float > phiRange(const DTChamberId &id)
Calculate phi range for histograms.
void beginRun(edm::Run const &run, edm::EventSetup const &context) override
BeginRun.
virtual void runClientDiagnostic(DQMStore::IBooker &, DQMStore::IGetter &)=0
Perform client analysis.
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
std::string getMEName(std::string histoTag, std::string subfolder, const DTChamberId &chambid)
Get the ME name (by chamber)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
void bookSectorHistos(DQMStore::IBooker &, int wheel, int sector, std::string hTag, std::string folder="")
Book the new MEs (for each sector)
std::map< std::string, MonitorElement * > cmsME
TObject * getRootObject() const override
void setConfig(const edm::ParameterSet &ps, std::string name)
Set configuration variables.
std::vector< std::string > hwSources
std::map< int, std::map< std::string, MonitorElement * > > secME
long double T
~DTLocalTriggerBaseTest() override
Destructor.
void bookWheelHistos(DQMStore::IBooker &, int wheel, std::string hTag, std::string folder="")
Book the new MEs (for each wheel)
std::string fullName(std::string htype)
Create fullname from histo partial name.
Definition: Run.h:45
void bookCmsHistos(DQMStore::IBooker &, std::string hTag, std::string folder="", bool isGlb=false)
Book the new MEs (CMS summary)