CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/DQM/DTMonitorClient/src/DTEfficiencyTest.h

Go to the documentation of this file.
00001 #ifndef DTEfficiencyTest_H
00002 #define DTEfficiencyTest_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 
00030 #include <memory>
00031 #include <iostream>
00032 #include <fstream>
00033 #include <string>
00034 #include <vector>
00035 #include <map>
00036 
00037 class DTGeometry;
00038 class DTChamberId;
00039 class DTSuperLayerId;
00040 class DTLayerId;
00041 
00042 class DTEfficiencyTest: public edm::EDAnalyzer{
00043 
00044 public:
00045 
00047   DTEfficiencyTest(const edm::ParameterSet& ps);
00048   
00050   virtual ~DTEfficiencyTest();
00051 
00052 protected:
00053 
00055   void beginJob();
00056 
00058   void beginRun(const edm::Run& r, const edm::EventSetup& c);
00059 
00061   void analyze(const edm::Event& e, const edm::EventSetup& c);
00062 
00064   void endJob();
00065 
00067   void bookHistos(const DTLayerId & ch, int firstWire, int lastWire);
00068 
00070   void bookHistos(int wh);
00071 
00073   std::string getMEName(std::string histoTag, const DTLayerId & lID);
00074 
00075   
00076   void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ;
00077 
00079   void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c);
00080 
00081 
00082 
00083 private:
00084 
00085   int nevents;
00086   unsigned int nLumiSegs;
00087   int prescaleFactor;
00088   int run;
00089   int percentual;
00090 
00091   DQMStore* dbe;
00092 
00093   edm::ParameterSet parameters;
00094   edm::ESHandle<DTGeometry> muonGeom;
00095 
00096   std::map< DTLayerId , MonitorElement* > EfficiencyHistos;
00097   std::map< DTLayerId , MonitorElement* > UnassEfficiencyHistos;
00098 
00099   // wheel summary histograms  
00100   std::map< int, MonitorElement* > wheelHistos;  
00101   std::map< int, MonitorElement* > wheelUnassHistos;
00102   
00103 };
00104 
00105 #endif