CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DQM/TrigXMonitor/interface/HLTScalers.h

Go to the documentation of this file.
00001 // -*-c++-*-
00002 // 
00003 //
00004 // $Id: HLTScalers.h,v 1.20 2011/03/30 21:35:40 fwyzard Exp $
00005 // Class to collect HLT scaler information 
00006 // for Trigger Cross Section Monitor
00007 // [wittich 11/07] 
00008 
00009 // $Log: HLTScalers.h,v $
00010 // Revision 1.20  2011/03/30 21:35:40  fwyzard
00011 // make sure all members are initialized
00012 //
00013 // Revision 1.19  2011/03/29 09:46:03  rekovic
00014 // clean vector pairPDPaths in beginRun and tidy up
00015 //
00016 // Revision 1.18  2011/03/24 18:25:45  rekovic
00017 // Add single 1D plot of streamA content
00018 //
00019 // Revision 1.17  2010/03/17 20:54:51  wittich
00020 // add scalers that I manually reset on beginLumi
00021 //
00022 // Revision 1.16  2010/02/24 17:43:47  wittich
00023 // - keep trying to get path names if it doesn't work first time
00024 // - move the Bx histograms out of raw to the toplevel directory.
00025 //
00026 // Revision 1.15  2010/02/11 00:11:05  wmtan
00027 // Adapt to moved framework header
00028 //
00029 // Revision 1.14  2010/02/02 11:42:53  wittich
00030 // new diagnostic histograms
00031 //
00032 // Revision 1.13  2009/11/20 00:39:21  lorenzo
00033 // fixes
00034 //
00035 // Revision 1.12  2008/09/03 13:59:05  wittich
00036 // make HLT DQM path configurable via python parameter,
00037 // which defaults to HLT/HLTScalers_EvF
00038 //
00039 // Revision 1.11  2008/09/03 02:13:47  wittich
00040 // - bug fix in L1Scalers
00041 // - configurable dqm directory in L1SCalers
00042 // - other minor tweaks in HLTScalers
00043 //
00044 // Revision 1.10  2008/09/02 02:37:21  wittich
00045 // - split L1 code from HLTScalers into L1Scalers
00046 // - update cfi file accordingly
00047 // - make sure to cd to correct directory before booking ME's
00048 //
00049 // Revision 1.9  2008/08/22 20:56:55  wittich
00050 // - add client for HLT Scalers
00051 // - Move rate calculation to HLTScalersClient and slim down the
00052 //   filter-farm part of HLTScalers
00053 //
00054 // Revision 1.8  2008/08/15 15:40:57  wteo
00055 // split hltScalers into smaller histos, calculate rates
00056 //
00057 // Revision 1.7  2008/08/01 14:37:33  bjbloom
00058 // Added ability to specify which paths are cross-correlated
00059 //
00060 
00061 #ifndef HLTSCALERS_H
00062 #define HLTSCALERS_H
00063 
00064 #include "FWCore/Framework/interface/Frameworkfwd.h"
00065 #include "FWCore/Framework/interface/EDAnalyzer.h"
00066 
00067 #include "DQMServices/Core/interface/DQMStore.h"
00068 
00069 #include "DQMServices/Core/interface/MonitorElement.h"
00070 #include "FWCore/Utilities/interface/InputTag.h"
00071 #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
00072 
00073 
00074 class HLTScalers: public edm::EDAnalyzer
00075 {
00076 public:
00078   HLTScalers(const edm::ParameterSet& ps);
00079   
00081   virtual ~HLTScalers() {};
00082   
00084   void beginJob(void);
00085 
00086 //   /// Endjob
00087 //   void endJob(void);
00088   
00090   void beginRun(const edm::Run& run, const edm::EventSetup& c);
00091 
00093   void endRun(const edm::Run& run, const edm::EventSetup& c);
00094 
00095   
00097   void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 
00098                             const edm::EventSetup& c) ;
00099 
00102   void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 
00103                           const edm::EventSetup& c);
00104 
00105   void analyze(const edm::Event& e, const edm::EventSetup& c) ;
00106 
00107 
00108 private:
00109 
00110   HLTConfigProvider hltConfig_;
00111   std::string folderName_; // dqm folder name
00112   std::string processname_;
00113   std::vector <std::pair<std::string, std::vector<std::string> > > pairPDPaths_;
00114   edm::InputTag trigResultsSource_;
00115 
00116   DQMStore * dbe_;
00117   MonitorElement *scalersPD_;
00118   MonitorElement *scalers_;
00119   MonitorElement *scalersN_;
00120   MonitorElement *scalersException_;
00121   MonitorElement *hltCorrelations_;
00122   MonitorElement *detailedScalers_;
00123   MonitorElement *nProc_;
00124   MonitorElement *nLumiBlock_;
00125   MonitorElement *hltBx_, *hltBxVsPath_;
00126   MonitorElement *hltOverallScaler_;
00127   MonitorElement *hltOverallScalerN_;
00128   MonitorElement *diagnostic_;
00129 
00130   bool resetMe_, sentPaths_, monitorDaemon_; 
00131 
00132   int nev_; // Number of events processed
00133   int nLumi_; // number of lumi blocks
00134   int currentRun_;
00135 
00136 };
00137 
00138 #endif // HLTSCALERS_H