CMS 3D CMS Logo

TriggerExpressionData.cc
Go to the documentation of this file.
11 
12 namespace triggerExpression {
13 
15  // cache the event number
16  m_eventNumber = event.id().event();
17 
18  // access L1 objects only if L1 is used
19  if (hasL1T()) {
20  // cache the L1 GT results objects
21  auto const& l1t = edm::get(event, m_l1tResultsToken);
22  if (l1t.size() == 0 or l1t.isEmpty(0)) {
23  m_l1tResults = nullptr;
24  return false;
25  }
27  m_l1tResults = &l1t.at(0, 0).getAlgoDecisionInitial();
28  else
29  m_l1tResults = &l1t.at(0, 0).getAlgoDecisionFinal();
30 
31  // cache the L1 trigger menu
32  unsigned long long l1tCacheID = setup.get<L1TUtmTriggerMenuRcd>().cacheIdentifier();
33  if (m_l1tCacheID == l1tCacheID) {
34  m_l1tUpdated = false;
35  } else {
37  m_l1tCacheID = l1tCacheID;
38  m_l1tUpdated = true;
39  }
40  }
41 
42  // access HLT objects only if HLT is used
43  if (hasHLT()) {
44  // cache the HLT TriggerResults
46  if (not m_hltResults)
47  return false;
48 
49  // access the TriggerNames, and check if it has changed
52  m_hltUpdated = false;
53  } else {
55  m_hltUpdated = true;
56  }
57  }
58 
59  return true;
60  }
61 
62 } // namespace triggerExpression
Handle.h
MessageLogger.h
triggerExpression::Data::m_hltResults
const edm::TriggerResults * m_hltResults
Definition: TriggerExpressionData.h:164
ESHandle.h
TriggerResults.h
L1TUtmTriggerMenuRcd
Definition: L1TUtmTriggerMenuRcd.h:11
edm::TriggerNames::parameterSetID
ParameterSetID const & parameterSetID() const
Definition: TriggerNames.cc:61
triggerExpression::Data::m_eventNumber
edm::EventNumber_t m_eventNumber
Definition: TriggerExpressionData.h:170
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
triggerExpression::Data::m_hltCacheID
edm::ParameterSetID m_hltCacheID
Definition: TriggerExpressionData.h:166
triggerExpression::Data::m_l1tUpdated
bool m_l1tUpdated
Definition: TriggerExpressionData.h:161
triggerExpression::Data::hasL1T
bool hasL1T() const
Definition: TriggerExpressionData.h:124
edm::TriggerNames::triggerNames
Strings const & triggerNames() const
Definition: TriggerNames.cc:48
triggerExpression::Data::m_l1tResults
const std::vector< bool > * m_l1tResults
Definition: TriggerExpressionData.h:158
triggerExpression::Data::m_l1tCacheID
unsigned long long m_l1tCacheID
Definition: TriggerExpressionData.h:160
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:675
TriggerNames.h
triggerExpression::Data::setEvent
bool setEvent(const edm::Event &event, const edm::EventSetup &setup)
Definition: TriggerExpressionData.cc:14
GlobalAlgBlk.h
triggerExpression::Data::m_l1tIgnoreMaskAndPrescale
bool m_l1tIgnoreMaskAndPrescale
Definition: TriggerExpressionData.h:154
triggerExpression::Data::m_hltResultsToken
edm::EDGetTokenT< edm::TriggerResults > m_hltResultsToken
Definition: TriggerExpressionData.h:150
edm::EventSetup
Definition: EventSetup.h:58
triggerExpression::Data::m_hltUpdated
bool m_hltUpdated
Definition: TriggerExpressionData.h:167
triggerExpression::Data::hasHLT
bool hasHLT() const
Definition: TriggerExpressionData.h:126
triggerExpression::Data::m_hltMenu
const edm::TriggerNames * m_hltMenu
Definition: TriggerExpressionData.h:165
triggerExpression::Data::m_l1tUtmTriggerMenuToken
const edm::ESGetToken< L1TUtmTriggerMenu, L1TUtmTriggerMenuRcd > m_l1tUtmTriggerMenuToken
Definition: TriggerExpressionData.h:153
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:159
triggerExpression::Data::m_l1tResultsToken
edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1tResultsToken
Definition: TriggerExpressionData.h:152