CMS 3D CMS Logo

DTLocalTriggerBaseTest.h
Go to the documentation of this file.
1 #ifndef DTLocalTriggerBaseTest_H
2 #define DTLocalTriggerBaseTest_H
3 
23 
26 
28 
29 #include <string>
30 #include <map>
31 
32 class DTChamberId;
33 class DTGeometry;
34 class TH1F;
35 class TH2F;
36 class TH1D;
37 
39 public:
42 
44  ~DTLocalTriggerBaseTest() override;
45 
46 protected:
48  void beginRun(edm::Run const& run, edm::EventSetup const& context) override;
49 
53  edm::LuminosityBlock const&,
54  edm::EventSetup const&) override;
55 
57  void endRun(edm::Run const& run, edm::EventSetup const& context) override;
58 
60 
63 
65  void bookSectorHistos(DQMStore::IBooker&, int wheel, int sector, std::string hTag, std::string folder = "");
66 
68  void bookWheelHistos(DQMStore::IBooker&, int wheel, std::string hTag, std::string folder = "");
69 
71  void bookCmsHistos(DQMStore::IBooker&, std::string hTag, std::string folder = "", bool isGlb = false);
72 
74  std::pair<float, float> phiRange(const DTChamberId& id);
75 
77  template <class T>
79 
82 
85 
88 
90  std::string getMEName(std::string histoTag, std::string subfolder, int wh);
91 
93  inline std::string& topFolder() { return baseFolderTM; };
94 
96  inline std::string category() { return "DTDQM|DTMonitorClient|" + testName + "Test"; };
97 
98  int nevents;
99  unsigned int nLumiSegs;
101  int run;
103  std::vector<std::string> trigSources;
104  std::vector<std::string> hwSources;
105 
108  bool runOnline;
113  std::map<int, std::map<std::string, MonitorElement*> > secME;
114  std::map<int, std::map<std::string, MonitorElement*> > whME;
115  std::map<std::string, MonitorElement*> cmsME;
116 };
117 
118 template <class T>
120  return me ? dynamic_cast<T*>(me->getRootObject()) : nullptr;
121 }
122 
123 #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.
edm::ESHandle< DTGeometry > muonGeom
std::map< int, std::map< std::string, MonitorElement * > > whME
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
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)