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
 
const edm::ESGetToken< L1TUtmTriggerMenu, L1TUtmTriggerMenuRcdm_l1tUtmTriggerMenuToken
 
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(""),
33  m_throw(true),
34  // l1 values and status
35  m_l1tResults(nullptr),
36  m_l1tMenu(nullptr),
37  m_l1tCacheID(),
38  m_l1tUpdated(false),
39  // hlt values and status
40  m_hltResults(nullptr),
41  m_hltMenu(nullptr),
42  m_hltCacheID(),
43  m_hltUpdated(false),
44  // event values
45  m_eventNumber() {}

◆ Data() [2/3]

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

Definition at line 48 of file TriggerExpressionData.h.

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

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 76 of file TriggerExpressionData.h.

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

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 142 of file TriggerExpressionData.h.

142 { return m_eventNumber; }

References m_eventNumber.

◆ hasHLT()

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

Definition at line 126 of file TriggerExpressionData.h.

126 { 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 124 of file TriggerExpressionData.h.

124 { 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 136 of file TriggerExpressionData.h.

136 { return m_hltUpdated; }

References m_hltUpdated.

◆ hltMenu()

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

Definition at line 130 of file TriggerExpressionData.h.

130 { return *m_hltMenu; }

References m_hltMenu.

◆ hltResults()

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

Definition at line 128 of file TriggerExpressionData.h.

128 { return *m_hltResults; }

References m_hltResults.

◆ ignoreL1MaskAndPrescale()

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

Definition at line 146 of file TriggerExpressionData.h.

146 { return m_l1tIgnoreMaskAndPrescale; }

References m_l1tIgnoreMaskAndPrescale.

◆ l1tConfigurationUpdated()

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

Definition at line 138 of file TriggerExpressionData.h.

138 { return m_l1tUpdated; }

References m_l1tUpdated.

◆ l1tMenu()

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

Definition at line 134 of file TriggerExpressionData.h.

134 { return *m_l1tMenu; }

References m_l1tMenu.

◆ l1tResults()

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

Definition at line 132 of file TriggerExpressionData.h.

132 { return *m_l1tResults; }

References m_l1tResults.

◆ setEvent()

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

Definition at line 14 of file TriggerExpressionData.cc.

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

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, m_l1tUtmTriggerMenuToken, 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 120 of file TriggerExpressionData.h.

120 { m_throw = doThrow; }

References m_throw.

◆ shouldThrow()

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

Definition at line 144 of file TriggerExpressionData.h.

144 { return m_throw; }

References m_throw.

Member Data Documentation

◆ m_eventNumber

edm::EventNumber_t triggerExpression::Data::m_eventNumber

Definition at line 170 of file TriggerExpressionData.h.

Referenced by eventNumber(), and setEvent().

◆ m_hltCacheID

edm::ParameterSetID triggerExpression::Data::m_hltCacheID

Definition at line 166 of file TriggerExpressionData.h.

Referenced by setEvent().

◆ m_hltMenu

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

Definition at line 165 of file TriggerExpressionData.h.

Referenced by hltMenu(), and setEvent().

◆ m_hltResults

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

Definition at line 164 of file TriggerExpressionData.h.

Referenced by hltResults(), and setEvent().

◆ m_hltResultsTag

edm::InputTag triggerExpression::Data::m_hltResultsTag

Definition at line 149 of file TriggerExpressionData.h.

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

◆ m_hltResultsToken

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

Definition at line 150 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 160 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 159 of file TriggerExpressionData.h.

Referenced by l1tMenu(), and setEvent().

◆ m_l1tResults

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

Definition at line 158 of file TriggerExpressionData.h.

Referenced by l1tResults(), and setEvent().

◆ m_l1tResultsTag

edm::InputTag triggerExpression::Data::m_l1tResultsTag

Definition at line 151 of file TriggerExpressionData.h.

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

◆ m_l1tResultsToken

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

Definition at line 152 of file TriggerExpressionData.h.

Referenced by Data(), and setEvent().

◆ m_l1tUpdated

bool triggerExpression::Data::m_l1tUpdated

◆ m_l1tUtmTriggerMenuToken

const edm::ESGetToken<L1TUtmTriggerMenu, L1TUtmTriggerMenuRcd> triggerExpression::Data::m_l1tUtmTriggerMenuToken

Definition at line 153 of file TriggerExpressionData.h.

Referenced by setEvent().

◆ m_throw

bool triggerExpression::Data::m_throw

Definition at line 155 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:164
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
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
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:166
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
triggerExpression::Data::m_l1tUpdated
bool m_l1tUpdated
Definition: TriggerExpressionData.h:161
triggerExpression::Data::m_throw
bool m_throw
Definition: TriggerExpressionData.h:155
triggerExpression::Data::hasL1T
bool hasL1T() const
Definition: TriggerExpressionData.h:124
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
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
l1t
delete x;
Definition: CaloConfig.h:22
triggerExpression::Data::m_l1tResultsTag
edm::InputTag m_l1tResultsTag
Definition: TriggerExpressionData.h:151
edm::get
T const & get(Event const &event, InputTag const &tag) noexcept(false)
Definition: Event.h:675
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
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
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:149
triggerExpression::Data::m_l1tMenu
const L1TUtmTriggerMenu * m_l1tMenu
Definition: TriggerExpressionData.h:159
edm::InputTag
Definition: InputTag.h:15
edm::TriggerResults
Definition: TriggerResults.h:35
triggerExpression::Data::m_l1tResultsToken
edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1tResultsToken
Definition: TriggerExpressionData.h:152