CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
triggerExpression::Data Class Reference

#include <TriggerExpressionData.h>

Public Member Functions

bool configurationUpdated () const
 
unsigned int daqPartitions () const
 
 Data ()
 
 Data (const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
 
 Data (edm::InputTag const &hltResultsTag, edm::InputTag const &l1tResultsTag, unsigned int daqPartitions, bool l1tIgnoreMask, bool l1techIgnorePrescales, 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 ignoreL1Mask () const
 
bool ignoreL1TechPrescales () const
 
const L1GtTriggerMaskl1tAlgoMask () const
 
bool l1tConfigurationUpdated () const
 
const L1GtTriggerMenul1tMenu () const
 
const
L1GlobalTriggerReadoutRecord
l1tResults () const
 
const L1GtTriggerMaskl1tTechMask () const
 
void setDaqPartitions (unsigned int daqPartitions)
 
bool setEvent (const edm::Event &event, const edm::EventSetup &setup)
 
void setHltResultsTag (edm::InputTag const &tag)
 
void setL1techIgnorePrescales (bool l1techIgnorePrescales)
 
void setL1tIgnoreMask (bool l1tIgnoreMask)
 
void setL1tResultsTag (edm::InputTag const &tag)
 
void setThrow (bool doThrow)
 
bool shouldThrow () const
 

Private Attributes

unsigned int m_daqPartitions
 
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
 
const L1GtTriggerMaskm_l1tAlgoMask
 
unsigned long long m_l1tCacheID
 
bool m_l1techIgnorePrescales
 
bool m_l1tIgnoreMask
 
const L1GtTriggerMenum_l1tMenu
 
const
L1GlobalTriggerReadoutRecord
m_l1tResults
 
edm::InputTag m_l1tResultsTag
 
edm::EDGetTokenT
< L1GlobalTriggerReadoutRecord
m_l1tResultsToken
 
const L1GtTriggerMaskm_l1tTechMask
 
bool m_l1tUpdated
 
bool m_throw
 

Detailed Description

Definition at line 23 of file TriggerExpressionData.h.

Constructor & Destructor Documentation

triggerExpression::Data::Data ( )
inline

Definition at line 26 of file TriggerExpressionData.h.

26  :
27  // configuration
28  m_hltResultsTag(""),
30  m_l1tResultsTag(""),
32  m_daqPartitions(0x01),
33  m_l1tIgnoreMask(false),
35  m_throw(true),
36  // l1 values and status
37  m_l1tResults(0),
38  m_l1tMenu(0),
39  m_l1tAlgoMask(0),
40  m_l1tTechMask(0),
41  m_l1tCacheID(),
42  m_l1tUpdated(false),
43  // hlt values and status
44  m_hltResults(0),
45  m_hltMenu(0),
46  m_hltCacheID(),
47  m_hltUpdated(false),
48  // event values
50  { }
const L1GtTriggerMask * m_l1tTechMask
const L1GtTriggerMask * m_l1tAlgoMask
const edm::TriggerResults * m_hltResults
edm::EDGetTokenT< edm::TriggerResults > m_hltResultsToken
const edm::TriggerNames * m_hltMenu
const L1GlobalTriggerReadoutRecord * m_l1tResults
edm::ParameterSetID m_hltCacheID
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1tResultsToken
edm::EventNumber_t m_eventNumber
const L1GtTriggerMenu * m_l1tMenu
unsigned long long m_l1tCacheID
triggerExpression::Data::Data ( const edm::ParameterSet config,
edm::ConsumesCollector &&  iC 
)
inlineexplicit

Definition at line 53 of file TriggerExpressionData.h.

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

53  :
54  // configuration
55  m_hltResultsTag(config.getParameter<edm::InputTag>("hltResults")),
57  m_l1tResultsTag(config.getParameter<edm::InputTag>("l1tResults")),
59  m_daqPartitions(config.getParameter<unsigned int>("daqPartitions")),
60  m_l1tIgnoreMask(config.getParameter<bool>("l1tIgnoreMask")),
61  m_l1techIgnorePrescales(config.getParameter<bool>("l1techIgnorePrescales")),
62  m_throw(config.getParameter<bool>("throw")),
63  // l1 values and status
64  m_l1tResults(0),
65  m_l1tMenu(0),
66  m_l1tAlgoMask(0),
67  m_l1tTechMask(0),
68  m_l1tCacheID(),
69  m_l1tUpdated(false),
70  // hlt values and status
71  m_hltResults(0),
72  m_hltMenu(0),
73  m_hltCacheID(),
74  m_hltUpdated(false),
75  // event values
77  {
80  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
const L1GtTriggerMask * m_l1tTechMask
const L1GtTriggerMask * m_l1tAlgoMask
const edm::TriggerResults * m_hltResults
edm::EDGetTokenT< edm::TriggerResults > m_hltResultsToken
const edm::TriggerNames * m_hltMenu
const L1GlobalTriggerReadoutRecord * m_l1tResults
std::string const & label() const
Definition: InputTag.h:43
edm::ParameterSetID m_hltCacheID
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1tResultsToken
edm::EventNumber_t m_eventNumber
const L1GtTriggerMenu * m_l1tMenu
unsigned long long m_l1tCacheID
triggerExpression::Data::Data ( edm::InputTag const &  hltResultsTag,
edm::InputTag const &  l1tResultsTag,
unsigned int  daqPartitions,
bool  l1tIgnoreMask,
bool  l1techIgnorePrescales,
bool  doThrow,
edm::ConsumesCollector &&  iC 
)
inline

Definition at line 83 of file TriggerExpressionData.h.

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

90  :
91  // configuration
92  m_hltResultsTag(hltResultsTag),
94  m_l1tResultsTag(l1tResultsTag),
97  m_l1tIgnoreMask(l1tIgnoreMask),
98  m_l1techIgnorePrescales(l1techIgnorePrescales),
99  m_throw(doThrow),
100  // l1 values and status
101  m_l1tResults(0),
102  m_l1tMenu(0),
103  m_l1tAlgoMask(0),
104  m_l1tTechMask(0),
105  m_l1tCacheID(),
106  m_l1tUpdated(false),
107  // hlt values and status
108  m_hltResults(0),
109  m_hltMenu(0),
110  m_hltCacheID(),
111  m_hltUpdated(false),
112  // event values
113  m_eventNumber()
114  {
117  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const L1GtTriggerMask * m_l1tTechMask
const L1GtTriggerMask * m_l1tAlgoMask
const edm::TriggerResults * m_hltResults
edm::EDGetTokenT< edm::TriggerResults > m_hltResultsToken
const edm::TriggerNames * m_hltMenu
const L1GlobalTriggerReadoutRecord * m_l1tResults
unsigned int daqPartitions() const
std::string const & label() const
Definition: InputTag.h:43
edm::ParameterSetID m_hltCacheID
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1tResultsToken
edm::EventNumber_t m_eventNumber
const L1GtTriggerMenu * m_l1tMenu
unsigned long long m_l1tCacheID

Member Function Documentation

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

Definition at line 190 of file TriggerExpressionData.h.

References m_hltUpdated, m_l1tUpdated, and or.

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

190  {
192  }
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
unsigned int triggerExpression::Data::daqPartitions ( ) const
inline
edm::EventNumber_t triggerExpression::Data::eventNumber ( ) const
inline

Definition at line 194 of file TriggerExpressionData.h.

References m_eventNumber.

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

194  {
195  return m_eventNumber;
196  }
edm::EventNumber_t m_eventNumber
bool triggerExpression::Data::hasHLT ( ) const
inline

Definition at line 154 of file TriggerExpressionData.h.

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

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

154  {
155  return not m_hltResultsTag.label().empty();
156  }
std::string const & label() const
Definition: InputTag.h:43
bool triggerExpression::Data::hasL1T ( ) const
inline
bool triggerExpression::Data::hltConfigurationUpdated ( ) const
inline

Definition at line 182 of file TriggerExpressionData.h.

References m_hltUpdated.

182  {
183  return m_hltUpdated;
184  }
const edm::TriggerNames& triggerExpression::Data::hltMenu ( ) const
inline

Definition at line 162 of file TriggerExpressionData.h.

References m_hltMenu.

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

162  {
163  return * m_hltMenu;
164  }
const edm::TriggerNames * m_hltMenu
const edm::TriggerResults& triggerExpression::Data::hltResults ( ) const
inline

Definition at line 158 of file TriggerExpressionData.h.

References m_hltResults.

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

158  {
159  return * m_hltResults;
160  }
const edm::TriggerResults * m_hltResults
bool triggerExpression::Data::ignoreL1Mask ( ) const
inline
bool triggerExpression::Data::ignoreL1TechPrescales ( ) const
inline

Definition at line 206 of file TriggerExpressionData.h.

References m_l1techIgnorePrescales.

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

206  {
208  }
const L1GtTriggerMask& triggerExpression::Data::l1tAlgoMask ( ) const
inline

Definition at line 174 of file TriggerExpressionData.h.

References m_l1tAlgoMask.

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

174  {
175  return * m_l1tAlgoMask;
176  }
const L1GtTriggerMask * m_l1tAlgoMask
bool triggerExpression::Data::l1tConfigurationUpdated ( ) const
inline

Definition at line 186 of file TriggerExpressionData.h.

References m_l1tUpdated.

186  {
187  return m_l1tUpdated;
188  }
const L1GtTriggerMenu& triggerExpression::Data::l1tMenu ( ) const
inline

Definition at line 170 of file TriggerExpressionData.h.

References m_l1tMenu.

Referenced by triggerExpression::L1AlgoReader::init(), and triggerExpression::L1TechReader::init().

170  {
171  return * m_l1tMenu;
172  }
const L1GtTriggerMenu * m_l1tMenu
const L1GlobalTriggerReadoutRecord& triggerExpression::Data::l1tResults ( ) const
inline

Definition at line 166 of file TriggerExpressionData.h.

References m_l1tResults.

Referenced by triggerExpression::L1AlgoReader::operator()(), and triggerExpression::L1TechReader::operator()().

166  {
167  return * m_l1tResults;
168  }
const L1GlobalTriggerReadoutRecord * m_l1tResults
const L1GtTriggerMask& triggerExpression::Data::l1tTechMask ( ) const
inline

Definition at line 178 of file TriggerExpressionData.h.

References m_l1tTechMask.

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

178  {
179  return * m_l1tTechMask;
180  }
const L1GtTriggerMask * m_l1tTechMask
void triggerExpression::Data::setDaqPartitions ( unsigned int  daqPartitions)
inline

Definition at line 132 of file TriggerExpressionData.h.

References daqPartitions(), and m_daqPartitions.

132  {
134  }
unsigned int daqPartitions() const
bool Data::setEvent ( const edm::Event event,
const edm::EventSetup setup 
)

Definition at line 43 of file TriggerExpressionData.cc.

References event(), edm::EventSetup::get(), hasHLT(), hasL1T(), m_eventNumber, m_hltCacheID, m_hltMenu, m_hltResults, m_hltResultsToken, m_hltUpdated, m_l1tAlgoMask, m_l1tCacheID, m_l1tMenu, m_l1tResults, m_l1tResultsToken, m_l1tTechMask, m_l1tUpdated, edm::TriggerNames::parameterSetID(), HcalObjRepresent::setup(), and edm::TriggerNames::triggerNames().

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

43  {
44 
45  // cache the event number
46  m_eventNumber = event.id().event();
47 
48  // access L1 objects only if L1 is used
49  if (hasL1T()) {
50  // cache the L1 GT results objects
51  m_l1tResults = get<L1GlobalTriggerReadoutRecord>(event, m_l1tResultsToken);
52  if (not m_l1tResults)
53  return false;
54 
55  // cache the L1 trigger masks
56  m_l1tAlgoMask = get<L1GtTriggerMaskAlgoTrigRcd, L1GtTriggerMask>(setup);
57  m_l1tTechMask = get<L1GtTriggerMaskTechTrigRcd, L1GtTriggerMask>(setup);
58 
59  // cache the L1 trigger menu
60  unsigned long long l1tCacheID = setup.get<L1GtTriggerMenuRcd>().cacheIdentifier();
61  if (m_l1tCacheID == l1tCacheID) {
62  m_l1tUpdated = false;
63  } else {
64  m_l1tMenu = get<L1GtTriggerMenuRcd, L1GtTriggerMenu>(setup);
65  m_l1tCacheID = l1tCacheID;
66  m_l1tUpdated = true;
67  }
68  }
69 
70  // access HLT objects only if HLT is used
71  if (hasHLT()) {
72  // cache the HLT TriggerResults
73  m_hltResults = get<edm::TriggerResults>(event, m_hltResultsToken);
74  if (not m_hltResults)
75  return false;
76 
77  // access the TriggerNames, and check if it has changed
78  m_hltMenu = & event.triggerNames(* m_hltResults);
80  m_hltUpdated = false;
81  } else {
83  m_hltUpdated = true;
84  }
85  }
86 
87  return true;
88 }
const L1GtTriggerMask * m_l1tTechMask
const L1GtTriggerMask * m_l1tAlgoMask
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 L1GlobalTriggerReadoutRecord * m_l1tResults
const T & get() const
Definition: EventSetup.h:56
edm::ParameterSetID m_hltCacheID
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1tResultsToken
edm::EventNumber_t m_eventNumber
const L1GtTriggerMenu * m_l1tMenu
unsigned long long m_l1tCacheID
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
void triggerExpression::Data::setHltResultsTag ( edm::InputTag const &  tag)
inline
void triggerExpression::Data::setL1techIgnorePrescales ( bool  l1techIgnorePrescales)
inline

Definition at line 140 of file TriggerExpressionData.h.

References m_l1techIgnorePrescales.

140  {
141  m_l1techIgnorePrescales = l1techIgnorePrescales;
142  }
void triggerExpression::Data::setL1tIgnoreMask ( bool  l1tIgnoreMask)
inline

Definition at line 136 of file TriggerExpressionData.h.

References m_l1tIgnoreMask.

136  {
137  m_l1tIgnoreMask = l1tIgnoreMask;
138  }
void triggerExpression::Data::setL1tResultsTag ( edm::InputTag const &  tag)
inline
void triggerExpression::Data::setThrow ( bool  doThrow)
inline

Definition at line 144 of file TriggerExpressionData.h.

References m_throw.

144  {
145  m_throw = doThrow;
146  }
bool triggerExpression::Data::shouldThrow ( ) const
inline

Member Data Documentation

unsigned int triggerExpression::Data::m_daqPartitions
private

Definition at line 220 of file TriggerExpressionData.h.

Referenced by daqPartitions(), and setDaqPartitions().

edm::EventNumber_t triggerExpression::Data::m_eventNumber
private

Definition at line 240 of file TriggerExpressionData.h.

Referenced by eventNumber(), and setEvent().

edm::ParameterSetID triggerExpression::Data::m_hltCacheID
private

Definition at line 236 of file TriggerExpressionData.h.

Referenced by setEvent().

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

Definition at line 235 of file TriggerExpressionData.h.

Referenced by hltMenu(), and setEvent().

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

Definition at line 234 of file TriggerExpressionData.h.

Referenced by hltResults(), and setEvent().

edm::InputTag triggerExpression::Data::m_hltResultsTag
private

Definition at line 216 of file TriggerExpressionData.h.

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

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

Definition at line 217 of file TriggerExpressionData.h.

Referenced by Data(), and setEvent().

bool triggerExpression::Data::m_hltUpdated
private
const L1GtTriggerMask* triggerExpression::Data::m_l1tAlgoMask
private

Definition at line 228 of file TriggerExpressionData.h.

Referenced by l1tAlgoMask(), and setEvent().

unsigned long long triggerExpression::Data::m_l1tCacheID
private

Definition at line 230 of file TriggerExpressionData.h.

Referenced by setEvent().

bool triggerExpression::Data::m_l1techIgnorePrescales
private

Definition at line 222 of file TriggerExpressionData.h.

Referenced by ignoreL1TechPrescales(), and setL1techIgnorePrescales().

bool triggerExpression::Data::m_l1tIgnoreMask
private

Definition at line 221 of file TriggerExpressionData.h.

Referenced by ignoreL1Mask(), and setL1tIgnoreMask().

const L1GtTriggerMenu* triggerExpression::Data::m_l1tMenu
private

Definition at line 227 of file TriggerExpressionData.h.

Referenced by l1tMenu(), and setEvent().

const L1GlobalTriggerReadoutRecord* triggerExpression::Data::m_l1tResults
private

Definition at line 226 of file TriggerExpressionData.h.

Referenced by l1tResults(), and setEvent().

edm::InputTag triggerExpression::Data::m_l1tResultsTag
private

Definition at line 218 of file TriggerExpressionData.h.

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

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> triggerExpression::Data::m_l1tResultsToken
private

Definition at line 219 of file TriggerExpressionData.h.

Referenced by Data(), and setEvent().

const L1GtTriggerMask* triggerExpression::Data::m_l1tTechMask
private

Definition at line 229 of file TriggerExpressionData.h.

Referenced by l1tTechMask(), and setEvent().

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

Definition at line 223 of file TriggerExpressionData.h.

Referenced by setThrow(), and shouldThrow().