CMS 3D CMS Logo

DTLocalTriggerBaseTest.h

Go to the documentation of this file.
00001 #ifndef DTLocalTriggerBaseTest_H
00002 #define DTLocalTriggerBaseTest_H
00003 
00004 
00016 #include "FWCore/Framework/interface/Frameworkfwd.h"
00017 #include "FWCore/Framework/interface/EDAnalyzer.h"
00018 #include "DataFormats/Common/interface/Handle.h"
00019 #include "FWCore/Framework/interface/ESHandle.h"
00020 #include "FWCore/Framework/interface/Event.h"
00021 #include "FWCore/Framework/interface/MakerMacros.h"
00022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00023 #include <FWCore/Framework/interface/LuminosityBlock.h>
00024 
00025 #include "DQMServices/Core/interface/DQMStore.h"
00026 #include "DQMServices/Core/interface/MonitorElement.h"
00027 #include "FWCore/ServiceRegistry/interface/Service.h"
00028 
00029 #include <boost/cstdint.hpp>
00030 #include <string>
00031 #include <map>
00032 
00033 class DTChamberId;
00034 class DTGeometry;
00035 class TH1F;
00036 class TH2F;
00037 class TH1D;
00038 
00039 class DTLocalTriggerBaseTest: public edm::EDAnalyzer{
00040 
00041 public:
00042 
00044   DTLocalTriggerBaseTest() {};
00045   
00047   virtual ~DTLocalTriggerBaseTest();
00048 
00049 protected:
00050 
00052   void beginJob(const edm::EventSetup& c);
00053 
00055   void analyze(const edm::Event& e, const edm::EventSetup& c);
00056 
00058   void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context);
00059 
00061   void endJob();
00062 
00064   virtual void runClientDiagnostic() = 0;
00065 
00067   void bookSectorHistos( int wheel, int sector, std::string folder, std::string hTag );
00068 
00070   void bookWheelHistos( int wheel, std::string folder, std::string hTag );
00071 
00073   void bookCmsHistos( std::string hTag );
00074 
00076   std::pair<float,float> phiRange(const DTChamberId& id);
00077 
00079   template <class T>  T* getHisto(MonitorElement* me);
00080 
00082   void setConfig(const edm::ParameterSet& ps, std::string name);
00083 
00084 /*   /// Set labels to wheel plots (Phi) */
00085 /*   void setLabelPh(MonitorElement* me); */
00086 
00087 /*   /// Set labels to theta plots (Theta) */
00088 /*   void setLabelTh(MonitorElement* me);  */
00089 
00091   std::string fullName(std::string htype);
00092 
00094   std::string getMEName(std::string histoTag, std::string subfolder, const DTChamberId & chambid);
00095 
00097   void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ;
00098   
00100   inline std::string & topFolder() { return baseFolder; } ;
00101   
00103   inline std::string category() { return "DTDQM|DTMonitorClient|" + testName + "Test"; } ;
00104   
00105 
00106 
00107   int nevents;
00108   unsigned int nLumiSegs;
00109   int prescaleFactor;
00110   int run;
00111   std::string testName;
00112   std::vector<std::string> trigSources;
00113   std::vector<std::string> hwSources;
00114 
00115   DQMStore* dbe;
00116   std::string sourceFolder;
00117   edm::ParameterSet parameters;
00118   bool runOnline;
00119   std::string baseFolder;
00120   std::string trigSource;
00121   std::string hwSource;
00122   edm::ESHandle<DTGeometry> muonGeom;
00123   std::map<int,std::map<std::string,MonitorElement*> > secME;
00124   std::map<int,std::map<std::string,MonitorElement*> > whME;
00125   std::map<std::string,MonitorElement*> cmsME;
00126 
00127 
00128 };
00129 
00130 
00131 template <class T>
00132 T* DTLocalTriggerBaseTest::getHisto(MonitorElement* me) {
00133   return me ? dynamic_cast<T*>(me->getRootObject()) : 0;
00134 }
00135 
00136 #endif
00137 
00138 

Generated on Tue Jun 9 17:32:34 2009 for CMSSW by  doxygen 1.5.4