00001 #ifndef ZDCMonitorClient_H 00002 #define ZDCMonitorClient_H 00003 00004 // Update on September 21, 2012 to match HcalMonitorClient 00005 #include "FWCore/Framework/interface/Event.h" 00006 #include "FWCore/Framework/interface/EventSetup.h" 00007 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00008 #include "FWCore/Framework/interface/EDAnalyzer.h" 00009 #include "CalibFormats/HcalObjects/interface/HcalDbService.h" 00010 00011 #include "DQM/HcalMonitorClient/interface/HcalBaseDQClient.h" 00012 #include "DQM/HcalMonitorTasks/interface/HcalEtaPhiHists.h" 00013 #include "DQM/HcalMonitorClient/interface/HcalSummaryClient.h" 00014 00015 class DQMStore; 00016 //class TH2F; 00017 //class TH1F; 00018 //class TFile; 00019 00020 class ZDCMonitorClient : public HcalBaseDQClient { 00021 00022 public: 00023 00025 //ZDCMonitorClient(); 00026 ZDCMonitorClient(std::string myname, const edm::ParameterSet& ps); 00027 00029 virtual ~ZDCMonitorClient(); 00030 00032 void analyze(void); 00033 /* void analyze(int LS=-1); */ 00034 void analyze(const edm::Event& evt, const edm::EventSetup& es); 00035 00037 void beginJob(); 00038 00040 void endJob(void); 00041 00043 void beginRun(); 00044 void beginRun(const edm::Run& r, const edm::EventSetup & c); 00045 00047 void endRun(); 00048 void endRun(const edm::Run & r, const edm::EventSetup & c); 00049 00051 void beginLuminosityBlock(const edm::LuminosityBlock & l, const edm::EventSetup & c); 00052 00054 void endLuminosityBlock(const edm::LuminosityBlock & l, const edm::EventSetup & c); 00055 00057 void reset(void); 00058 00060 void setup(void); 00061 00063 void cleanup(void); 00064 00066 void softReset(bool flag); 00067 00068 // Write channelStatus info 00069 void writeChannelStatus(); 00070 00071 // Write html output 00072 void writeHtml(); 00073 00074 private: 00075 00076 int ievt_; // all events 00077 int jevt_; // events in current run 00078 int run_; 00079 int evt_; 00080 bool begin_run_; 00081 bool end_run_; 00082 00084 int LumiCounter; 00085 int PZDC_GoodLumiCounter; 00086 int NZDC_GoodLumiCounter; 00087 double PZDC_LumiRatio; 00088 double NZDC_LumiRatio; 00090 00091 // parameter set inputs 00092 00093 std::vector<double> ZDCGoodLumi_; 00094 00095 int debug_; 00096 std::string inputFile_; 00097 bool mergeRuns_; 00098 bool cloneME_; 00099 int prescaleFactor_; 00100 std::string prefixME_; 00101 bool enableCleanup_; 00102 std::vector<std::string > enabledClients_; 00103 00104 int updateTime_; // update time for updating histograms 00105 std::string baseHtmlDir_; 00106 int htmlUpdateTime_; //update time for updating histograms 00107 std::string databasedir_; 00108 int databaseUpdateTime_; //update time for dumping db info (offset by 10 minutes, so that always dump after 10 minutes) 00109 int databaseFirstUpdate_; // first update time (in minutes) 00110 int htmlFirstUpdate_; // first update for html 00111 00112 int htmlcounter_; 00113 00114 bool saveByLumiSection_; //produces separate LS certification values when enabled 00115 bool Online_; // fix to April 2011 problem where online DQM client crashes in endJob. Is endRun perhaps not called? 00116 std::string subdir_; 00117 00118 // time parameters 00119 time_t current_time_; 00120 time_t last_time_update_; 00121 time_t last_time_html_; 00122 time_t last_time_db_; 00123 00124 std::vector<HcalBaseDQClient*> clients_; 00125 00126 DQMStore* dqmStore_; 00127 HcalChannelQuality* chanquality_; 00128 00129 HcalSummaryClient* summaryClient_; 00130 00132 MonitorElement* ZDCChannelSummary_; 00133 MonitorElement* ZDCHotChannelFraction_; 00134 MonitorElement* ZDCColdChannelFraction_; 00135 MonitorElement* ZDCDeadChannelFraction_; 00136 MonitorElement* ZDCDigiErrorFraction_; 00137 MonitorElement* ZDCReportSummary_; 00138 00140 }; 00141 00142 #endif