CMS 3D CMS Logo

DTLocalTriggerBaseTest.h
Go to the documentation of this file.
1 #ifndef DTLocalTriggerBaseTest_H
2 #define DTLocalTriggerBaseTest_H
3 
4 
25 
29 
31 
32 #include <boost/cstdint.hpp>
33 #include <string>
34 #include <map>
35 
36 class DTChamberId;
37 class DTGeometry;
38 class TH1F;
39 class TH2F;
40 class TH1D;
41 
43 
44 public:
45 
48 
50  ~DTLocalTriggerBaseTest() override;
51 
52 
53 protected:
54 
56  void beginRun(edm::Run const& run, edm::EventSetup const& context) override;
57 
60 
62  void endRun(edm::Run const& run, edm::EventSetup const& context) override;
63 
64  void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override;
65 
68 
70  void bookSectorHistos(DQMStore::IBooker &, int wheel, int sector, std::string hTag, std::string folder="" );
71 
73  void bookWheelHistos(DQMStore::IBooker &, int wheel, std::string hTag, std::string folder="" );
74 
76  void bookCmsHistos(DQMStore::IBooker &,std::string hTag, std::string folder="" , bool isGlb = false);
77 
79  std::pair<float,float> phiRange(const DTChamberId& id);
80 
82  template <class T> T* getHisto(MonitorElement* me);
83 
86 
89 
91  std::string getMEName(std::string histoTag, std::string subfolder, const DTChamberId& chambid);
92 
94  std::string getMEName(std::string histoTag, std::string subfolder, int wh);
95 
97  inline std::string & topFolder(bool isTM) { return isTM ? baseFolderTM : baseFolderDDU; } ;
98 
100  inline std::string category() { return "DTDQM|DTMonitorClient|" + testName + "Test"; } ;
101 
102 
103 
104  int nevents;
105  unsigned int nLumiSegs;
107  int run;
109  std::vector<std::string> trigSources;
110  std::vector<std::string> hwSources;
111 
114  bool runOnline;
120  std::map<int,std::map<std::string,MonitorElement*> > secME;
121  std::map<int,std::map<std::string,MonitorElement*> > whME;
122  std::map<std::string,MonitorElement*> cmsME;
123 
124 };
125 
126 
127 template <class T>
129  return me ? dynamic_cast<T*>(me->getRootObject()) : nullptr;
130 }
131 
132 #endif
133 
134 
std::map< int, std::map< std::string, MonitorElement * > > secME
std::vector< std::string > trigSources
std::map< int, std::map< std::string, MonitorElement * > > whME
TObject * getRootObject() const
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.
edm::ESHandle< DTGeometry > muonGeom
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.
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
std::string & topFolder(bool isTM)
Get top folder name.
std::map< std::string, MonitorElement * > cmsME
void bookSectorHistos(DQMStore::IBooker &, int wheel, int sector, std::string hTag, std::string folder="")
Book the new MEs (for each sector)
void setConfig(const edm::ParameterSet &ps, std::string name)
Set configuration variables.
std::vector< std::string > hwSources
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:44
void bookCmsHistos(DQMStore::IBooker &, std::string hTag, std::string folder="", bool isGlb=false)
Book the new MEs (CMS summary)