test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::TriggerResults
m_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
< GlobalAlgBlkBxCollection
m_l1tResultsToken
 
bool m_l1tUpdated
 
bool m_throw
 

Detailed Description

Definition at line 22 of file TriggerExpressionData.h.

Constructor & Destructor Documentation

triggerExpression::Data::Data ( )
inline

Definition at line 25 of file TriggerExpressionData.h.

25  :
26  // configuration
27  m_hltResultsTag(""),
29  m_l1tResultsTag(""),
32  m_throw(true),
33  // l1 values and status
34  m_l1tResults(nullptr),
35  m_l1tMenu(0),
36  m_l1tCacheID(),
37  m_l1tUpdated(false),
38  // hlt values and status
39  m_hltResults(0),
40  m_hltMenu(0),
41  m_hltCacheID(),
42  m_hltUpdated(false),
43  // event values
45  { }
edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1tResultsToken
const edm::TriggerResults * m_hltResults
edm::EDGetTokenT< edm::TriggerResults > m_hltResultsToken
const edm::TriggerNames * m_hltMenu
const L1TUtmTriggerMenu * m_l1tMenu
const std::vector< bool > * m_l1tResults
edm::ParameterSetID m_hltCacheID
edm::EventNumber_t m_eventNumber
unsigned long long m_l1tCacheID
triggerExpression::Data::Data ( const edm::ParameterSet config,
edm::ConsumesCollector &&  iC 
)
inlineexplicit

Definition at line 48 of file TriggerExpressionData.h.

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

