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
54  m_hltMenu = &event.triggerNames(*m_hltResults);
56  m_hltUpdated = false;
57  } else {
59  m_hltUpdated = true;
60  }
61  }
62 
63  return true;
64  }
65 
66 } // namespace triggerExpression
edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1tResultsToken
delete x;
Definition: CaloConfig.h:22
Strings const & triggerNames() const
Definition: TriggerNames.cc:20
ParameterSetID const & parameterSetID() const
Definition: TriggerNames.cc:33
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
const edm::TriggerResults * m_hltResults
edm::EDGetTokenT< edm::TriggerResults > m_hltResultsToken
const edm::TriggerNames * m_hltMenu
bool setEvent(const edm::Event &event, const edm::EventSetup &setup)
const L1TUtmTriggerMenu * m_l1tMenu
const std::vector< bool > * m_l1tResults
T const & get(Event const &event, InputTag const &tag)(false)
Definition: Event.h:666
edm::ParameterSetID m_hltCacheID
T get() const
Definition: EventSetup.h:73
edm::EventNumber_t m_eventNumber
unsigned long long m_l1tCacheID
Definition: event.py:1