CMS 3D CMS Logo

PrescaleWeightProvider.h
Go to the documentation of this file.
1 #ifndef CommonTools_TriggerUtils_PrescaleWeightProvider_h
2 #define CommonTools_TriggerUtils_PrescaleWeightProvider_h
3 
4 // -*- C++ -*-
5 //
6 // Package: CommonTools/TriggerUtils
7 // Class: PrescaleWeightProvider
8 //
21 #include <memory>
22 #include <string>
23 #include <vector>
24 
26 
33 
35 
37 
38 namespace edm {
39  class ConsumesCollector;
40  class Event;
41  class EventSetup;
42  class ParameterSet;
43  class Run;
44  class TriggerResults;
45 } // namespace edm
46 
49  bool init_;
50  std::unique_ptr<HLTPrescaleProvider> hltPrescaleProvider_;
52 
53  std::vector<std::string> l1SeedPaths_;
54 
55  // configuration parameters
56  unsigned verbosity_; // optional (default: 0)
57  edm::InputTag triggerResultsTag_; // optional (default: "TriggerResults::HLT")
59  edm::InputTag l1GtTriggerMenuLiteTag_; // optional (default: "l1GtTriggerMenuLite")
60  edm::EDGetTokenT<L1GtTriggerMenuLite> l1GtTriggerMenuLiteToken_; // optional (default: "l1GtTriggerMenuLite")
61  std::vector<std::string> hltPaths_;
62 
63 public:
64  // The constructor must be called from the ED module's c'tor
65  template <typename T>
67 
68  template <typename T>
70 
72 
73  // to be called from the ED module's beginRun() method
74  void initRun(const edm::Run& run, const edm::EventSetup& setup);
75  // to be called from the ED module's event loop method
77 
78 private:
80 
81  void parseL1Seeds(const std::string& l1Seeds);
82 };
83 
84 template <typename T>
86  : PrescaleWeightProvider(config, iC, module) {}
87 
88 template <typename T>
91  hltPrescaleProvider_.reset(new HLTPrescaleProvider(config, iC, module));
92 }
93 #endif
Handle.h
PrescaleWeightProvider::hltPrescaleProvider_
std::unique_ptr< HLTPrescaleProvider > hltPrescaleProvider_
Definition: PrescaleWeightProvider.h:50
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< edm::TriggerResults >
edm
HLT enums.
Definition: AlignableModifier.h:19
PrescaleWeightProvider::initRun
void initRun(const edm::Run &run, const edm::EventSetup &setup)
Definition: PrescaleWeightProvider.cc:60
PrescaleWeightProvider::hltPaths_
std::vector< std::string > hltPaths_
Definition: PrescaleWeightProvider.h:61
edm::Handle< L1GtTriggerMenuLite >
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
PrescaleWeightProvider::~PrescaleWeightProvider
~PrescaleWeightProvider()
Definition: PrescaleWeightProvider.h:71
PrescaleWeightProvider::triggerResultsToken_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
Definition: PrescaleWeightProvider.h:58
config
Definition: config.py:1
PrescaleWeightProvider::configured_
bool configured_
Definition: PrescaleWeightProvider.h:48
PrescaleWeightProvider::prescaleWeight
int prescaleWeight(const edm::Event &event, const edm::EventSetup &setup)
Definition: PrescaleWeightProvider.cc:97
PrescaleWeightProvider
This class takes a vector of HLT paths and returns a weight based on their HLT and L1 prescales....
Definition: PrescaleWeightProvider.h:47
Run.h
Event
EDGetToken.h
PrescaleWeightProvider::l1GtTriggerMenuLiteTag_
edm::InputTag l1GtTriggerMenuLiteTag_
Definition: PrescaleWeightProvider.h:59
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PrescaleWeightProvider::parseL1Seeds
void parseL1Seeds(const std::string &l1Seeds)
Definition: PrescaleWeightProvider.cc:200
PrescaleWeightProvider::verbosity_
unsigned verbosity_
Definition: PrescaleWeightProvider.h:56
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
ParameterSet
Definition: Functions.h:16
HLTPrescaleProvider
Definition: HLTPrescaleProvider.h:38
edm::EventSetup
Definition: EventSetup.h:57
PrescaleWeightProvider::triggerMenuLite_
edm::Handle< L1GtTriggerMenuLite > triggerMenuLite_
Definition: PrescaleWeightProvider.h:51
InputTag.h
L1GtTriggerMenuLite
Definition: L1GtTriggerMenuLite.h:39
writedatasetfile.run
run
Definition: writedatasetfile.py:27
T
long double T
Definition: Basic3DVectorLD.h:48
PrescaleWeightProvider::PrescaleWeightProvider
PrescaleWeightProvider(const edm::ParameterSet &config, edm::ConsumesCollector &&iC, T &module)
Definition: PrescaleWeightProvider.h:85
EventSetup.h
HLTPrescaleProvider.h
ConsumesCollector.h
PrescaleWeightProvider::init_
bool init_
Definition: PrescaleWeightProvider.h:49
EventSetup
event
Definition: event.py:1
HLTObjectsMonitor_cfi.TriggerResults
TriggerResults
Definition: HLTObjectsMonitor_cfi.py:9
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
PrescaleWeightProvider::l1SeedPaths_
std::vector< std::string > l1SeedPaths_
Definition: PrescaleWeightProvider.h:53
PrescaleWeightProvider::triggerResultsTag_
edm::InputTag triggerResultsTag_
Definition: PrescaleWeightProvider.h:57
PrescaleWeightProvider::l1GtTriggerMenuLiteToken_
edm::EDGetTokenT< L1GtTriggerMenuLite > l1GtTriggerMenuLiteToken_
Definition: PrescaleWeightProvider.h:60
Run