CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTLocalTriggerBaseTest.h
Go to the documentation of this file.
1 #ifndef DTLocalTriggerBaseTest_H
2 #define DTLocalTriggerBaseTest_H
3 
4 
22 
26 
27 #include <boost/cstdint.hpp>
28 #include <string>
29 #include <map>
30 
31 class DTChamberId;
32 class DTGeometry;
33 class TH1F;
34 class TH2F;
35 class TH1D;
36 
38 
39 public:
40 
43 
45  virtual ~DTLocalTriggerBaseTest();
46 
47 protected:
48 
50  void beginJob();
51 
53  void beginRun(edm::Run const& run, edm::EventSetup const& context);
54 
56  void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ;
57 
59  void analyze(const edm::Event& e, const edm::EventSetup& c);
60 
62  void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context);
63 
65  void endRun(edm::Run const& run, edm::EventSetup const& context);
66 
68  void endJob();
69 
71  virtual void runClientDiagnostic() = 0;
72 
74  void bookSectorHistos( int wheel, int sector, std::string hTag, std::string folder="" );
75 
77  void bookWheelHistos( int wheel, std::string hTag, std::string folder="" );
78 
80  void bookCmsHistos( std::string hTag, std::string folder="" , bool isGlb = false);
81 
83  std::pair<float,float> phiRange(const DTChamberId& id);
84 
86  template <class T> T* getHisto(MonitorElement* me);
87 
90 
91 /* /// Set labels to wheel plots (Phi) */
92 /* void setLabelPh(MonitorElement* me); */
93 
94 /* /// Set labels to theta plots (Theta) */
95 /* void setLabelTh(MonitorElement* me); */
96 
99 
101  std::string getMEName(std::string histoTag, std::string subfolder, const DTChamberId& chambid);
102 
104  std::string getMEName(std::string histoTag, std::string subfolder, int wh);
105 
107  inline std::string & topFolder(bool isDCC) { return isDCC ? baseFolderDCC : baseFolderDDU; } ;
108 
110  inline std::string category() { return "DTDQM|DTMonitorClient|" + testName + "Test"; } ;
111 
112 
113 
114  int nevents;
115  unsigned int nLumiSegs;
117  int run;
119  std::vector<std::string> trigSources;
120  std::vector<std::string> hwSources;
121 
125  bool runOnline;
131  std::map<int,std::map<std::string,MonitorElement*> > secME;
132  std::map<int,std::map<std::string,MonitorElement*> > whME;
133  std::map<std::string,MonitorElement*> cmsME;
134 
135 };
136 
137 
138 template <class T>
140  return me ? dynamic_cast<T*>(me->getRootObject()) : 0;
141 }
142 
143 #endif
144 
145 
std::map< int, std::map< std::string, MonitorElement * > > secME
std::vector< std::string > trigSources
virtual ~DTLocalTriggerBaseTest()
Destructor.
std::map< int, std::map< std::string, MonitorElement * > > whME
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
Perform begin lumiblock operations.
void bookCmsHistos(std::string hTag, std::string folder="", bool isGlb=false)
Book the new MEs (CMS summary)
DTLocalTriggerBaseTest()
Constructor.
void beginRun(edm::Run const &run, edm::EventSetup const &context)
BeginRun.
T * getHisto(MonitorElement *me)
Convert ME to Histogram fo type T.
edm::ESHandle< DTGeometry > muonGeom
void bookWheelHistos(int wheel, std::string hTag, std::string folder="")
Book the new MEs (for each wheel)
void bookSectorHistos(int wheel, int sector, std::string hTag, std::string folder="")
Book the new MEs (for each sector)
void endRun(edm::Run const &run, edm::EventSetup const &context)
Perform client diagnostic in offline.
std::string category()
Get message logger name.
std::pair< float, float > phiRange(const DTChamberId &id)
Calculate phi range for histograms.
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
TObject * getRootObject(void) const
virtual void runClientDiagnostic()=0
Perform client analysis.
std::string getMEName(std::string histoTag, std::string subfolder, const DTChamberId &chambid)
Get the ME name (by chamber)
std::map< std::string, MonitorElement * > cmsME
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
Perform client diagnostic in online.
std::string & topFolder(bool isDCC)
Get top folder name.
void setConfig(const edm::ParameterSet &ps, std::string name)
Set configuration variables.
std::vector< std::string > hwSources
long double T
std::string fullName(std::string htype)
Create fullname from histo partial name.
Definition: Run.h:41