CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/DQM/DTMonitorClient/src/DTSegmentAnalysisTest.h

Go to the documentation of this file.
00001 #ifndef DTSegmentAnalysisTest_H
00002 #define DTSegmentAnalysisTest_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 
00041 class DTSegmentAnalysisTest: public edm::EDAnalyzer{
00042 
00043 public:
00044 
00046   DTSegmentAnalysisTest(const edm::ParameterSet& ps);
00047   
00049   virtual ~DTSegmentAnalysisTest();
00050 
00051 
00053   void beginJob();
00054   void endJob(void);
00055 
00056   void beginRun(const edm::Run& run, const edm::EventSetup& eSetup);
00057 
00059   void analyze(const edm::Event& e, const edm::EventSetup& c);
00060 
00062   void bookHistos();
00063 
00065   std::string getMEName(const DTChamberId & chID, std::string histoTag);
00066 
00067   void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ;
00068 
00070   void performClientDiagnostic();
00071 
00073   void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c);
00074 
00076   void endRun(edm::Run const& run, edm::EventSetup const& c);
00077 
00078 
00079 private:
00080 
00081   int nevents;
00082   unsigned int nLumiSegs;
00083   // switch on for detailed analysis
00084   bool detailedAnalysis;
00085   int nMinEvts;
00086 
00087   bool runOnline;
00088 
00089   DQMStore* dbe;
00090 
00091   edm::ParameterSet parameters;
00092   edm::ESHandle<DTGeometry> muonGeom;
00093 
00094   // the histograms  
00095   std::map< std::pair<int,int>, MonitorElement* > chi2Histos;
00096   std::map< std::pair<int,int>, MonitorElement* > segmRecHitHistos;
00097   std::map< int, MonitorElement* > summaryHistos;
00098   bool normalizeHistoPlots;
00099   // top folder for the histograms in DQMStore
00100   std::string topHistoFolder;
00101   // hlt DQM mode
00102   bool hltDQMMode;
00103 };
00104 
00105 #endif
00106