File indexing completed on 2023-03-17 11:09:22
0001 #ifndef HLTcore_HLTPrescaleRecorder_h
0002 #define HLTcore_HLTPrescaleRecorder_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include "FWCore/Framework/interface/Run.h"
0015 #include "FWCore/Framework/interface/LuminosityBlock.h"
0016 #include "FWCore/Framework/interface/Event.h"
0017 #include "FWCore/Framework/interface/EventSetup.h"
0018 #include "FWCore/Framework/interface/one/EDProducer.h"
0019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0020
0021 #include "FWCore/ServiceRegistry/interface/Service.h"
0022 #include "FWCore/PrescaleService/interface/PrescaleService.h"
0023 #include "CondCore/DBOutputService/interface/PoolDBOutputService.h"
0024
0025 #include "DataFormats/Common/interface/Handle.h"
0026 #include "FWCore/Framework/interface/ESHandle.h"
0027
0028 #include "DataFormats/HLTReco/interface/HLTPrescaleTable.h"
0029 #include "CondFormats/HLTObjects/interface/HLTPrescaleTableCond.h"
0030 #include "CondFormats/DataRecord/interface/HLTPrescaleTableRcd.h"
0031
0032 #include <map>
0033 #include <string>
0034 #include <vector>
0035
0036 namespace edm {
0037 class ConfigurationDescriptions;
0038 }
0039
0040
0041
0042
0043
0044 class HLTPrescaleRecorder : public edm::one::EDProducer<edm::EndRunProducer,
0045 edm::EndLuminosityBlockProducer,
0046 edm::one::WatchRuns,
0047 edm::one::WatchLuminosityBlocks> {
0048 public:
0049 explicit HLTPrescaleRecorder(const edm::ParameterSet&);
0050 ~HLTPrescaleRecorder() override;
0051 static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0052 void beginRun(edm::Run const& iRun, const edm::EventSetup& iSetup) final;
0053 void endRun(edm::Run const& iRun, const edm::EventSetup& iSetup) final;
0054 void endRunProduce(edm::Run& iRun, const edm::EventSetup& iSetup) final;
0055 void beginLuminosityBlock(edm::LuminosityBlock const& iLumi, const edm::EventSetup& iSetup) final;
0056 void endLuminosityBlock(edm::LuminosityBlock const& iLumi, const edm::EventSetup& iSetup) final;
0057 void endLuminosityBlockProduce(edm::LuminosityBlock& iLumi, const edm::EventSetup& iSetup) final;
0058 void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) final;
0059
0060 private:
0061
0062
0063 int src_;
0064
0065
0066 bool run_;
0067 bool lumi_;
0068 bool event_;
0069 bool condDB_;
0070
0071
0072
0073 std::string psetName_;
0074
0075 edm::InputTag hltInputTag_;
0076
0077 edm::EDGetTokenT<trigger::HLTPrescaleTable> hltInputToken_;
0078
0079 std::string hltDBTag_;
0080 edm::ESGetToken<trigger::HLTPrescaleTableCond, HLTPrescaleTableRcd> const hltPrescaleTableCondToken_;
0081
0082
0083 edm::service::PrescaleService* ps_;
0084
0085 cond::service::PoolDBOutputService* db_;
0086
0087
0088 edm::Handle<trigger::HLTPrescaleTable> hltHandle_;
0089
0090
0091 trigger::HLTPrescaleTable hlt_;
0092 };
0093 #endif