00001 #ifndef HcalBaseDQClient_GUARD_H 00002 #define HcalBaseDQClient_GUARD_H 00003 00004 #include <string> 00005 #include "DQMServices/Core/interface/MonitorElement.h" 00006 #include "DQMServices/Core/interface/DQMStore.h" 00007 #include "DataFormats/HcalDetId/interface/HcalDetId.h" 00008 #include "DQM/HcalMonitorTasks/interface/HcalEtaPhiHists.h" 00009 #include "DQM/HcalMonitorClient/interface/HcalHistoUtils.h" 00010 #include "FWCore/ServiceRegistry/interface/Service.h" 00011 00012 /* 00013 * \file HcalBaseDQClient.h 00014 * 00015 * $Date: 2010/11/17 19:17:36 $ 00016 * $Revision: 1.5 $ 00017 * \author J. Temple 00018 * \brief Hcal Monitor Client base class 00019 * based on code in EcalBarrelMonitorClient/interface/EBClient.h 00020 */ 00021 00022 00023 class HcalBaseDQClient 00024 { 00025 public: 00026 HcalBaseDQClient(){name_="HcalBaseDQClient";subdir_="HcalInfo";badChannelStatusMask_=0;enoughevents_=true;minerrorrate_=0;minevents_=0;}; 00027 HcalBaseDQClient(std::string s, const edm::ParameterSet& ps); 00028 ~HcalBaseDQClient(void){} 00029 00030 // Overload these functions with client-specific instructions 00031 virtual void beginJob(void); 00032 virtual void beginRun(void) {} 00033 virtual void setup(void) {} 00034 00035 virtual void analyze(void) {enoughevents_=true;} // fill new histograms 00036 virtual void calculateProblems(void) {} // update/fill ProblemCell histograms 00037 00038 virtual void endRun(void) {} 00039 virtual void endJob(void) {} 00040 virtual void cleanup(void) {} 00041 00042 virtual bool hasErrors_Temp(void) {return false;}; 00043 virtual bool hasWarnings_Temp(void) {return false;}; 00044 virtual bool hasOther_Temp(void) {return false;}; 00045 virtual bool test_enabled(void) {return false;}; 00046 00047 virtual void htmlOutput(std::string htmlDir); 00048 virtual void setStatusMap(std::map<HcalDetId, unsigned int>& map); 00049 virtual void updateChannelStatus(std::map<HcalDetId, unsigned int>& myqual){}; 00050 00051 virtual bool validHtmlOutput(); 00052 00053 inline void setEventSetup(const edm::EventSetup& es) 00054 { c = &(es); } 00055 const edm::EventSetup *c; 00056 std::string name(){return name_;}; 00057 // make these private, with public accessors, at some point? 00058 std::string name_; 00059 std::string prefixME_; 00060 std::string subdir_; 00061 bool cloneME_; 00062 bool enableCleanup_; 00063 int debug_; 00064 int badChannelStatusMask_; 00065 bool validHtmlOutput_; 00066 00067 bool testenabled_; 00068 int minevents_; // minimum number of events for test to pass 00069 double minerrorrate_; 00070 00071 MonitorElement* ProblemCells; 00072 EtaPhiHists* ProblemCellsByDepth; 00073 00074 std::vector<std::string> problemnames_; 00075 00076 std::map<HcalDetId, unsigned int> badstatusmap; 00077 DQMStore* dqmStore_; 00078 bool enoughevents_; 00079 }; // class HcalBaseDQClient 00080 00081 00082 00083 #endif