CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/DQM/HcalMonitorClient/interface/HcalBaseDQClient.h

Go to the documentation of this file.
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: 2011/04/12 18:25:42 $
00016  * $Revision: 1.6 $
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 Online_; // fix to problem of April 2011, in which online DQM crashes in endJob
00068 
00069   bool testenabled_;
00070   int minevents_; // minimum number of events for test to pass
00071   double minerrorrate_;
00072 
00073   MonitorElement* ProblemCells;
00074   EtaPhiHists* ProblemCellsByDepth;
00075 
00076   std::vector<std::string> problemnames_;
00077 
00078   std::map<HcalDetId, unsigned int> badstatusmap;
00079   DQMStore* dqmStore_;
00080   bool enoughevents_;
00081 }; // class HcalBaseDQClient
00082 
00083 
00084 
00085 #endif