00001 // -*-c++-*- 00002 // 00003 // 00004 // $Id: HLTScalers.h,v 1.12 2008/09/03 13:59:05 wittich 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.12 2008/09/03 13:59:05 wittich 00011 // make HLT DQM path configurable via python parameter, 00012 // which defaults to HLT/HLTScalers_EvF 00013 // 00014 // Revision 1.11 2008/09/03 02:13:47 wittich 00015 // - bug fix in L1Scalers 00016 // - configurable dqm directory in L1SCalers 00017 // - other minor tweaks in HLTScalers 00018 // 00019 // Revision 1.10 2008/09/02 02:37:21 wittich 00020 // - split L1 code from HLTScalers into L1Scalers 00021 // - update cfi file accordingly 00022 // - make sure to cd to correct directory before booking ME's 00023 // 00024 // Revision 1.9 2008/08/22 20:56:55 wittich 00025 // - add client for HLT Scalers 00026 // - Move rate calculation to HLTScalersClient and slim down the 00027 // filter-farm part of HLTScalers 00028 // 00029 // Revision 1.8 2008/08/15 15:40:57 wteo 00030 // split hltScalers into smaller histos, calculate rates 00031 // 00032 // Revision 1.7 2008/08/01 14:37:33 bjbloom 00033 // Added ability to specify which paths are cross-correlated 00034 // 00035 // Revision 1.6 2008/07/04 15:57:18 wittich 00036 // - move histograms to HLT directory (was in L1T) 00037 // - add counter for number of lumi sections 00038 // - attempt to hlt label histo axes locally; disabled (it's illegible) 00039 // 00040 // Revision 1.5 2008/03/01 00:40:16 lat 00041 // DQM core migration. 00042 // 00043 // Revision 1.4 2007/12/11 17:24:54 wittich 00044 // - add extra monitoring histos (eg hlt exceptions and correlations) 00045 // 00046 // Revision 1.3 2007/12/04 20:24:32 wittich 00047 // - make hlt histograms variable width depending on path 00048 // - add strings for path names 00049 // - add int for nprocessed 00050 // - add L1 scaler locally derived on Kaori's suggestion 00051 // + updates to cfi file for this, need to include unpacking of GT 00052 // 00053 // Revision 1.2 2007/12/01 19:28:56 wittich 00054 // - fix cfi file (debug -> verbose, HLT -> FU for TriggerResults label) 00055 // - handle multiple beginRun for same run (don't call reset on DQM ) 00056 // - remove PathTimerService from cfg file in test subdir 00057 // 00058 // Revision 1.1 2007/11/26 16:37:50 wittich 00059 // Prototype HLT scaler information. 00060 // 00061 00062 #ifndef HLTSCALERS_H 00063 #define HLTSCALERS_H 00064 00065 #include "FWCore/Framework/interface/Frameworkfwd.h" 00066 #include "FWCore/Framework/interface/EDAnalyzer.h" 00067 00068 #include "DQMServices/Core/interface/DQMStore.h" 00069 00070 #include "DQMServices/Core/interface/MonitorElement.h" 00071 #include "FWCore/ParameterSet/interface/InputTag.h" 00072 00073 class HLTScalers: public edm::EDAnalyzer 00074 { 00075 public: 00077 HLTScalers(const edm::ParameterSet& ps); 00078 00080 virtual ~HLTScalers() {}; 00081 00083 void beginJob(const edm::EventSetup& c); 00084 00085 // /// Endjob 00086 // void endJob(void); 00087 00089 void beginRun(const edm::Run& run, const edm::EventSetup& c); 00090 00092 void endRun(const edm::Run& run, const edm::EventSetup& c); 00093 00094 00095 // /// Begin LumiBlock 00096 // void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 00097 // const edm::EventSetup& c) ; 00098 00101 void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 00102 const edm::EventSetup& c); 00103 00104 void analyze(const edm::Event& e, const edm::EventSetup& c) ; 00105 00106 00107 private: 00108 DQMStore * dbe_; 00109 MonitorElement *scalers_; 00110 MonitorElement *scalersException_; 00111 MonitorElement *hltCorrelations_; 00112 MonitorElement *detailedScalers_; 00113 std::string folderName_; // dqm folder name 00114 MonitorElement *nProc_; 00115 MonitorElement *nLumiBlock_; 00116 std::vector<MonitorElement*> hltPathNames_; 00117 edm::InputTag trigResultsSource_; 00118 bool resetMe_, monitorDaemon_; 00119 00120 int nev_; // Number of events processed 00121 int nLumi_; // number of lumi blocks 00122 int currentRun_; 00123 00124 }; 00125 00126 #endif // HLTSCALERS_H