Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:13

0001 // -*-c++-*-
0002 //
0003 //
0004 // Class to collect HLT scaler information
0005 // for Trigger Cross Section Monitor
0006 // [wittich 11/07]
0007 
0008 // Revision 1.19  2011/03/29 09:46:03  rekovic
0009 // clean vector pairPDPaths in dqmBeginRun and tidy up
0010 //
0011 // Revision 1.18  2011/03/24 18:25:45  rekovic
0012 // Add single 1D plot of streamA content
0013 //
0014 // Revision 1.17  2010/03/17 20:54:51  wittich
0015 // add scalers that I manually reset on beginLumi
0016 //
0017 // Revision 1.16  2010/02/24 17:43:47  wittich
0018 // - keep trying to get path names if it doesn't work first time
0019 // - move the Bx histograms out of raw to the toplevel directory.
0020 //
0021 // Revision 1.15  2010/02/11 00:11:05  wmtan
0022 // Adapt to moved framework header
0023 //
0024 // Revision 1.14  2010/02/02 11:42:53  wittich
0025 // new diagnostic histograms
0026 //
0027 // Revision 1.13  2009/11/20 00:39:21  lorenzo
0028 // fixes
0029 //
0030 // Revision 1.12  2008/09/03 13:59:05  wittich
0031 // make HLT DQM path configurable via python parameter,
0032 // which defaults to HLT/HLTScalers_EvF
0033 //
0034 // Revision 1.11  2008/09/03 02:13:47  wittich
0035 // - bug fix in L1Scalers
0036 // - configurable dqm directory in L1SCalers
0037 // - other minor tweaks in HLTScalers
0038 //
0039 // Revision 1.10  2008/09/02 02:37:21  wittich
0040 // - split L1 code from HLTScalers into L1Scalers
0041 // - update cfi file accordingly
0042 // - make sure to cd to correct directory before booking ME's
0043 //
0044 // Revision 1.9  2008/08/22 20:56:55  wittich
0045 // - add client for HLT Scalers
0046 // - Move rate calculation to HLTScalersClient and slim down the
0047 //   filter-farm part of HLTScalers
0048 //
0049 // Revision 1.8  2008/08/15 15:40:57  wteo
0050 // split hltScalers into smaller histos, calculate rates
0051 //
0052 // Revision 1.7  2008/08/01 14:37:33  bjbloom
0053 // Added ability to specify which paths are cross-correlated
0054 //
0055 
0056 #ifndef HLTSCALERS_H
0057 #define HLTSCALERS_H
0058 
0059 #include "FWCore/Framework/interface/Frameworkfwd.h"
0060 #include "DQMServices/Core/interface/DQMStore.h"
0061 #include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
0062 #include "FWCore/Utilities/interface/InputTag.h"
0063 #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
0064 
0065 class HLTScalers : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlocks> {
0066 public:
0067   HLTScalers(const edm::ParameterSet &ps);
0068   ~HLTScalers() override = default;
0069 
0070   void dqmBeginRun(const edm::Run &run, const edm::EventSetup &c) override;
0071   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0072   void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override;
0073   void analyze(const edm::Event &e, const edm::EventSetup &c) override;
0074   /// DQM Client Diagnostic should be performed here:
0075   void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override;
0076   void dqmEndRun(const edm::Run &run, const edm::EventSetup &c) override;
0077 
0078 private:
0079   HLTConfigProvider hltConfig_;
0080   std::string folderName_;  // dqm folder name
0081   std::string processname_;
0082   std::vector<std::pair<std::string, std::vector<std::string> > > pairPDPaths_;
0083   edm::EDGetTokenT<edm::TriggerResults> trigResultsSource_;
0084 
0085   MonitorElement *scalersPD_;
0086   MonitorElement *scalers_;
0087   MonitorElement *scalersN_;
0088   MonitorElement *scalersException_;
0089   MonitorElement *hltCorrelations_;
0090   MonitorElement *detailedScalers_;
0091   MonitorElement *nProc_;
0092   MonitorElement *nLumiBlock_;
0093   MonitorElement *hltBx_, *hltBxVsPath_;
0094   MonitorElement *hltOverallScaler_;
0095   MonitorElement *hltOverallScalerN_;
0096   MonitorElement *diagnostic_;
0097 
0098   bool resetMe_, sentPaths_, monitorDaemon_;
0099 
0100   int nev_;    // Number of events processed
0101   int nLumi_;  // number of lumi blocks
0102   int currentRun_;
0103 };
0104 
0105 #endif  // HLTSCALERS_H