CMS 3D CMS Logo

HLTScalersClient.h

Go to the documentation of this file.
00001 // -*-c++-*-
00002 // 
00003 // Client class for HLT Scalers module.
00004 // 
00005 // $Id: HLTScalersClient.h,v 1.3 2008/08/27 13:48:57 wittich Exp $
00006 
00007 // $Log: HLTScalersClient.h,v $
00008 // Revision 1.3  2008/08/27 13:48:57  wittich
00009 // re-add Don's 20 entry histograms with full bin labels
00010 //
00011 // Revision 1.2  2008/08/24 16:34:56  wittich
00012 // - rate calculation cleanups
00013 // - fix error logging with LogDebug
00014 // - report the actual lumi segment number that we think it might be
00015 //
00016 // Revision 1.1  2008/08/22 20:56:55  wittich
00017 // - add client for HLT Scalers
00018 // - Move rate calculation to HLTScalersClient and slim down the
00019 //   filter-farm part of HLTScalers
00020 //
00021 
00022 #ifndef HLTSCALERSCLIENT_H
00023 #define HLTSCALERSCLIENT_H
00024 
00025 #include "FWCore/Framework/interface/Frameworkfwd.h"
00026 #include "FWCore/Framework/interface/EDAnalyzer.h"
00027 
00028 #include "DQMServices/Core/interface/DQMStore.h"
00029 
00030 #include "DQMServices/Core/interface/MonitorElement.h"
00031 #include "FWCore/ParameterSet/interface/InputTag.h"
00032 
00033 // HARD CODE THE NUMBER OF HISTOGRAMS TO 200, LENGTH OF MONITOR to 2000 
00034 // segments
00035 #define MAX_PATHS 200
00036 #define MAX_LUMI_SEG 2000
00037 
00038 class HLTScalersClient: public edm::EDAnalyzer
00039 {
00040 public:
00042   HLTScalersClient(const edm::ParameterSet& ps);
00043   
00045   virtual ~HLTScalersClient() {
00046   };
00047   
00049   void beginJob(const edm::EventSetup& c);
00050 
00051 //   /// Endjob
00052 //   void endJob(void);
00053   
00055   void beginRun(const edm::Run& run, const edm::EventSetup& c);
00056 
00058   void endRun(const edm::Run& run, const edm::EventSetup& c);
00059 
00060   
00063   void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 
00064                           const edm::EventSetup& c);
00065 
00066   // unused
00067   void analyze(const edm::Event& e, const edm::EventSetup& c) ;
00068 
00069 
00070 private:
00071   DQMStore * dbe_;
00072 
00073   int nev_; // Number of events processed
00074   int nLumi_; // number of lumi blocks
00075   int currentRun_;
00076 
00077   unsigned long int scalerCounters_[MAX_PATHS];
00078   MonitorElement *currentRate_;
00079   int currentLumiBlockNumber_;
00080   MonitorElement *rateHistories_[MAX_PATHS]; // HARD CODE FOR NOW
00081 
00082   MonitorElement *hltCurrentRate_[MAX_PATHS];
00083   bool first_;
00084 };
00085 
00086 
00087 #endif // HLTSCALERSCLIENT_H

Generated on Tue Jun 9 17:33:43 2009 for CMSSW by  doxygen 1.5.4