00001 #ifndef DQMClientExample_H 00002 #define DQMClientExample_H 00003 00015 /* Jan 17, 2009: the code has been modified significantly 00016 * to steer the client operations 00017 * Author: D.Volyanskyy 00018 */ 00019 00020 #include "FWCore/Framework/interface/EDAnalyzer.h" 00021 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00022 #include "DQMServices/Core/interface/DQMStore.h" 00023 #include "DQMServices/Core/interface/MonitorElement.h" 00024 00025 #include <memory> 00026 #include <iostream> 00027 #include <fstream> 00028 #include <string> 00029 #include <vector> 00030 #include <map> 00031 00032 00033 class DQMClientExample: public edm::EDAnalyzer { 00034 00035 public: 00036 00038 DQMClientExample(const edm::ParameterSet& ps); 00039 00041 virtual ~DQMClientExample(); 00042 00043 protected: 00044 00046 void beginJob(); 00047 00049 void beginRun(const edm::Run& r, const edm::EventSetup& c); 00050 00052 void analyze(const edm::Event& e, const edm::EventSetup& c) ; 00053 00055 void performClient(); 00056 00058 void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 00059 const edm::EventSetup& context) ; 00060 00062 void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 00063 const edm::EventSetup& c); 00064 00066 void endRun(const edm::Run& r, const edm::EventSetup& c); 00067 00069 void endJob(); 00070 00071 private: 00073 void initialize(); 00074 00075 edm::ParameterSet parameters_; 00076 00077 DQMStore* dbe_; 00078 std::string monitorName_; 00079 std::string QTestName_; 00080 int counterClientOperation ; //-- counter on Client Operations 00081 int counterEvt_; //-- event counter 00082 int counterLS_; //-- LS counter 00083 int prescaleEvt_; //-- prescale on number of events 00084 int prescaleLS_; //-- prescale on number of lumisections 00085 bool clientOnEachEvent; 00086 bool clientOnEndLumi; 00087 bool clientOnEndRun; 00088 bool clientOnEndJob; 00089 00090 // -------- member data -------- 00091 MonitorElement * clientHisto; 00092 00093 }; 00094 00095 #endif 00096 00097