48  :
49  // configuration
50  m_hltResultsTag(config.getParameter<edm::InputTag>("hltResults")),
52  m_l1tResultsTag(config.getParameter<edm::InputTag>("l1tResults")),
54  m_l1tIgnoreMaskAndPrescale(config.getParameter<bool>("l1tIgnoreMaskAndPrescale")),
55  m_throw(config.getParameter<bool>("throw")),
56  // l1 values and status
57  m_l1tResults(nullptr),
58  m_l1tMenu(0),
59  m_l1tCacheID(),
60  m_l1tUpdated(false),
61  // hlt values and status
62  m_hltResults(0),
63  m_hltMenu(0),
64  m_hltCacheID(),
65  m_hltUpdated(false),
66  // event values
68  {
71  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1tResultsToken
const edm::TriggerResults * m_hltResults
edm::EDGetTokenT< edm::TriggerResults > m_hltResultsToken
const edm::TriggerNames * m_hltMenu
const L1TUtmTriggerMenu * m_l1tMenu
const std::vector< bool > * m_l1tResults
std::string const & label() const
Definition: InputTag.h:36
edm::ParameterSetID m_hltCacheID
edm::EventNumber_t m_eventNumber
unsigned long long m_l1tCacheID
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.

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

79  :
80  // configuration
81  m_hltResultsTag(hltResultsTag),
83  m_l1tResultsTag(l1tResultsTag),
85  m_l1tIgnoreMaskAndPrescale(l1tIgnoreMaskAndPrescale),
86  m_throw(doThrow),
87  // l1 values and status
88  m_l1tResults(nullptr),
89  m_l1tMenu(0),
90  m_l1tCacheID(),
91  m_l1tUpdated(false),
92  // hlt values and status
93  m_hltResults(0),
94  m_hltMenu(0),
95  m_hltCacheID(),
96  m_hltUpdated(false),
97  // event values
99  {
102  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1tResultsToken
const edm::TriggerResults * m_hltResults
edm::EDGetTokenT< edm::TriggerResults > m_hltResultsToken
const edm::TriggerNames * m_hltMenu
const L1TUtmTriggerMenu * m_l1tMenu
const std::vector< bool > * m_l1tResults
std::string const & label() const
Definition: InputTag.h:36
edm::ParameterSetID m_hltCacheID
edm::EventNumber_t m_eventNumber
unsigned long long m_l1tCacheID

Member Function Documentation

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

Definition at line 159 of file TriggerExpressionData.h.

References m_hltUpdated, m_l1tUpdated, and or.

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

159  {
161  }
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
edm::EventNumber_t triggerExpression::Data::eventNumber ( ) const
inline

Definition at line 163 of file TriggerExpressionData.h.

References m_eventNumber.

Referenced by triggerExpression::Prescaler::init().

163  {
164  return m_eventNumber;
165  }
edm::EventNumber_t m_eventNumber
bool triggerExpression::Data::hasHLT ( ) const
inline

Definition at line 131 of file TriggerExpressionData.h.

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

Referenced by triggerExpression::PathReader::operator()(), and setEvent().

131  {
132  return not m_hltResultsTag.label().empty();
133  }
std::string const & label() const
Definition: InputTag.h:36
bool triggerExpression::Data::hasL1T ( ) const
inline

Definition at line 127 of file TriggerExpressionData.h.

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

Referenced by triggerExpression::L1uGTReader::init(), triggerExpression::L1uGTReader::operator()(), and setEvent().

127  {
128  return not m_l1tResultsTag.label().empty();
129  }
std::string const & label() const
Definition: InputTag.h:36
bool triggerExpression::Data::hltConfigurationUpdated ( ) const
inline

Definition at line 151 of file TriggerExpressionData.h.

References m_hltUpdated.

151  {
152  return m_hltUpdated;
153  }
const edm::TriggerNames& triggerExpression::Data::hltMenu ( ) const
inline

Definition at line 139 of file TriggerExpressionData.h.

References m_hltMenu.

Referenced by triggerExpression::PathReader::init().

139  {
140  return * m_hltMenu;
141  }
const edm::TriggerNames * m_hltMenu
const edm::TriggerResults& triggerExpression::Data::hltResults ( ) const
inline

Definition at line 135 of file TriggerExpressionData.h.

References m_hltResults.

Referenced by triggerExpression::PathReader::operator()().

135  {
136  return * m_hltResults;
137  }
const edm::TriggerResults * m_hltResults
bool triggerExpression::Data::ignoreL1MaskAndPrescale ( ) const
inline

Definition at line 171 of file TriggerExpressionData.h.

References m_l1tIgnoreMaskAndPrescale.

171  {
173  }
bool triggerExpression::Data::l1tConfigurationUpdated ( ) const
inline

Definition at line 155 of file TriggerExpressionData.h.

References m_l1tUpdated.

155  {
156  return m_l1tUpdated;
157  }
const L1TUtmTriggerMenu& triggerExpression::Data::l1tMenu ( ) const
inline

Definition at line 147 of file TriggerExpressionData.h.

References m_l1tMenu.

Referenced by triggerExpression::L1uGTReader::init().

147  {
148  return * m_l1tMenu;
149  }
const L1TUtmTriggerMenu * m_l1tMenu
const std::vector<bool>& triggerExpression::Data::l1tResults ( ) const
inline

Definition at line 143 of file TriggerExpressionData.h.

References m_l1tResults.

Referenced by triggerExpression::L1uGTReader::operator()().

143  {
144  return * m_l1tResults;
145  }
const std::vector< bool > * m_l1tResults
bool triggerExpression::Data::setEvent ( const edm::Event event,
const edm::EventSetup setup 
)

Definition at line 40 of file TriggerExpressionData.cc.

References event(), edm::EventSetup::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(), GeneralSetup::setup(), and edm::TriggerNames::triggerNames().

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

40  {
41 
42  // cache the event number
43  m_eventNumber = event.id().event();
44 
45  // access L1 objects only if L1 is used
46  if (hasL1T()) {
47  // cache the L1 GT results objects
48  auto l1t = get<GlobalAlgBlkBxCollection>(event, m_l1tResultsToken);
49  if (not l1t or l1t->size() == 0 or l1t->isEmpty(0)) {
50  m_l1tResults = nullptr;
51  return false;
52  }
54  m_l1tResults = & l1t->at(0, 0).getAlgoDecisionInitial();
55  else
56  m_l1tResults = & l1t->at(0, 0).getAlgoDecisionFinal();
57 
58  // cache the L1 trigger menu
59  unsigned long long l1tCacheID = setup.get<L1TUtmTriggerMenuRcd>().cacheIdentifier();
60  if (m_l1tCacheID == l1tCacheID) {
61  m_l1tUpdated = false;
62  } else {
63  m_l1tMenu = get<L1TUtmTriggerMenuRcd, L1TUtmTriggerMenu>(setup);
64  m_l1tCacheID = l1tCacheID;
65  m_l1tUpdated = true;
66  }
67  }
68 
69  // access HLT objects only if HLT is used
70  if (hasHLT()) {
71  // cache the HLT TriggerResults
72  m_hltResults = get<edm::TriggerResults>(event, m_hltResultsToken);
73  if (not m_hltResults)
74  return false;
75 
76  // access the TriggerNames, and check if it has changed
77  m_hltMenu = & event.triggerNames(* m_hltResults);
79  m_hltUpdated = false;
80  } else {
82  m_hltUpdated = true;
83  }
84  }
85 
86  return true;
87 }
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1tResultsToken
Strings const & triggerNames() const
Definition: TriggerNames.cc:24
ParameterSetID const & parameterSetID() const
Definition: TriggerNames.cc:42
const edm::TriggerResults * m_hltResults
edm::EDGetTokenT< edm::TriggerResults > m_hltResultsToken
const edm::TriggerNames * m_hltMenu
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
const L1TUtmTriggerMenu * m_l1tMenu
const std::vector< bool > * m_l1tResults
const T & get() const
Definition: EventSetup.h:56
edm::ParameterSetID m_hltCacheID
edm::EventNumber_t m_eventNumber
unsigned long long m_l1tCacheID
void triggerExpression::Data::setHltResultsTag ( edm::InputTag const &  tag)
inline
void triggerExpression::Data::setL1tIgnoreMaskAndPrescale ( bool  l1tIgnoreMaskAndPrescale)
inline

Definition at line 117 of file TriggerExpressionData.h.

References m_l1tIgnoreMaskAndPrescale.

117  {
118  m_l1tIgnoreMaskAndPrescale = l1tIgnoreMaskAndPrescale;
119  }
void triggerExpression::Data::setL1tResultsTag ( edm::InputTag const &  tag)
inline
void triggerExpression::Data::setThrow ( bool  doThrow)
inline

Definition at line 121 of file TriggerExpressionData.h.

References m_throw.

121  {
122  m_throw = doThrow;
123  }
bool triggerExpression::Data::shouldThrow ( ) const
inline

Definition at line 167 of file TriggerExpressionData.h.

References m_throw.

Referenced by triggerExpression::L1uGTReader::init(), and triggerExpression::PathReader::init().

167  {
168  return m_throw;
169  }

Member Data Documentation

edm::EventNumber_t triggerExpression::Data::m_eventNumber

Definition at line 196 of file TriggerExpressionData.h.

Referenced by eventNumber(), and setEvent().

edm::ParameterSetID triggerExpression::Data::m_hltCacheID

Definition at line 192 of file TriggerExpressionData.h.

Referenced by setEvent().

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

Definition at line 191 of file TriggerExpressionData.h.

Referenced by hltMenu(), and setEvent().

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

Definition at line 190 of file TriggerExpressionData.h.

Referenced by hltResults(), and setEvent().

edm::InputTag triggerExpression::Data::m_hltResultsTag

Definition at line 176 of file TriggerExpressionData.h.

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

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

Definition at line 177 of file TriggerExpressionData.h.

Referenced by Data(), and setEvent().

bool triggerExpression::Data::m_hltUpdated
unsigned long long triggerExpression::Data::m_l1tCacheID

Definition at line 186 of file TriggerExpressionData.h.

Referenced by setEvent().

bool triggerExpression::Data::m_l1tIgnoreMaskAndPrescale
const L1TUtmTriggerMenu* triggerExpression::Data::m_l1tMenu

Definition at line 185 of file TriggerExpressionData.h.

Referenced by l1tMenu(), and setEvent().

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

Definition at line 184 of file TriggerExpressionData.h.

Referenced by l1tResults(), and setEvent().

edm::InputTag triggerExpression::Data::m_l1tResultsTag

Definition at line 178 of file TriggerExpressionData.h.

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

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

Definition at line 179 of file TriggerExpressionData.h.

Referenced by Data(), and setEvent().

bool triggerExpression::Data::m_l1tUpdated
bool triggerExpression::Data::m_throw

Definition at line 181 of file TriggerExpressionData.h.

Referenced by setThrow(), and shouldThrow().