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)
 
 Data (edm::InputTag const &hltResultsTag, edm::InputTag const &l1tResultsTag, unsigned int daqPartitions, bool l1tIgnoreMask, bool l1techIgnorePrescales, bool doThrow)
 
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
 
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
 
const L1GtTriggerMaskm_l1tTechMask
 
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(""),
28  m_l1tResultsTag(""),
29  m_daqPartitions(0x01),
30  m_l1tIgnoreMask(false),
32  m_throw(true),
33  // l1 values and status
34  m_l1tResults(0),
35  m_l1tMenu(0),
36  m_l1tAlgoMask(0),
37  m_l1tTechMask(0),
38  m_l1tCacheID(),
39  m_l1tUpdated(false),
40  // hlt values and status
41  m_hltResults(0),
42  m_hltMenu(0),
43  m_hltCacheID(),
44  m_hltUpdated(false),
45  // event values
47  { }
const L1GtTriggerMask * m_l1tTechMask
const L1GtTriggerMask * m_l1tAlgoMask
const edm::TriggerResults * m_hltResults
const edm::TriggerNames * m_hltMenu
const L1GlobalTriggerReadoutRecord * m_l1tResults
edm::ParameterSetID m_hltCacheID
edm::EventNumber_t m_eventNumber
const L1GtTriggerMenu * m_l1tMenu
unsigned long long m_l1tCacheID
triggerExpression::Data::Data ( const edm::ParameterSet config)
inlineexplicit

Definition at line 50 of file TriggerExpressionData.h.

50  :
51  // configuration
52  m_hltResultsTag(config.getParameter<edm::InputTag>("hltResults")),
53  m_l1tResultsTag(config.getParameter<edm::InputTag>("l1tResults")),
54  m_daqPartitions(config.getParameter<unsigned int>("daqPartitions")),
55  m_l1tIgnoreMask(config.getParameter<bool>("l1tIgnoreMask")),
56  m_l1techIgnorePrescales(config.getParameter<bool>("l1techIgnorePrescales")),
57  m_throw(config.getParameter<bool>("throw")),
58  // l1 values and status
59  m_l1tResults(0),
60  m_l1tMenu(0),
61  m_l1tAlgoMask(0),
62  m_l1tTechMask(0),
63  m_l1tCacheID(),
64  m_l1tUpdated(false),
65  // hlt values and status
66  m_hltResults(0),
67  m_hltMenu(0),
68  m_hltCacheID(),
69  m_hltUpdated(false),
70  // event values
72  { }
T getParameter(std::string const &) const
const L1GtTriggerMask * m_l1tTechMask
const L1GtTriggerMask * m_l1tAlgoMask
const edm::TriggerResults * m_hltResults
const edm::TriggerNames * m_hltMenu
const L1GlobalTriggerReadoutRecord * m_l1tResults
edm::ParameterSetID m_hltCacheID
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 
)
inline

Definition at line 75 of file TriggerExpressionData.h.

82  :
83  // configuration
84  m_hltResultsTag(hltResultsTag),
85  m_l1tResultsTag(l1tResultsTag),
87  m_l1tIgnoreMask(l1tIgnoreMask),
88  m_l1techIgnorePrescales(l1techIgnorePrescales),
89  m_throw(doThrow),
90  // l1 values and status
91  m_l1tResults(0),
92  m_l1tMenu(0),
93  m_l1tAlgoMask(0),
94  m_l1tTechMask(0),
95  m_l1tCacheID(),
96  m_l1tUpdated(false),
97  // hlt values and status
98  m_hltResults(0),
99  m_hltMenu(0),
100  m_hltCacheID(),
101  m_hltUpdated(false),
102  // event values
103  m_eventNumber()
104  { }
const L1GtTriggerMask * m_l1tTechMask
const L1GtTriggerMask * m_l1tAlgoMask
const edm::TriggerResults * m_hltResults
const edm::TriggerNames * m_hltMenu
const L1GlobalTriggerReadoutRecord * m_l1tResults
unsigned int daqPartitions() const
edm::ParameterSetID m_hltCacheID
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 177 of file TriggerExpressionData.h.

