CMS 3D CMS Logo

HLTPrescaleProvider.h
Go to the documentation of this file.
1 #ifndef HLTcore_HLTPrescaleProvider_h
2 #define HLTcore_HLTPrescaleProvider_h
3 
23 
24 #include <memory>
25 #include <string>
26 #include <utility>
27 #include <vector>
28 
29 namespace edm {
30  class ConsumesCollector;
31  class Event;
32  class EventSetup;
33  class ParameterSet;
34  class Run;
35 } // namespace edm
36 
38 public:
39  template <typename T>
41 
42  template <typename T>
44 
49  bool init(const edm::Run& iRun, const edm::EventSetup& iSetup, const std::string& processName, bool& changed);
50 
52  L1GtUtils const& l1GtUtils() const;
53  l1t::L1TGlobalUtil const& l1tGlobalUtil() const;
54 
57  int prescaleSet(const edm::Event& iEvent, const edm::EventSetup& iSetup);
58  // negative == error
59 
61  unsigned int prescaleValue(const edm::Event& iEvent, const edm::EventSetup& iSetup, const std::string& trigger);
62 
64  std::pair<int, int> prescaleValues(const edm::Event& iEvent,
65  const edm::EventSetup& iSetup,
66  const std::string& trigger);
67  // any one negative => error in retrieving this (L1T or HLT) prescale
68 
69  // In case of a complex Boolean expression as L1 seed
70  std::pair<std::vector<std::pair<std::string, int> >, int> prescaleValuesInDetail(const edm::Event& iEvent,
71  const edm::EventSetup& iSetup,
72  const std::string& trigger);
73  // Event rejected by HLTPrescaler on ith HLT path?
74  bool rejectedByHLTPrescaler(const edm::TriggerResults& triggerResults, unsigned int i) const;
75 
76 private:
77  void checkL1GtUtils() const;
78  void checkL1TGlobalUtil() const;
79 
81  std::unique_ptr<L1GtUtils> l1GtUtils_;
82  std::unique_ptr<l1t::L1TGlobalUtil> l1tGlobalUtil_;
83  unsigned char count_[5] = {0, 0, 0, 0, 0};
84  bool inited_ = false;
85 };
86 
87 template <typename T>
90 
91 template <typename T>
93  unsigned int stageL1Trigger = pset.getParameter<unsigned int>("stageL1Trigger");
94  if (stageL1Trigger <= 1) {
95  l1GtUtils_ = std::make_unique<L1GtUtils>(pset, iC, false, module, L1GtUtils::UseEventSetupIn::Run);
96  } else {
97  l1tGlobalUtil_ = std::make_unique<l1t::L1TGlobalUtil>(pset, iC, module, l1t::UseEventSetupIn::Run);
98  }
99 }
100 #endif
HLTPrescaleProvider::checkL1TGlobalUtil
void checkL1TGlobalUtil() const
Definition: HLTPrescaleProvider.cc:369
HLTPrescaleProvider::l1tGlobalUtil
l1t::L1TGlobalUtil const & l1tGlobalUtil() const
Definition: HLTPrescaleProvider.cc:55
mps_fire.i
i
Definition: mps_fire.py:355
TriggerResults.h
edm::Run
Definition: Run.h:45
HLTPrescaleProvider::hltConfigProvider
HLTConfigProvider const & hltConfigProvider() const
Definition: HLTPrescaleProvider.h:51
edm
HLT enums.
Definition: AlignableModifier.h:19
HLTPrescaleProvider::HLTPrescaleProvider
HLTPrescaleProvider(edm::ParameterSet const &pset, edm::ConsumesCollector &&iC, T &module)
Definition: HLTPrescaleProvider.h:88
HLTPrescaleProvider::prescaleSet
int prescaleSet(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Definition: HLTPrescaleProvider.cc:60
triggerResults
static const std::string triggerResults
Definition: EdmProvDump.cc:45
HLTPrescaleProvider::count_
unsigned char count_[5]
Definition: HLTPrescaleProvider.h:83
l1t::UseEventSetupIn::Run
HLTPrescaleProvider::rejectedByHLTPrescaler
bool rejectedByHLTPrescaler(const edm::TriggerResults &triggerResults, unsigned int i) const
Definition: HLTPrescaleProvider.cc:355
GlobalLogicParser.h
HLTPrescaleProvider::l1GtUtils
L1GtUtils const & l1GtUtils() const
Definition: HLTPrescaleProvider.cc:50
PDWG_DiPhoton_SD_cff.stageL1Trigger
stageL1Trigger
Definition: PDWG_DiPhoton_SD_cff.py:40
l1t::L1TGlobalUtil
Definition: L1TGlobalUtil.h:42
HLTPrescaleProvider::l1tGlobalUtil_
std::unique_ptr< l1t::L1TGlobalUtil > l1tGlobalUtil_
Definition: HLTPrescaleProvider.h:82
Event
L1GtUtils
Definition: L1GtUtils.h:66
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:36
ParameterSet
Definition: Functions.h:16
L1GtUtils::UseEventSetupIn::Run
HLTPrescaleProvider::prescaleValuesInDetail
std::pair< std::vector< std::pair< std::string, int > >, int > prescaleValuesInDetail(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger)
Definition: HLTPrescaleProvider.cc:224
HLTPrescaleProvider::inited_
bool inited_
Definition: HLTPrescaleProvider.h:84
iEvent
int iEvent
Definition: GenABIO.cc:224
HLTPrescaleProvider
Definition: HLTPrescaleProvider.h:37
HLTPrescaleProvider::l1GtUtils_
std::unique_ptr< L1GtUtils > l1GtUtils_
Definition: HLTPrescaleProvider.h:81
edm::EventSetup
Definition: EventSetup.h:57
HLTConfigProvider.h
module
Definition: vlib.h:198
HLTPrescaleProvider::init
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
Definition: HLTPrescaleProvider.cc:21
SimL1EmulatorRepack_CalouGT_cff.processName
processName
Definition: SimL1EmulatorRepack_CalouGT_cff.py:17
HLTConfigProvider
Definition: HLTConfigProvider.h:28
T
long double T
Definition: Basic3DVectorLD.h:48
L1GtUtils.h
HLTPrescaleProvider::prescaleValue
unsigned int prescaleValue(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger)
combining the two methods above
Definition: HLTPrescaleProvider.cc:105
L1TGlobalUtil.h
trigger
Definition: HLTPrescaleTableCond.h:8
HLTPrescaleProvider::checkL1GtUtils
void checkL1GtUtils() const
Definition: HLTPrescaleProvider.cc:359
EventSetup
HLTPrescaleProvider::prescaleValues
std::pair< int, int > prescaleValues(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger)
Combined L1T (pair.first) and HLT (pair.second) prescales per HLT path.
Definition: HLTPrescaleProvider.cc:116
edm::Event
Definition: Event.h:73
HLTPrescaleProvider::hltConfigProvider_
HLTConfigProvider hltConfigProvider_
Definition: HLTPrescaleProvider.h:80
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
edm::TriggerResults
Definition: TriggerResults.h:35
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
Run