CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
triggerExpression::Data Class Reference

#include <TriggerExpressionData.h>

Public Member Functions

bool configurationUpdated () const
 
 Data ()
 
 Data (const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
 
 Data (edm::InputTag const &hltResultsTag, edm::InputTag const &l1tResultsTag, bool l1tIgnoreMaskAndPrescale, bool doThrow, edm::ConsumesCollector &&iC)
 
edm::EventNumber_t eventNumber () const
 
bool hasHLT () const
 
bool hasL1T () const
 
bool hltConfigurationUpdated () const
 
const edm::TriggerNameshltMenu () const
 
const edm::TriggerResultshltResults () const
 
bool ignoreL1MaskAndPrescale () const
 
bool l1tConfigurationUpdated () const
 
const L1TUtmTriggerMenul1tMenu () const
 
const std::vector< bool > & l1tResults () const
 
bool setEvent (const edm::Event &event, const edm::EventSetup &setup)
 
void setHltResultsTag (edm::InputTag const &tag)
 
void setL1tIgnoreMaskAndPrescale (bool l1tIgnoreMaskAndPrescale)
 
void setL1tResultsTag (edm::InputTag const &tag)
 
void setThrow (bool doThrow)
 
bool shouldThrow () const
 

Public Attributes

edm::EventNumber_t m_eventNumber
 
edm::ParameterSetID m_hltCacheID
 
const edm::TriggerNamesm_hltMenu
 
const edm::TriggerResultsm_hltResults
 
edm::InputTag m_hltResultsTag
 
edm::EDGetTokenT< edm::TriggerResultsm_hltResultsToken
 
bool m_hltUpdated
 
unsigned long long m_l1tCacheID
 
bool m_l1tIgnoreMaskAndPrescale
 
const L1TUtmTriggerMenum_l1tMenu
 
const std::vector< bool > * m_l1tResults
 
edm::InputTag m_l1tResultsTag
 
edm::EDGetTokenT< GlobalAlgBlkBxCollectionm_l1tResultsToken
 
bool m_l1tUpdated
 
bool m_throw
 

Detailed Description

Definition at line 22 of file TriggerExpressionData.h.

Constructor & Destructor Documentation

◆ Data() [1/3]

triggerExpression::Data::Data ( )
inline

Definition at line 25 of file TriggerExpressionData.h.

26  : // configuration
27  m_hltResultsTag(""),
29  m_l1tResultsTag(""),
32  m_throw(true),
33  // l1 values and status
34  m_l1tResults(nullptr),
35  m_l1tMenu(nullptr),
36  m_l1tCacheID(),
37  m_l1tUpdated(false),
38  // hlt values and status
39  m_hltResults(nullptr),
40  m_hltMenu(nullptr),
41  m_hltCacheID(),
42  m_hltUpdated(false),
43  // event values
44  m_eventNumber() {}

◆ Data() [2/3]

triggerExpression::Data::Data ( const edm::ParameterSet config,
edm::ConsumesCollector &&  iC 
)
inlineexplicit

Definition at line 47 of file TriggerExpressionData.h.

48  : // configuration
49  m_hltResultsTag(config.getParameter<edm::InputTag>("hltResults")),
51  m_l1tResultsTag(config.getParameter<edm::InputTag>("l1tResults")),
53  m_l1tIgnoreMaskAndPrescale(config.getParameter<bool>("l1tIgnoreMaskAndPrescale")),
54  m_throw(config.getParameter<bool>("throw")),
55  // l1 values and status
56  m_l1tResults(nullptr),
57  m_l1tMenu(nullptr),
58  m_l1tCacheID(),
59  m_l1tUpdated(false),
60  // hlt values and status
61  m_hltResults(nullptr),
62  m_hltMenu(nullptr),
63  m_hltCacheID(),
64  m_hltUpdated(false),
65  // event values
66  m_eventNumber() {
67  if (not m_hltResultsTag.label().empty())
69  if (not m_l1tResultsTag.label().empty())
71  }

References edm::InputTag::label(), m_hltResultsTag, m_hltResultsToken, m_l1tResultsTag, and m_l1tResultsToken.

◆ Data() [3/3]

triggerExpression::Data::Data ( edm::InputTag const &  hltResultsTag,
edm::InputTag const &  l1tResultsTag,
bool  l1tIgnoreMaskAndPrescale,
bool  doThrow,
edm::ConsumesCollector &&  iC 
)
inline

Definition at line 74 of file TriggerExpressionData.h.

79  : // configuration
80  m_hltResultsTag(hltResultsTag),
82  m_l1tResultsTag(l1tResultsTag),
85  m_throw(doThrow),
86  // l1 values and status
87  m_l1tResults(nullptr),
88  m_l1tMenu(nullptr),
89  m_l1tCacheID(),
90  m_l1tUpdated(false),
91  // hlt values and status
92  m_hltResults(nullptr),
93  m_hltMenu(nullptr),
94  m_hltCacheID(),
95  m_hltUpdated(false),
96  // event values
97  m_eventNumber() {
98  if (not m_hltResultsTag.label().empty())
100  if (not m_l1tResultsTag.label().empty())
102  }

References edm::InputTag::label(), m_hltResultsTag, m_hltResultsToken, m_l1tResultsTag, and m_l1tResultsToken.

Member Function Documentation

◆ configurationUpdated()

bool triggerExpression::Data::configurationUpdated ( ) const
inline

◆ eventNumber()

edm::EventNumber_t triggerExpression::Data::eventNumber ( ) const
inline

Definition at line 139 of file TriggerExpressionData.h.

139 { return m_eventNumber; }

References m_eventNumber.

◆ hasHLT()

bool triggerExpression::Data::hasHLT ( ) const
inline

Definition at line 123 of file TriggerExpressionData.h.

123 { return not m_hltResultsTag.label().empty(); }

References edm::InputTag::label(), and m_hltResultsTag.

Referenced by setEvent().

◆ hasL1T()

bool triggerExpression::Data::hasL1T ( ) const
inline

Definition at line 121 of file TriggerExpressionData.h.

121 { return not m_l1tResultsTag.label().empty(); }

References edm::InputTag::label(), and m_l1tResultsTag.

Referenced by setEvent().

◆ hltConfigurationUpdated()

bool triggerExpression::Data::hltConfigurationUpdated ( ) const
inline

Definition at line 133 of file TriggerExpressionData.h.

133 { return m_hltUpdated; }

References m_hltUpdated.

◆ hltMenu()

const edm::TriggerNames& triggerExpression::Data::hltMenu ( ) const
inline

Definition at line 127 of file TriggerExpressionData.h.

127 { return *m_hltMenu; }

References m_hltMenu.

◆ hltResults()

const edm::TriggerResults& triggerExpression::Data::hltResults ( ) const
inline

Definition at line 125 of file TriggerExpressionData.h.

125 { return *m_hltResults; }

References m_hltResults.

◆ ignoreL1MaskAndPrescale()

bool triggerExpression::Data::ignoreL1MaskAndPrescale ( ) const
inline

Definition at line 143 of file TriggerExpressionData.h.

143 { return m_l1tIgnoreMaskAndPrescale; }

References m_l1tIgnoreMaskAndPrescale.

◆ l1tConfigurationUpdated()

bool triggerExpression::Data::l1tConfigurationUpdated ( ) const
inline

Definition at line 135 of file TriggerExpressionData.h.

135 { return m_l1tUpdated; }

References m_l1tUpdated.

◆ l1tMenu()

const L1TUtmTriggerMenu& triggerExpression::Data::l1tMenu ( ) const
inline

Definition at line 131 of file TriggerExpressionData.h.

131 { return *m_l1tMenu; }

References m_l1tMenu.

◆ l1tResults()

const std::vector<bool>& triggerExpression::Data::l1tResults ( ) const
inline

Definition at line 129 of file TriggerExpressionData.h.

129 { return *m_l1tResults; }

References m_l1tResults.

◆ setEvent()

bool triggerExpression::Data::setEvent ( const edm::Event event,
const edm::EventSetup setup 
)

Definition at line 18 of file TriggerExpressionData.cc.

18  {
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  }

References edm::get(), hasHLT(), hasL1T(), m_eventNumber, m_hltCacheID, m_hltMenu, m_hltResults, m_hltResultsToken, m_hltUpdated, m_l1tCacheID, m_l1tIgnoreMaskAndPrescale, m_l1tMenu, m_l1tResults, m_l1tResultsToken, m_l1tUpdated, or, edm::TriggerNames::parameterSetID(), singleTopDQM_cfi::setup, and edm::TriggerNames::triggerNames().

Referenced by DiJetVarAnalyzer::analyze(), FSQDiJetAve::analyze(), TriggerResultsFilterFromDB::filter(), and TriggerResultsFilter::filter().

◆ setHltResultsTag()

void triggerExpression::Data::setHltResultsTag ( edm::InputTag const &  tag)
inline

◆ setL1tIgnoreMaskAndPrescale()

void triggerExpression::Data::setL1tIgnoreMaskAndPrescale ( bool  l1tIgnoreMaskAndPrescale)
inline

◆ setL1tResultsTag()

void triggerExpression::Data::setL1tResultsTag ( edm::InputTag const &  tag)
inline

◆ setThrow()

void triggerExpression::Data::setThrow ( bool  doThrow)
inline

Definition at line 117 of file TriggerExpressionData.h.

117 { m_throw = doThrow; }

References m_throw.

◆ shouldThrow()

bool triggerExpression::Data::shouldThrow ( ) const
inline

Definition at line 141 of file TriggerExpressionData.h.

141 { return m_throw; }

References m_throw.

Member Data Documentation

◆ m_eventNumber

edm::EventNumber_t triggerExpression::Data::m_eventNumber

Definition at line 166 of file TriggerExpressionData.h.

Referenced by eventNumber(), and setEvent().

◆ m_hltCacheID

edm::ParameterSetID triggerExpression::Data::m_hltCacheID

Definition at line 162 of file TriggerExpressionData.h.

Referenced by setEvent().

◆ m_hltMenu

const edm::TriggerNames* triggerExpression::Data::m_hltMenu

Definition at line 161 of file TriggerExpressionData.h.

Referenced by hltMenu(), and setEvent().

◆ m_hltResults

const edm::TriggerResults* triggerExpression::Data::m_hltResults

Definition at line 160 of file TriggerExpressionData.h.

Referenced by hltResults(), and setEvent().

◆ m_hltResultsTag

edm::InputTag triggerExpression::Data::m_hltResultsTag

Definition at line 146 of file TriggerExpressionData.h.

Referenced by Data(), hasHLT(), and setHltResultsTag().

◆ m_hltResultsToken

edm::EDGetTokenT<edm::TriggerResults> triggerExpression::Data::m_hltResultsToken

Definition at line 147 of file TriggerExpressionData.h.

Referenced by Data(), and setEvent().

◆ m_hltUpdated

bool triggerExpression::Data::m_hltUpdated

◆ m_l1tCacheID

unsigned long long triggerExpression::Data::m_l1tCacheID

Definition at line 156 of file TriggerExpressionData.h.

Referenced by setEvent().

◆ m_l1tIgnoreMaskAndPrescale

bool triggerExpression::Data::m_l1tIgnoreMaskAndPrescale

◆ m_l1tMenu

const L1TUtmTriggerMenu* triggerExpression::Data::m_l1tMenu

Definition at line 155 of file TriggerExpressionData.h.

Referenced by l1tMenu(), and setEvent().

◆ m_l1tResults

const std::vector<bool>* triggerExpression::Data::m_l1tResults

Definition at line 154 of file TriggerExpressionData.h.

Referenced by l1tResults(), and setEvent().

◆ m_l1tResultsTag

edm::InputTag triggerExpression::Data::m_l1tResultsTag

Definition at line 148 of file TriggerExpressionData.h.

Referenced by Data(), hasL1T(), and setL1tResultsTag().

◆ m_l1tResultsToken

edm::EDGetTokenT<GlobalAlgBlkBxCollection> triggerExpression::Data::m_l1tResultsToken

Definition at line 149 of file TriggerExpressionData.h.

Referenced by Data(), and setEvent().

◆ m_l1tUpdated

bool triggerExpression::Data::m_l1tUpdated

◆ m_throw

bool triggerExpression::Data::m_throw

Definition at line 151 of file TriggerExpressionData.h.

Referenced by setThrow(), and shouldThrow().

dijetScouting_cff.l1tIgnoreMaskAndPrescale
l1tIgnoreMaskAndPrescale
Definition: dijetScouting_cff.py:35
triggerExpression::Data::m_hltResults
const edm::TriggerResults * m_hltResults
Definition: TriggerExpressionData.h:160
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
BXVector
Definition: BXVector.h:15
config
Definition: config.py:1
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
triggerExpression::Data::m_hltCacheID
edm::ParameterSetID m_hltCacheID
Definition: TriggerExpressionData.h:162
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
triggerExpression::Data::m_l1tUpdated
bool m_l1tUpdated
Definition: TriggerExpressionData.h:157
triggerExpression::Data::m_throw
bool m_throw
Definition: TriggerExpressionData.h:151
triggerExpression::Data::hasL1T
bool hasL1T() const
Definition: TriggerExpressionData.h:121
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
edm::TriggerNames::triggerNames
Strings const & triggerNames() const
Definition: TriggerNames.cc:20
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
l1t
delete x;
Definition: CaloConfig.h:22
triggerExpression::Data::m_l1tResultsTag
edm::InputTag m_l1tResultsTag
Definition: TriggerExpressionData.h:148
edm::get
T const & get(Event const &event, InputTag const &tag) noexcept(false)
Definition: Event.h:671
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
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
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
event
Definition: event.py:1
triggerExpression::Data::m_hltResultsTag
edm::InputTag m_hltResultsTag
Definition: TriggerExpressionData.h:146
triggerExpression::Data::m_l1tMenu
const L1TUtmTriggerMenu * m_l1tMenu
Definition: TriggerExpressionData.h:155
edm::InputTag
Definition: InputTag.h:15
edm::TriggerResults
Definition: TriggerResults.h:35
triggerExpression::Data::m_l1tResultsToken
edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1tResultsToken
Definition: TriggerExpressionData.h:149