References m_hltUpdated, m_l1tUpdated, and or.

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

177  {
179  }
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 181 of file TriggerExpressionData.h.

References m_eventNumber.

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

181  {
182  return m_eventNumber;
183  }
edm::EventNumber_t m_eventNumber
bool triggerExpression::Data::hasHLT ( ) const
inline

Definition at line 141 of file TriggerExpressionData.h.

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

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

141  {
142  return not m_hltResultsTag.label().empty();
143  }
std::string const & label() const
Definition: InputTag.h:25
bool triggerExpression::Data::hasL1T ( ) const
inline

Definition at line 137 of file TriggerExpressionData.h.

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

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

137  {
138  return not m_l1tResultsTag.label().empty();
139  }
std::string const & label() const
Definition: InputTag.h:25
bool triggerExpression::Data::hltConfigurationUpdated ( ) const
inline

Definition at line 169 of file TriggerExpressionData.h.

References m_hltUpdated.

169  {
170  return m_hltUpdated;
171  }
const edm::TriggerNames& triggerExpression::Data::hltMenu ( ) const
inline

Definition at line 149 of file TriggerExpressionData.h.

References m_hltMenu.

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

149  {
150  return * m_hltMenu;
151  }
const edm::TriggerNames * m_hltMenu
const edm::TriggerResults& triggerExpression::Data::hltResults ( ) const
inline

Definition at line 145 of file TriggerExpressionData.h.

References m_hltResults.

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

145  {
146  return * m_hltResults;
147  }
const edm::TriggerResults * m_hltResults
bool triggerExpression::Data::ignoreL1Mask ( ) const
inline
bool triggerExpression::Data::ignoreL1TechPrescales ( ) const
inline

Definition at line 193 of file TriggerExpressionData.h.

References m_l1techIgnorePrescales.

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

193  {
195  }
const L1GtTriggerMask& triggerExpression::Data::l1tAlgoMask ( ) const
inline

Definition at line 161 of file TriggerExpressionData.h.

References m_l1tAlgoMask.

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

161  {
162  return * m_l1tAlgoMask;
163  }
const L1GtTriggerMask * m_l1tAlgoMask
bool triggerExpression::Data::l1tConfigurationUpdated ( ) const
inline

Definition at line 173 of file TriggerExpressionData.h.

References m_l1tUpdated.

173  {
174  return m_l1tUpdated;
175  }
const L1GtTriggerMenu& triggerExpression::Data::l1tMenu ( ) const
inline

Definition at line 157 of file TriggerExpressionData.h.

References m_l1tMenu.

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

157  {
158  return * m_l1tMenu;
159  }
const L1GtTriggerMenu * m_l1tMenu
const L1GlobalTriggerReadoutRecord& triggerExpression::Data::l1tResults ( ) const
inline

Definition at line 153 of file TriggerExpressionData.h.

References m_l1tResults.

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

153  {
154  return * m_l1tResults;
155  }
const L1GlobalTriggerReadoutRecord * m_l1tResults
const L1GtTriggerMask& triggerExpression::Data::l1tTechMask ( ) const
inline

Definition at line 165 of file TriggerExpressionData.h.

References m_l1tTechMask.

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

165  {
166  return * m_l1tTechMask;
167  }
const L1GtTriggerMask * m_l1tTechMask
void triggerExpression::Data::setDaqPartitions ( unsigned int  daqPartitions)
inline

Definition at line 119 of file TriggerExpressionData.h.

References daqPartitions(), and m_daqPartitions.

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

Definition at line 43 of file TriggerExpressionData.cc.

