00001 #ifndef MuonTrackResidualsTest_H 00002 #define MuonTrackResidualsTest_H 00003 00004 00017 #include "FWCore/Framework/interface/Frameworkfwd.h" 00018 #include <FWCore/Framework/interface/EDAnalyzer.h> 00019 #include "DataFormats/Common/interface/Handle.h" 00020 #include <FWCore/Framework/interface/ESHandle.h> 00021 #include <FWCore/Framework/interface/Event.h> 00022 #include <FWCore/Framework/interface/MakerMacros.h> 00023 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00024 #include <FWCore/Framework/interface/LuminosityBlock.h> 00025 00026 #include "DQMServices/Core/interface/DQMStore.h" 00027 #include "DQMServices/Core/interface/MonitorElement.h" 00028 #include "FWCore/ServiceRegistry/interface/Service.h" 00029 #include "FWCore/Framework/interface/Run.h" 00030 00031 #include <memory> 00032 #include <iostream> 00033 #include <string> 00034 #include <vector> 00035 #include <map> 00036 00037 00038 00039 class MuonTrackResidualsTest: public edm::EDAnalyzer{ 00040 00041 public: 00042 00044 MuonTrackResidualsTest(const edm::ParameterSet& ps); 00045 00047 virtual ~MuonTrackResidualsTest(); 00048 00049 protected: 00050 00052 void beginJob(void); 00053 00055 void analyze(const edm::Event& e, const edm::EventSetup& c); 00056 00058 void endJob(); 00059 00060 void beginRun(edm::Run const& run, edm::EventSetup const& eSetup); 00061 void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ; 00062 00064 void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c); 00065 void endRun(edm::Run const& run, edm::EventSetup const& eSetup); 00066 00067 00068 private: 00069 00070 // counters 00071 int nevents; 00072 unsigned int nLumiSegs; 00073 int prescaleFactor; 00074 int run; 00075 // Switch for verbosity 00076 std::string metname; 00077 00078 DQMStore* theDbe; 00079 edm::ParameterSet parameters; 00080 00081 // source residuals histograms 00082 std::map< std::string, std::vector<std::string> > histoNames; 00083 00084 // test histograms 00085 std::map< std::string, MonitorElement* > MeanHistos; 00086 std::map< std::string ,MonitorElement* > SigmaHistos; 00087 00088 00089 }; 00090 00091 #endif