00001 #ifndef EcalEndcapMonitorClient_H 00002 #define EcalEndcapMonitorClient_H 00003 00004 /* 00005 * \file EcalEndcapMonitorClient.h 00006 * 00007 * $Date: 2012/04/27 13:46:05 $ 00008 * $Revision: 1.64 $ 00009 * \author G. Della Ricca 00010 * \author F. Cossutti 00011 * 00012 */ 00013 00014 #include <string> 00015 #include <vector> 00016 #include <map> 00017 00018 #include "FWCore/Framework/interface/Event.h" 00019 #include "FWCore/Framework/interface/EventSetup.h" 00020 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00021 #include "FWCore/Framework/interface/EDAnalyzer.h" 00022 00023 #include "DQM/EcalEndcapMonitorClient/interface/EEClient.h" 00024 00025 #include "DQM/EcalEndcapMonitorClient/interface/EESummaryClient.h" 00026 00027 #include "TROOT.h" 00028 #include "TH1.h" 00029 00030 class DQMStore; 00031 #ifdef WITH_ECAL_COND_DB 00032 class RunIOV; 00033 class MonRunIOV; 00034 #endif 00035 00036 class EcalEndcapMonitorClient: public edm::EDAnalyzer{ 00037 00038 friend class EcalEndcapMonitorXdaqClient; 00039 00040 public: 00041 00043 EcalEndcapMonitorClient(const edm::ParameterSet & ps); 00044 00046 virtual ~EcalEndcapMonitorClient(); 00047 00049 void analyze(void); 00050 void analyze(const edm::Event & e, const edm::EventSetup & c); 00051 00053 void beginJob(void); 00054 00056 void endJob(void); 00057 00059 void beginRun(void); 00060 void beginRun(const edm::Run & r, const edm::EventSetup & c); 00061 00063 void endRun(void); 00064 void endRun(const edm::Run & r, const edm::EventSetup & c); 00065 00067 void beginLuminosityBlock(const edm::LuminosityBlock & l, const edm::EventSetup & c); 00068 00070 void endLuminosityBlock(const edm::LuminosityBlock & l, const edm::EventSetup & c); 00071 00073 void reset(void); 00074 00076 void setup(void); 00077 00079 void cleanup(void); 00080 00082 void softReset(bool flag); 00083 00085 void beginRunDb(void); 00086 00088 void writeDb(void); 00089 00091 void endRunDb(void); 00092 00093 inline const char* getRunType( void ) { return( runType_ == -1 ? "UNKNOWN" : runTypes_[runType_].c_str() ); } 00094 00095 private: 00096 00097 int ievt_; 00098 int jevt_; 00099 00100 bool cloneME_; 00101 00102 bool verbose_; 00103 bool debug_; 00104 00105 int prescaleFactor_; 00106 00107 bool enableCleanup_; 00108 00109 std::string prefixME_; 00110 00111 bool produceReports_; 00112 00113 std::string inputFile_; 00114 std::string referenceFile_; 00115 00116 std::string dbName_; 00117 std::string dbHostName_; 00118 int dbHostPort_; 00119 std::string dbUserName_; 00120 std::string dbPassword_; 00121 00122 std::string dbTagName_; 00123 00124 std::string resetFile_; 00125 00126 bool mergeRuns_; 00127 00128 #ifdef WITH_ECAL_COND_DB 00129 RunIOV runiov_; 00130 MonRunIOV moniov_; 00131 #endif 00132 00133 int subrun_; 00134 00135 time_t current_time_; 00136 00137 time_t last_time_update_; 00138 time_t last_time_reset_; 00139 00140 time_t updateTime_; 00141 time_t dbUpdateTime_; 00142 00143 std::vector<int> superModules_; 00144 00145 std::vector<std::string> enabledClients_; 00146 00147 std::multimap<EEClient*,int> clientsRuns_; 00148 std::vector<std::string> runTypes_; 00149 std::vector<EEClient*> clients_; 00150 std::vector<std::string> clientsNames_; 00151 std::map<std::string,int> clientsStatus_; 00152 00153 EESummaryClient* summaryClient_; 00154 00155 DQMStore* dqmStore_; 00156 00157 std::string location_; 00158 00159 int runType_; 00160 int evtType_; 00161 00162 std::string status_; 00163 00164 int run_; 00165 int evt_; 00166 00167 bool begin_run_; 00168 bool end_run_; 00169 00170 bool forced_status_; 00171 00172 bool forced_update_; 00173 00174 int last_run_; 00175 00176 TH1F* h_; 00177 00178 }; 00179 00180 #endif