CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/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 class HcalLogicalMap;
00013 
00014 /*
00015  * \file HcalBaseDQClient.h
00016  * 
00017  * $Date: 2012/11/12 23:26:18 $
00018  * $Revision: 1.9 $
00019  * \author J. Temple
00020  * \brief Hcal Monitor Client base class
00021  * based on code in EcalBarrelMonitorClient/interface/EBClient.h
00022  */
00023 
00024 
00025 class HcalBaseDQClient
00026 {
00027  public:
00028   HcalBaseDQClient(){name_="HcalBaseDQClient";subdir_="HcalInfo";badChannelStatusMask_=0;enoughevents_=true;minerrorrate_=0;minevents_=0;logicalMap_=0; needLogicalMap_=false;};
00029   HcalBaseDQClient(std::string s, const edm::ParameterSet& ps);
00030   virtual ~HcalBaseDQClient(void);
00031   
00032   // Overload these functions with client-specific instructions
00033   virtual void beginJob(void);
00034   virtual void beginRun(void)          {}
00035   virtual void setup(void)             {}
00036 
00037   virtual void analyze(void)           {enoughevents_=true;} // fill new histograms
00038   virtual void calculateProblems(void) {} // update/fill ProblemCell histograms
00039   
00040   virtual void endRun(void)            {}
00041   virtual void endJob(void)            {}
00042   virtual void cleanup(void)           {}
00043   
00044   virtual bool hasErrors_Temp(void)    {return false;};
00045   virtual bool hasWarnings_Temp(void)  {return false;};
00046   virtual bool hasOther_Temp(void)     {return false;};
00047   virtual bool test_enabled(void)      {return false;};
00048 
00049   virtual void htmlOutput(std::string htmlDir);
00050   virtual void setStatusMap(std::map<HcalDetId, unsigned int>& map);
00051   virtual void updateChannelStatus(std::map<HcalDetId, unsigned int>& myqual){};     
00052   
00053   virtual bool validHtmlOutput();
00054 
00055   void getLogicalMap(const edm::EventSetup& es);
00056 
00057   inline void setEventSetup(const edm::EventSetup& es) 
00058     { c = &(es);  }
00059   const edm::EventSetup *c;
00060   std::string name(){return name_;};
00061   // make these private, with public accessors, at some point?
00062   std::string name_;
00063   std::string prefixME_;
00064   std::string subdir_;
00065   bool cloneME_;
00066   bool enableCleanup_;
00067   int debug_;
00068   int badChannelStatusMask_; 
00069   bool validHtmlOutput_;
00070 
00071   bool Online_; // fix to problem of April 2011, in which online DQM crashes in endJob
00072 
00073   bool testenabled_;
00074   int minevents_; // minimum number of events for test to pass
00075   double minerrorrate_;
00076 
00077   MonitorElement* ProblemCells;
00078   EtaPhiHists* ProblemCellsByDepth;
00079 
00080   std::vector<std::string> problemnames_;
00081 
00082   std::map<HcalDetId, unsigned int> badstatusmap;
00083   DQMStore* dqmStore_;
00084   bool enoughevents_;
00085 
00086   bool needLogicalMap_;
00087   HcalLogicalMap* logicalMap_;
00088 
00089 }; // class HcalBaseDQClient
00090 
00091 
00092 
00093 #endif