CMS 3D CMS Logo

TriggerExpressionData.cc
Go to the documentation of this file.
1 
2 
15 
16 namespace triggerExpression {
17 
19  // cache the event number
20  m_eventNumber = event.id().event();
21 
22  // access L1 objects only if L1 is used
23  if (hasL1T()) {
24  // cache the L1 GT results objects
25  auto const& l1t = edm::get(event, m_l1tResultsToken);
26  if (l1t.size() == 0 or l1t.isEmpty(0)) {
27  m_l1tResults = nullptr;
28  return false;
29  }
31  m_l1tResults = &l1t.at(0, 0).getAlgoDecisionInitial();
32  else
33  m_l1tResults = &l1t.at(0, 0).getAlgoDecisionFinal();
34 
35  // cache the L1 trigger menu
36  unsigned long long l1tCacheID = setup.get<L1TUtmTriggerMenuRcd>().cacheIdentifier();
37  if (m_l1tCacheID == l1tCacheID) {
38  m_l1tUpdated = false;
39  } else {
40  m_l1tMenu = &edm::get<L1TUtmTriggerMenu, L1TUtmTriggerMenuRcd>(setup);
41  m_l1tCacheID = l1tCacheID;
42  m_l1tUpdated = true;
43  }
44  }
45 
46  // access HLT objects only if HLT is used
47  if (hasHLT()) {
48  // cache the HLT TriggerResults
50  if (not m_hltResults)
51  return false;
52 
53  // access the TriggerNames, and check if it has changed
56  m_hltUpdated = false;
57  } else {
59  m_hltUpdated = true;
60  }
61  }
62 
63  return true;
64  }
65 
66 } // namespace triggerExpression
Handle.h
L1TUtmTriggerMenuRcd.h
MessageLogger.h
triggerExpression::Data::m_hltResults
const edm::TriggerResults * m_hltResults
Definition: TriggerExpressionData.h:160
ESHandle.h
TriggerResults.h
L1TUtmTriggerMenuRcd
Definition: L1TUtmTriggerMenuRcd.h:11
edm::TriggerNames::parameterSetID
ParameterSetID const & parameterSetID() const
Definition: TriggerNames.cc:33
triggerExpression::Data::m_eventNumber
edm::EventNumber_t m_eventNumber
Definition: TriggerExpressionData.h:166
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
triggerExpression::Data::m_hltCacheID
edm::ParameterSetID m_hltCacheID
Definition: TriggerExpressionData.h:162
triggerExpression::Data::m_l1tUpdated
bool m_l1tUpdated
Definition: TriggerExpressionData.h:157
triggerExpression::Data::hasL1T
bool hasL1T() const
Definition: TriggerExpressionData.h:121
edm::TriggerNames::triggerNames
Strings const & triggerNames() const
Definition: TriggerNames.cc:20
L1TUtmTriggerMenu.h
triggerExpression::Data::m_l1tResults
const std::vector< bool > * m_l1tResults
Definition: TriggerExpressionData.h:154
triggerExpression::Data::m_l1tCacheID
unsigned long long m_l1tCacheID
Definition: TriggerExpressionData.h:156
Event.h
l1t
delete x;
Definition: CaloConfig.h:22
edm::get
T const & get(Event const &event, InputTag const &tag) noexcept(false)
Definition: Event.h:669
TriggerNames.h
triggerExpression::Data::setEvent
bool setEvent(const edm::Event &event, const edm::EventSetup &setup)
Definition: TriggerExpressionData.cc:18
GlobalAlgBlk.h
triggerExpression::Data::m_l1tIgnoreMaskAndPrescale
bool m_l1tIgnoreMaskAndPrescale
Definition: TriggerExpressionData.h:150
triggerExpression::Data::m_hltResultsToken
edm::EDGetTokenT< edm::TriggerResults > m_hltResultsToken
Definition: TriggerExpressionData.h:147
edm::EventSetup
Definition: EventSetup.h:57
triggerExpression::Data::m_hltUpdated
bool m_hltUpdated
Definition: TriggerExpressionData.h:163
triggerExpression::Data::hasHLT
bool hasHLT() const
Definition: TriggerExpressionData.h:123
triggerExpression::Data::m_hltMenu
const edm::TriggerNames * m_hltMenu
Definition: TriggerExpressionData.h:161
EventSetup.h
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
triggerExpression
Definition: TriggerExpressionConstant.h:6
Exception.h
TriggerExpressionData.h
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
triggerExpression::Data::m_l1tMenu
const L1TUtmTriggerMenu * m_l1tMenu
Definition: TriggerExpressionData.h:155
triggerExpression::Data::m_l1tResultsToken
edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1tResultsToken
Definition: TriggerExpressionData.h:149