References L1GtTriggerMenu::buildGtConditionMap(), event(), edm::EventSetup::get(), edm::InputTag::label(), m_eventNumber, m_hltCacheID, m_hltMenu, m_hltResults, m_hltResultsTag, m_hltUpdated, m_l1tAlgoMask, m_l1tCacheID, m_l1tMenu, m_l1tResults, m_l1tResultsTag, m_l1tTechMask, m_l1tUpdated, edm::TriggerNames::parameterSetID(), HcalObjRepresent::setup(), and edm::TriggerNames::triggerNames().

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

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 (not m_l1tResultsTag.label().empty()) {
50  // cache the L1 GT results objects
51  m_l1tResults = get<L1GlobalTriggerReadoutRecord>(event, m_l1tResultsTag);
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  (const_cast<L1GtTriggerMenu *>(m_l1tMenu))->buildGtConditionMap();
66  m_l1tCacheID = l1tCacheID;
67  m_l1tUpdated = true;
68  }
69  }
70 
71  // access HLT objects only if HLT is used
72  if (not m_hltResultsTag.label().empty()) {
73  // cache the HLT TriggerResults
74  m_hltResults = get<edm::TriggerResults>(event, m_hltResultsTag);
75  if (not m_hltResults)
76  return false;
77 
78  // access the TriggerNames, and check if it has changed
79  m_hltMenu = & event.triggerNames(* m_hltResults);
81  m_hltUpdated = false;
82  } else {
84  m_hltUpdated = true;
85  }
86  }
87 
88  return true;
89 }
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
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:55
std::string const & label() const
Definition: InputTag.h:25
edm::ParameterSetID m_hltCacheID
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 127 of file TriggerExpressionData.h.

References m_l1techIgnorePrescales.

127  {
128  m_l1techIgnorePrescales = l1techIgnorePrescales;
129  }
void triggerExpression::Data::setL1tIgnoreMask ( bool  l1tIgnoreMask)
inline

Definition at line 123 of file TriggerExpressionData.h.

References m_l1tIgnoreMask.

123  {
124  m_l1tIgnoreMask = l1tIgnoreMask;
125  }
void triggerExpression::Data::setL1tResultsTag ( edm::InputTag const &  tag)
inline
void triggerExpression::Data::setThrow ( bool  doThrow)
inline

Definition at line 131 of file TriggerExpressionData.h.

References m_throw.

131  {
132  m_throw = doThrow;
133  }
bool triggerExpression::Data::shouldThrow ( ) const
inline

Member Data Documentation

unsigned int triggerExpression::Data::m_daqPartitions
private

Definition at line 205 of file TriggerExpressionData.h.

Referenced by daqPartitions(), and setDaqPartitions().

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

Definition at line 225 of file TriggerExpressionData.h.

Referenced by eventNumber(), and setEvent().

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

Definition at line 221 of file TriggerExpressionData.h.

Referenced by setEvent().

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

Definition at line 220 of file TriggerExpressionData.h.

Referenced by hltMenu(), and setEvent().

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

Definition at line 219 of file TriggerExpressionData.h.

Referenced by hltResults(), and setEvent().

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

Definition at line 203 of file TriggerExpressionData.h.

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

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

Definition at line 213 of file TriggerExpressionData.h.

Referenced by l1tAlgoMask(), and setEvent().

unsigned long long triggerExpression::Data::m_l1tCacheID
private

Definition at line 215 of file TriggerExpressionData.h.

Referenced by setEvent().

bool triggerExpression::Data::m_l1techIgnorePrescales
private

Definition at line 207 of file TriggerExpressionData.h.

Referenced by ignoreL1TechPrescales(), and setL1techIgnorePrescales().

bool triggerExpression::Data::m_l1tIgnoreMask
private

Definition at line 206 of file TriggerExpressionData.h.

Referenced by ignoreL1Mask(), and setL1tIgnoreMask().

const L1GtTriggerMenu* triggerExpression::Data::m_l1tMenu
private

Definition at line 212 of file TriggerExpressionData.h.

Referenced by l1tMenu(), and setEvent().

const L1GlobalTriggerReadoutRecord* triggerExpression::Data::m_l1tResults
private

Definition at line 211 of file TriggerExpressionData.h.

Referenced by l1tResults(), and setEvent().

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

Definition at line 204 of file TriggerExpressionData.h.

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

const L1GtTriggerMask* triggerExpression::Data::m_l1tTechMask
private

Definition at line 214 of file TriggerExpressionData.h.

Referenced by l1tTechMask(), and setEvent().

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

Definition at line 208 of file TriggerExpressionData.h.

Referenced by setThrow(), and shouldThrow().