CMS 3D CMS Logo

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

Go to the documentation of this file.
00001 #ifndef ZDCMonitorClient_H
00002 #define ZDCMonitorClient_H
00003 
00004 
00005 #include "FWCore/Framework/interface/EDAnalyzer.h"
00006 #include "FWCore/Framework/interface/Event.h"
00007 #include "FWCore/Framework/interface/Run.h"
00008 #include "FWCore/Framework/interface/LuminosityBlock.h"
00009 #include "FWCore/Framework/interface/MakerMacros.h"
00010 
00011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00012 
00013 class DQMStore;
00014 class TH2F;
00015 class TH1F;
00016 class TFile;
00017 
00018 class ZDCMonitorClient : public edm::EDAnalyzer{
00019   
00020 public:
00021   
00023   ZDCMonitorClient();
00024   ZDCMonitorClient(const edm::ParameterSet& ps);
00025   
00027   ~ZDCMonitorClient();
00028   
00029   // Initialize
00030   void initialize(const edm::ParameterSet& ps);
00031   void offlineSetup();
00032 
00034   void analyze(void);
00035   void analyze(const edm::Event& evt, const edm::EventSetup& es);
00036   
00038   void beginJob();
00040   void beginRun(const edm::Run& r, const edm::EventSetup & c);
00042   void beginLuminosityBlock(const edm::LuminosityBlock & l, const edm::EventSetup & c);
00043 
00045   void endJob(void);
00047   void endRun(const edm::Run & r, const edm::EventSetup & c);
00049   void endLuminosityBlock(const edm::LuminosityBlock & l, const edm::EventSetup & c);
00050   
00052   void htmlOutput(void);
00053 
00055   void report(bool update);
00056 
00058   void errorSummary();
00059 
00061   void createTests(void);
00062 
00064   void resetAllME(void);
00065 
00066   //Offline output functions
00067   void loadHistograms(TFile* infile, const char* fname);
00068   void dumpHistograms(int& runNum, std::vector<TH1F*> &hist1d, std::vector<TH2F*> &hist2d);
00069 
00071   bool prescale();
00072 
00073  private:
00074   void removeAllME(void);
00075   void writeDBfile();
00076   /********************************************************/
00077   //  The following member variables can be specified in  //
00078   //  the configuration input file for the process.       //
00079   /********************************************************/
00080 
00084   int prescaleEvt_;    
00085   int prescaleLS_;     
00086   int prescaleTime_;   
00087   int prescaleUpdate_; 
00088 
00091   std::string monitorName_;
00092 
00094   int debug_ ;
00095   
00096   // Timing diagnostic switch
00097   bool showTiming_; // controls whether to show timing diagnostic info 
00098   edm::CPUTimer cpu_timer; //  
00099 
00101     //int nevt_; // counts number of events actually analyzed by ZDCMonitorClient
00102   int nlumisecs_;
00103   bool saved_;
00104   bool Online_;
00105   
00106   struct{
00107     timeval startTV,updateTV;
00108     double startTime;
00109     double elapsedTime; 
00110     double updateTime;
00111   } psTime_;    
00112   
00114   DQMStore* dbe_;  
00115   
00116   // environment variables
00117   int irun_,ievent_,itime_;
00118   int ilumisec_;
00119   int maxlumisec_, minlumisec_;
00120 
00121   time_t mytime_;
00122 
00123   std::string rootFolder_;
00124 
00125   int ievt_; // counts number of events read by client (and analyzed by tasks)
00126   int resetEvents_;
00127   int resetLS_;
00128   
00129   bool runningStandalone_;
00130   bool enableMonitorDaemon_;
00131 
00132   std::string inputFile_;
00133   std::string baseHtmlDir_;
00134 
00135 };
00136 
00137 #endif