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 
24 
28 
29 #include <boost/cstdint.hpp>
30 #include <string>
31 #include <map>
32 
33 class DTChamberId;
34 class DTGeometry;
35 class TH1F;
36 class TH2F;
37 class TH1D;
38 
40 
41 public:
42 
45 
47  virtual ~DTLocalTriggerBaseTest();
48 
49 protected:
50 
52  void beginJob();
53 
55  void beginRun(edm::Run const& run, edm::EventSetup const& context);
56 
58  void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ;
59 
61  void analyze(const edm::Event& e, const edm::EventSetup& c);
62 
64  void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context);
65 
67  void endRun(edm::Run const& run, edm::EventSetup const& context);
68 
70  void endJob();
71 
73  virtual void runClientDiagnostic() = 0;
74 
76  void bookSectorHistos( int wheel, int sector, std::string hTag, std::string folder="" );
77 
79  void bookWheelHistos( int wheel, std::string hTag, std::string folder="" );
80 
82  void bookCmsHistos( std::string hTag, std::string folder="" , bool isGlb = false);
83 
85  std::pair<float,float> phiRange(const DTChamberId& id);
86 
88  template <class T> T* getHisto(MonitorElement* me);
89 
91  void setConfig(const edm::ParameterSet& ps, std::string name);
92 
93 /* /// Set labels to wheel plots (Phi) */
94 /* void setLabelPh(MonitorElement* me); */
95 
96 /* /// Set labels to theta plots (Theta) */
97 /* void setLabelTh(MonitorElement* me); */
98 
100  std::string fullName(std::string htype);
101 
103  std::string getMEName(std::string histoTag, std::string subfolder, const DTChamberId& chambid);
104 
106  std::string getMEName(std::string histoTag, std::string subfolder, int wh);
107 
109  inline std::string & topFolder(bool isDCC) { return isDCC ? baseFolderDCC : baseFolderDDU; } ;
110 
112  inline std::string category() { return "DTDQM|DTMonitorClient|" + testName + "Test"; } ;
113 
114 
115 
116  int nevents;
117  unsigned int nLumiSegs;
119  int run;
120  std::string testName;
121  std::vector<std::string> trigSources;
122  std::vector<std::string> hwSources;
123 
125  std::string sourceFolder;
127  bool runOnline;
128  std::string baseFolderDCC;
129  std::string baseFolderDDU;
130  std::string trigSource;
131  std::string hwSource;
133  std::map<int,std::map<std::string,MonitorElement*> > secME;
134  std::map<int,std::map<std::string,MonitorElement*> > whME;
135  std::map<std::string,MonitorElement*> cmsME;
136 
137 };
138 
139 
140 template <class T>
142  return me ? dynamic_cast<T*>(me->getRootObject()) : 0;
143 }
144 
145 #endif
146 
147 
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:33