00001 #ifndef EcalBarrelMonitorClient_H 00002 #define EcalBarrelMonitorClient_H 00003 00004 /* 00005 * \file EcalBarrelMonitorClient.h 00006 * 00007 * $Date: 2012/04/27 13:45:58 $ 00008 * $Revision: 1.128 $ 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/EcalBarrelMonitorClient/interface/EBClient.h" 00024 00025 #include "DQM/EcalBarrelMonitorClient/interface/EBSummaryClient.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 EcalBarrelMonitorClient: public edm::EDAnalyzer{ 00037 00038 friend class EcalBarrelMonitorXdaqClient; 00039 00040 public: 00041 00043 EcalBarrelMonitorClient(const edm::ParameterSet & ps); 00044 00046 virtual ~EcalBarrelMonitorClient(); 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 inputFile_; 00110 00111 std::string dbName_; 00112 std::string dbHostName_; 00113 int dbHostPort_; 00114 std::string dbUserName_; 00115 std::string dbPassword_; 00116 00117 std::string dbTagName_; 00118 00119 std::string resetFile_; 00120 00121 bool mergeRuns_; 00122 00123 #ifdef WITH_ECAL_COND_DB 00124 RunIOV runiov_; 00125 MonRunIOV moniov_; 00126 #endif 00127 00128 int subrun_; 00129 00130 time_t current_time_; 00131 00132 time_t last_time_update_; 00133 time_t last_time_reset_; 00134 00135 time_t updateTime_; 00136 time_t dbUpdateTime_; 00137 00138 std::vector<int> superModules_; 00139 00140 std::vector<std::string> enabledClients_; 00141 00142 std::multimap<EBClient*,int> clientsRuns_; 00143 std::vector<std::string> runTypes_; 00144 std::vector<EBClient*> clients_; 00145 std::vector<std::string> clientsNames_; 00146 std::map<std::string,int> clientsStatus_; 00147 00148 EBSummaryClient* summaryClient_; 00149 00150 DQMStore* dqmStore_; 00151 00152 std::string prefixME_; 00153 00154 bool produceReports_; 00155 00156 std::string location_; 00157 00158 int runType_; 00159 int evtType_; 00160 00161 std::string status_; 00162 00163 int run_; 00164 int evt_; 00165 00166 bool begin_run_; 00167 bool end_run_; 00168 00169 bool forced_status_; 00170 00171 bool forced_update_; 00172 00173 int last_run_; 00174 00175 TH1F* h_; 00176 00177 }; 00178 00179 #endif