CMS 3D CMS Logo

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

#include <L1GtUtils.h>

Public Types

enum  TriggerCategory { AlgorithmTrigger = 0, TechnicalTrigger = 1 }
 

Public Member Functions

const bool availableL1Configuration (int &errorCode, int &l1ConfCode) const
 
const bool decision (const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
 
const bool decision (const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
 
const bool decisionAfterMask (const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
 return decision after trigger mask for a given algorithm or technical trigger More...
 
const bool decisionAfterMask (const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
 
const bool decisionBeforeMask (const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
 return decision before trigger mask for a given algorithm or technical trigger More...
 
const bool decisionBeforeMask (const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
 
void getInputTag (const edm::Event &iEvent, edm::InputTag &l1GtRecordInputTag, edm::InputTag &l1GtReadoutRecordInputTag) const
 get the input tags for L1GlobalTriggerRecord and L1GlobalTriggerReadoutRecord More...
 
void getL1GtTriggerMenuLiteInputTag (const edm::Event &iEvent, edm::InputTag &l1GtTriggerMenuLiteInputTag) const
 get the input tags for L1GtTriggerMenuLite More...
 
const bool l1AlgoTechTrigBitNumber (const std::string &nameAlgoTechTrig, TriggerCategory &trigCategory, int &bitNumber) const
 
const bool l1AlgTechTrigBitNumber (const std::string &nameAlgoTechTrig, int &triggerAlgoTechTrig, int &bitNumber) const
 deprecated version - use l1AlgoTechTrigBitNumber More...
 
 L1GtUtils ()
 constructor More...
 
const int l1Results (const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
 
const int l1Results (const edm::Event &iEvent, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
 
const std::string & l1TriggerMenu () const
 return the L1 trigger menu name More...
 
const std::string & l1TriggerMenuImplementation () const
 return the L1 trigger menu implementation More...
 
const int prescaleFactor (const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
 return prescale factor for a given algorithm or technical trigger More...
 
const int prescaleFactor (const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
 
const std::vector< int > & prescaleFactorSet (const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const TriggerCategory &trigCategory, int &errorCode)
 
const std::vector< int > & prescaleFactorSet (const edm::Event &iEvent, const TriggerCategory &trigCategory, int &errorCode)
 
const std::vector< int > & prescaleFactorSet (const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &triggerAlgoTechTrig, int &errorCode)
 deprecated versions More...
 
const std::vector< int > & prescaleFactorSet (const edm::Event &iEvent, const std::string &triggerAlgoTechTrig, int &errorCode)
 
const int prescaleFactorSetIndex (const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const TriggerCategory &trigCategory, int &errorCode) const
 
const int prescaleFactorSetIndex (const edm::Event &iEvent, const TriggerCategory &trigCategory, int &errorCode) const
 
const int prescaleFactorSetIndex (const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &triggerAlgoTechTrig, int &errorCode) const
 deprecated versions More...
 
const int prescaleFactorSetIndex (const edm::Event &iEvent, const std::string &triggerAlgoTechTrig, int &errorCode) const
 
const L1GtTriggerMenuLiteptrL1GtTriggerMenuLite (int &errorCode)
 return a pointer to the L1GtTriggerMenuLite product More...
 
const L1GtTriggerMenuptrL1TriggerMenuEventSetup (int &errorCode)
 return a pointer to the L1 trigger menu from event setup More...
 
void retrieveL1EventSetup (const edm::EventSetup &)
 retrieve all the relevant L1 trigger event setup records and cache them to improve the speed More...
 
void retrieveL1GtTriggerMenuLite (const edm::Event &, edm::InputTag &)
 
void retrieveL1GtTriggerMenuLite (const edm::Event &)
 input tag found from provenance More...
 
const std::string triggerCategory (const TriggerCategory &) const
 public methods More...
 
const int triggerMask (const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
 return trigger mask for a given algorithm or technical trigger More...
 
const int triggerMask (const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
 
const int triggerMask (const std::string &nameAlgoTechTrig, int &errorCode) const
 
const std::vector< unsigned int > & triggerMaskSet (const TriggerCategory &trigCategory, int &errorCode)
 
const std::vector< unsigned int > & triggerMaskSet (const std::string &triggerAlgoTechTrig, int &errorCode)
 deprecated version More...
 
virtual ~L1GtUtils ()
 destructor More...
 

Private Member Functions

const bool trigResult (const DecisionWord &decWord, const int bitNumber, const std::string &nameAlgoTechTrig, const TriggerCategory &trigCategory, int &errorCode) const
 

Private Attributes

const AlgorithmMapm_algorithmAliasMap
 
const
L1GtTriggerMenuLite::L1TriggerMap
m_algorithmAliasMapLite
 
const AlgorithmMapm_algorithmMap
 
const
L1GtTriggerMenuLite::L1TriggerMap
m_algorithmMapLite
 
bool m_l1EventSetupValid
 
const L1GtTriggerMenum_l1GtMenu
 
unsigned long long m_l1GtMenuCacheID
 
const L1GtTriggerMenuLitem_l1GtMenuLite
 L1GtTriggerMenuLite cached stuff. More...
 
bool m_l1GtMenuLiteValid
 
const L1GtPrescaleFactorsm_l1GtPfAlgo
 prescale factors More...
 
unsigned long long m_l1GtPfAlgoCacheID
 
const L1GtPrescaleFactorsm_l1GtPfTech
 
unsigned long long m_l1GtPfTechCacheID
 
const L1GtStableParametersm_l1GtStablePar
 event setup cached stuff More...
 
unsigned long long m_l1GtStableParCacheID
 
const L1GtTriggerMaskm_l1GtTmAlgo
 trigger masks & veto masks More...
 
unsigned long long m_l1GtTmAlgoCacheID
 
const L1GtTriggerMaskm_l1GtTmTech
 
unsigned long long m_l1GtTmTechCacheID
 
const L1GtTriggerMaskm_l1GtTmVetoAlgo
 
unsigned long long m_l1GtTmVetoAlgoCacheID
 
const L1GtTriggerMaskm_l1GtTmVetoTech
 
unsigned long long m_l1GtTmVetoTechCacheID
 
unsigned int m_numberAlgorithmTriggers
 number of algorithm triggers More...
 
unsigned int m_numberTechnicalTriggers
 number of technical triggers More...
 
unsigned int m_physicsDaqPartition
 index of physics DAQ partition More...
 
const std::vector< std::vector
< int > > * 
m_prescaleFactorsAlgoTrig
 
const std::vector< std::vector
< int > > * 
m_prescaleFactorsAlgoTrigLite
 
std::vector< int > m_prescaleFactorSet
 
const std::vector< std::vector
< int > > * 
m_prescaleFactorsTechTrig
 
const std::vector< std::vector
< int > > * 
m_prescaleFactorsTechTrigLite
 
const edm::RunIDm_provRunIDCache
 
bool m_retrieveL1EventSetup
 flags to check which method was used to retrieve L1 trigger configuration More...
 
bool m_retrieveL1GtTriggerMenuLite
 
const edm::RunIDm_runIDCache
 
const AlgorithmMapm_technicalTriggerMap
 
const
L1GtTriggerMenuLite::L1TriggerMap
m_technicalTriggerMapLite
 
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
 
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
 
std::vector< unsigned int > m_triggerMaskSet
 
const std::vector< unsigned int > * m_triggerMaskTechTrig
 
const std::vector< unsigned int > * m_triggerMaskTechTrigLite
 
const std::vector< unsigned int > * m_triggerMaskVetoAlgoTrig
 
const std::vector< unsigned int > * m_triggerMaskVetoTechTrig
 

Static Private Attributes

static const std::string EmptyString = ""
 
static const int L1GtNotValidError = 99999
 

Detailed Description

Description: various methods for L1 GT, to be called in an EDM analyzer, producer or filter.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 47 of file L1GtUtils.h.

Member Enumeration Documentation

Enumerator
AlgorithmTrigger 
TechnicalTrigger 

Definition at line 59 of file L1GtUtils.h.

Constructor & Destructor Documentation

L1GtUtils::L1GtUtils ( )
explicit

constructor

Definition at line 50 of file L1GtUtils.cc.

50  :
51 
53 
55 
57 
59 
61 
62  m_l1GtMenuCacheID(0ULL),
63 
64  m_l1EventSetupValid(false),
65 
66  m_l1GtMenuLiteValid(false),
67 
69 
71 
73 
74  {
75 
76  // empty
77 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:374
unsigned long long m_l1GtMenuCacheID
Definition: L1GtUtils.h:332
unsigned long long m_l1GtPfAlgoCacheID
Definition: L1GtUtils.h:303
unsigned long long m_l1GtTmVetoTechCacheID
Definition: L1GtUtils.h:322
unsigned long long m_l1GtTmTechCacheID
Definition: L1GtUtils.h:316
unsigned long long m_l1GtTmAlgoCacheID
Definition: L1GtUtils.h:313
unsigned int m_numberTechnicalTriggers
number of technical triggers
Definition: L1GtUtils.h:299
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:373
unsigned int m_physicsDaqPartition
index of physics DAQ partition
Definition: L1GtUtils.h:367
unsigned int m_numberAlgorithmTriggers
number of algorithm triggers
Definition: L1GtUtils.h:296
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:362
unsigned long long m_l1GtPfTechCacheID
Definition: L1GtUtils.h:306
bool m_l1EventSetupValid
Definition: L1GtUtils.h:338
unsigned long long m_l1GtTmVetoAlgoCacheID
Definition: L1GtUtils.h:319
unsigned long long m_l1GtStableParCacheID
Definition: L1GtUtils.h:293
L1GtUtils::~L1GtUtils ( )
virtual

destructor

Definition at line 80 of file L1GtUtils.cc.

80  {
81 
82  // empty
83 
84 }

Member Function Documentation

const bool L1GtUtils::availableL1Configuration ( int &  errorCode,
int &  l1ConfCode 
) const

check if L1 trigger configuration is available return false and an error code if configuration is not available

Definition at line 2235 of file L1GtUtils.cc.

References L1GtNotValidError, LogDebug, m_l1EventSetupValid, m_l1GtMenuLiteValid, m_retrieveL1EventSetup, and m_retrieveL1GtTriggerMenuLite.

Referenced by L1GtAnalyzer::analyzeL1GtUtilsCore(), l1Results(), prescaleFactorSet(), prescaleFactorSetIndex(), ptrL1GtTriggerMenuLite(), ptrL1TriggerMenuEventSetup(), triggerMask(), and triggerMaskSet().

2235  {
2236 
2238  if (!m_retrieveL1EventSetup) {
2239  LogDebug("L1GtUtils")
2240  << "\nRetrieve L1 trigger configuration from L1GtTriggerMenuLite only\n"
2241  << std::endl;
2242  l1ConfCode = 0;
2243  } else {
2244  LogDebug("L1GtUtils")
2245  << "\nFall through: retrieve L1 trigger configuration from L1GtTriggerMenuLite"
2246  << "\n if L1GtTriggerMenuLite not valid, try to retrieve from event setup "
2247  << std::endl;
2248  l1ConfCode = 100000;
2249  }
2250 
2251  if (m_l1GtMenuLiteValid) {
2252  LogDebug("L1GtUtils")
2253  << "\nRetrieve L1 trigger configuration from L1GtTriggerMenuLite, valid product\n"
2254  << std::endl;
2255  l1ConfCode = l1ConfCode + 10000;
2256  errorCode = 0;
2257 
2258  return true;
2259 
2260  } else if (m_retrieveL1EventSetup) {
2261  if (m_l1EventSetupValid) {
2262  LogDebug("L1GtUtils")
2263  << "\nFall through: retrieve L1 trigger configuration from event setup."
2264  << "\nFirst option was L1GtTriggerMenuLite - but product is not valid.\n"
2265  << std::endl;
2266  l1ConfCode = l1ConfCode + 20000;
2267  errorCode = 0;
2268 
2269  return true;
2270 
2271  } else {
2272  LogDebug("L1GtUtils")
2273  << "\nFall through: L1GtTriggerMenuLite not valid, event setup not valid.\n"
2274  << std::endl;
2275  l1ConfCode = l1ConfCode + L1GtNotValidError;
2276  errorCode = l1ConfCode;
2277 
2278  return false;
2279 
2280 
2281  }
2282 
2283  } else {
2284  LogDebug("L1GtUtils")
2285  << "\nError: L1 trigger configuration requested from L1GtTriggerMenuLite only"
2286  << "\nbut L1GtTriggerMenuLite is not valid.\n" << std::endl;
2287  l1ConfCode = l1ConfCode + L1GtNotValidError;
2288  errorCode = l1ConfCode;
2289 
2290  return false;
2291 
2292  }
2293  } else if (m_retrieveL1EventSetup) {
2294 
2295  LogDebug("L1GtUtils")
2296  << "\nRetrieve L1 trigger configuration from event setup."
2297  << "\nL1GtTriggerMenuLite product was not requested.\n"
2298  << std::endl;
2299  l1ConfCode = 200000;
2300 
2301  if (m_l1EventSetupValid) {
2302  LogDebug("L1GtUtils")
2303  << "\nRetrieve L1 trigger configuration from event setup only."
2304  << "\nValid L1 trigger event setup.\n"
2305  << std::endl;
2306  l1ConfCode = l1ConfCode + 10000;
2307  errorCode = 0;
2308 
2309  return true;
2310 
2311  } else {
2312  LogDebug("L1GtUtils")
2313  << "\nRetrieve L1 trigger configuration from event setup only."
2314  << "\nNo valid L1 trigger event setup.\n"
2315  << std::endl;
2316  l1ConfCode = l1ConfCode + L1GtNotValidError;
2317  errorCode = l1ConfCode;
2318 
2319  return false;
2320 
2321 
2322  }
2323 
2324  } else {
2325  LogDebug("L1GtUtils")
2326  << "\nError: no L1 trigger configuration requested to be retrieved."
2327  << "\nMust call before either retrieveL1GtTriggerMenuLite or retrieveL1EventSetup.\n"
2328  << std::endl;
2329  l1ConfCode = 300000;
2330  errorCode = l1ConfCode;
2331 
2332  return false;
2333 
2334  }
2335 }
#define LogDebug(id)
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:374
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:373
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:362
static const int L1GtNotValidError
Definition: L1GtUtils.h:278
bool m_l1EventSetupValid
Definition: L1GtUtils.h:338
const bool L1GtUtils::decision ( const edm::Event iEvent,
const edm::InputTag l1GtRecordInputTag,
const edm::InputTag l1GtReadoutRecordInputTag,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

return decision after trigger mask for a given algorithm or technical trigger function identical with decisionAfterMask

Definition at line 1184 of file L1GtUtils.cc.

References decisionAfterMask(), decisionBeforeMask(), l1Results(), prescaleFactor(), and triggerMask().

Referenced by TriggerHelper::acceptL1LogicalExpression(), GenericTriggerEventFlag::acceptL1LogicalExpression(), L1GtAnalyzer::analyzeL1GtUtilsCore(), and PrescaleWeightProvider::prescaleWeight().

1187  {
1188 
1189  // initial values
1190  bool decisionBeforeMask = false;
1191  bool decisionAfterMask = false;
1192  int prescaleFactor = -1;
1193  int triggerMask = -1;
1194 
1195  errorCode = l1Results(iEvent, l1GtRecordInputTag,
1196  l1GtReadoutRecordInputTag, nameAlgoTechTrig, decisionBeforeMask,
1197  decisionAfterMask, prescaleFactor, triggerMask);
1198 
1199  return decisionAfterMask;
1200 
1201 }
const bool decisionAfterMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1147
const int l1Results(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:614
const bool decisionBeforeMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1110
const int triggerMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1256
const int prescaleFactor(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1221
const bool L1GtUtils::decision ( const edm::Event iEvent,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

Definition at line 1203 of file L1GtUtils.cc.

References decisionAfterMask(), decisionBeforeMask(), l1Results(), prescaleFactor(), and triggerMask().

1204  {
1205 
1206  // initial values
1207  bool decisionBeforeMask = false;
1208  bool decisionAfterMask = false;
1209  int prescaleFactor = -1;
1210  int triggerMask = -1;
1211 
1212  errorCode = l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1213  decisionAfterMask, prescaleFactor, triggerMask);
1214 
1215  return decisionAfterMask;
1216 
1217 }
const bool decisionAfterMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1147
const int l1Results(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:614
const bool decisionBeforeMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1110
const int triggerMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1256
const int prescaleFactor(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1221
const bool L1GtUtils::decisionAfterMask ( const edm::Event iEvent,
const edm::InputTag l1GtRecordInputTag,
const edm::InputTag l1GtReadoutRecordInputTag,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

return decision after trigger mask for a given algorithm or technical trigger

Definition at line 1147 of file L1GtUtils.cc.

References decisionBeforeMask(), l1Results(), prescaleFactor(), and triggerMask().

Referenced by L1GtAnalyzer::analyzeL1GtUtilsCore(), decision(), decisionAfterMask(), decisionBeforeMask(), prescaleFactor(), and triggerMask().

1150  {
1151 
1152  // initial values
1153  bool decisionBeforeMask = false;
1154  bool decisionAfterMask = false;
1155  int prescaleFactor = -1;
1156  int triggerMask = -1;
1157 
1158  errorCode = l1Results(iEvent, l1GtRecordInputTag,
1159  l1GtReadoutRecordInputTag, nameAlgoTechTrig, decisionBeforeMask,
1160  decisionAfterMask, prescaleFactor, triggerMask);
1161 
1162  return decisionAfterMask;
1163 
1164 }
const bool decisionAfterMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1147
const int l1Results(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:614
const bool decisionBeforeMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1110
const int triggerMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1256
const int prescaleFactor(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1221
const bool L1GtUtils::decisionAfterMask ( const edm::Event iEvent,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

Definition at line 1166 of file L1GtUtils.cc.

References decisionAfterMask(), decisionBeforeMask(), l1Results(), prescaleFactor(), and triggerMask().

1167  {
1168 
1169  // initial values
1170  bool decisionBeforeMask = false;
1171  bool decisionAfterMask = false;
1172  int prescaleFactor = -1;
1173  int triggerMask = -1;
1174 
1175  errorCode = l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1176  decisionAfterMask, prescaleFactor, triggerMask);
1177 
1178  return decisionAfterMask;
1179 
1180 }
const bool decisionAfterMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1147
const int l1Results(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:614
const bool decisionBeforeMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1110
const int triggerMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1256
const int prescaleFactor(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1221
const bool L1GtUtils::decisionBeforeMask ( const edm::Event iEvent,
const edm::InputTag l1GtRecordInputTag,
const edm::InputTag l1GtReadoutRecordInputTag,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

return decision before trigger mask for a given algorithm or technical trigger

for the functions decisionBeforeMask, decisionAfterMask, decision prescaleFactor, trigger mask:

input: event, event setup input tag for the L1GlobalTriggerRecord product input tag for the L1GlobalTriggerReadoutRecord product algorithm trigger name or alias, or technical trigger name output (by reference): error code return: the corresponding quantity

if input tags are not given, they are found for the appropriate EDM products from provenance

Definition at line 1110 of file L1GtUtils.cc.

References decisionAfterMask(), l1Results(), prescaleFactor(), and triggerMask().

Referenced by L1GtAnalyzer::analyzeL1GtUtilsCore(), decision(), decisionAfterMask(), decisionBeforeMask(), l1Results(), prescaleFactor(), and triggerMask().

1113  {
1114 
1115  // initial values
1116  bool decisionBeforeMask = false;
1117  bool decisionAfterMask = false;
1118  int prescaleFactor = -1;
1119  int triggerMask = -1;
1120 
1121  errorCode = l1Results(iEvent, l1GtRecordInputTag,
1122  l1GtReadoutRecordInputTag, nameAlgoTechTrig, decisionBeforeMask,
1123  decisionAfterMask, prescaleFactor, triggerMask);
1124 
1125  return decisionBeforeMask;
1126 
1127 }
const bool decisionAfterMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1147
const int l1Results(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:614
const bool decisionBeforeMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1110
const int triggerMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1256
const int prescaleFactor(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1221
const bool L1GtUtils::decisionBeforeMask ( const edm::Event iEvent,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

Definition at line 1129 of file L1GtUtils.cc.

References decisionAfterMask(), decisionBeforeMask(), l1Results(), prescaleFactor(), and triggerMask().

1130  {
1131 
1132  // initial values
1133  bool decisionBeforeMask = false;
1134  bool decisionAfterMask = false;
1135  int prescaleFactor = -1;
1136  int triggerMask = -1;
1137 
1138  errorCode = l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1139  decisionAfterMask, prescaleFactor, triggerMask);
1140 
1141  return decisionBeforeMask;
1142 
1143 }
const bool decisionAfterMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1147
const int l1Results(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:614
const bool decisionBeforeMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1110
const int triggerMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1256
const int prescaleFactor(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1221
void L1GtUtils::getInputTag ( const edm::Event iEvent,
edm::InputTag l1GtRecordInputTag,
edm::InputTag l1GtReadoutRecordInputTag 
) const

get the input tags for L1GlobalTriggerRecord and L1GlobalTriggerReadoutRecord

Definition at line 339 of file L1GtUtils.cc.

References edm::friendlyname::friendlyName(), and edm::Event::getAllProvenance().

Referenced by l1Results(), prescaleFactorSet(), and prescaleFactorSetIndex().

341  {
342 
343  typedef std::vector<edm::Provenance const*> Provenances;
344  Provenances provenances;
345  std::string friendlyName;
346  std::string modLabel;
347  std::string instanceName;
348  std::string processName;
349 
350  // to be sure that the input tags are correctly initialized
351  edm::InputTag l1GtRecordInputTagVal;
352  edm::InputTag l1GtReadoutRecordInputTagVal;
353 
354  bool foundL1GtRecord = false;
355  bool foundL1GtReadoutRecord = false;
356 
357  //edm::LogVerbatim("L1GtUtils") << "\nTry to get AllProvenance for event "
358  // << iEvent.id().event() << std::endl;
359 
360  iEvent.getAllProvenance(provenances);
361 
362  //edm::LogVerbatim("L1GtUtils") << "\n" << "Event contains "
363  // << provenances.size() << " product" << (provenances.size()==1 ? "" : "s")
364  // << " with friendlyClassName, moduleLabel, productInstanceName and processName:"
365  // << std::endl;
366 
367  for (Provenances::iterator itProv = provenances.begin(), itProvEnd =
368  provenances.end(); itProv != itProvEnd; ++itProv) {
369 
370  friendlyName = (*itProv)->friendlyClassName();
371  modLabel = (*itProv)->moduleLabel();
372  instanceName = (*itProv)->productInstanceName();
373  processName = (*itProv)->processName();
374 
375  //edm::LogVerbatim("L1GtUtils") << friendlyName << " \"" << modLabel
376  // << "\" \"" << instanceName << "\" \"" << processName << "\""
377  // << std::endl;
378 
379  if (friendlyName == "L1GlobalTriggerRecord") {
380  l1GtRecordInputTagVal = edm::InputTag(modLabel, instanceName,
381  processName);
382  foundL1GtRecord = true;
383  } else if (friendlyName == "L1GlobalTriggerReadoutRecord") {
384 
385  l1GtReadoutRecordInputTagVal = edm::InputTag(modLabel, instanceName,
386  processName);
387  foundL1GtReadoutRecord = true;
388  }
389  }
390 
391  // copy the input tags found to the returned arguments
392  l1GtRecordInputTag = l1GtRecordInputTagVal;
393  l1GtReadoutRecordInputTag = l1GtReadoutRecordInputTagVal;
394 
395  //if (foundL1GtRecord) {
396  // edm::LogVerbatim("L1GtUtils")
397  // << "\nL1GlobalTriggerRecord found in the event with \n "
398  // << l1GtRecordInputTag << std::endl;
399  //
400  //}
401 
402  //if (foundL1GtReadoutRecord) {
403  // edm::LogVerbatim("L1GtUtils")
404  // << "\nL1GlobalTriggerReadoutRecord found in the event with \n "
405  // << l1GtReadoutRecordInputTag << std::endl;
406  //}
407 
408 }
void getAllProvenance(std::vector< Provenance const * > &provenances) const
Definition: Event.cc:71
std::string friendlyName(std::string const &iFullName)
void L1GtUtils::getL1GtTriggerMenuLiteInputTag ( const edm::Event iEvent,
edm::InputTag l1GtTriggerMenuLiteInputTag 
) const

get the input tags for L1GtTriggerMenuLite

Definition at line 410 of file L1GtUtils.cc.

References edm::friendlyname::friendlyName(), edm::Run::getAllProvenance(), and edm::Event::getRun().

Referenced by retrieveL1GtTriggerMenuLite().

411  {
412 
413  typedef std::vector<edm::Provenance const*> Provenances;
414  Provenances provenances;
415  std::string friendlyName;
416  std::string modLabel;
417  std::string instanceName;
418  std::string processName;
419 
420  // to be sure that the input tag is correctly initialized
421  edm::InputTag l1GtTriggerMenuLiteInputTagVal;
422  bool foundL1GtTriggerMenuLite = false;
423 
424  // get Run Data
425  const edm::Run& iRun = iEvent.getRun();
426 
427  //edm::LogVerbatim("L1GtUtils") << "\nTry to get AllProvenance for run "
428  // << iRun.runAuxiliary().run() << " event " << iEvent.id().event()
429  // << std::endl;
430 
431  iRun.getAllProvenance(provenances);
432 
433  //edm::LogVerbatim("L1GtUtils") << "\n" << "Run contains "
434  // << provenances.size() << " product"
435  // << (provenances.size() == 1 ? "" : "s")
436  // << " with friendlyClassName, moduleLabel, productInstanceName and processName:"
437  // << std::endl;
438 
439  for (Provenances::iterator itProv = provenances.begin(), itProvEnd =
440  provenances.end(); itProv != itProvEnd; ++itProv) {
441 
442  friendlyName = (*itProv)->friendlyClassName();
443  modLabel = (*itProv)->moduleLabel();
444  instanceName = (*itProv)->productInstanceName();
445  processName = (*itProv)->processName();
446 
447  //edm::LogVerbatim("L1GtUtils") << friendlyName << " \"" << modLabel
448  // << "\" \"" << instanceName << "\" \"" << processName << "\""
449  // << std::endl;
450 
451  if (friendlyName == "L1GtTriggerMenuLite") {
452  l1GtTriggerMenuLiteInputTagVal = edm::InputTag(modLabel,
453  instanceName, processName);
454  foundL1GtTriggerMenuLite = true;
455  }
456 
457  }
458 
459  // copy the input tags found to the returned arguments
460  l1GtTriggerMenuLiteInputTag = l1GtTriggerMenuLiteInputTagVal;
461 
462  //if (foundL1GtTriggerMenuLite) {
463  // edm::LogVerbatim("L1GtUtils")
464  // << "\nL1GtTriggerMenuLite found in the event with \n "
465  // << l1GtTriggerMenuLiteInputTag << std::endl;
466  //}
467 
468 }
void getAllProvenance(std::vector< Provenance const * > &provenances) const
Definition: Run.cc:35
Run const & getRun() const
Definition: Event.cc:44
std::string friendlyName(std::string const &iFullName)
Definition: Run.h:31
const bool L1GtUtils::l1AlgoTechTrigBitNumber ( const std::string &  nameAlgoTechTrig,
TriggerCategory trigCategory,
int &  bitNumber 
) const

return the trigger "category" trigCategory algorithm trigger alias or algorithm trigger name AlgorithmTrigger = 0, technical trigger TechnicalTrigger = 1 and its bit number

in case the algorithm trigger / technical trigger is not in the menu, the returned function is false, the trigger category is irrelevant (default value is AlgorithmTrigger), and the value of the bit number is -1

Definition at line 470 of file L1GtUtils.cc.

References AlgorithmTrigger, m_algorithmAliasMap, m_algorithmAliasMapLite, m_algorithmMap, m_algorithmMapLite, m_l1GtMenuLiteValid, m_retrieveL1EventSetup, m_retrieveL1GtTriggerMenuLite, m_technicalTriggerMap, m_technicalTriggerMapLite, and TechnicalTrigger.

Referenced by l1AlgTechTrigBitNumber(), l1Results(), pat::PATTriggerProducer::produce(), and triggerMask().

472  {
473 
474  trigCategory = AlgorithmTrigger;
475  bitNumber = -1;
476 
478  if (m_l1GtMenuLiteValid) {
479 
480  // test if the name is an algorithm alias
481  for (L1GtTriggerMenuLite::CItL1Trig itTrig =
482  m_algorithmAliasMapLite->begin(); itTrig
483  != m_algorithmAliasMapLite->end(); itTrig++) {
484 
485  if (itTrig->second == nameAlgoTechTrig) {
486 
487  trigCategory = AlgorithmTrigger;
488  bitNumber = itTrig->first;
489 
490  return true;
491  }
492  }
493 
494  // test if the name is an algorithm name
495  for (L1GtTriggerMenuLite::CItL1Trig itTrig =
496  m_algorithmMapLite->begin(); itTrig
497  != m_algorithmMapLite->end(); itTrig++) {
498 
499  if (itTrig->second == nameAlgoTechTrig) {
500 
501  trigCategory = AlgorithmTrigger;
502  bitNumber = itTrig->first;
503 
504  return true;
505  }
506  }
507 
508  // test if the name is a technical trigger
509  for (L1GtTriggerMenuLite::CItL1Trig itTrig =
510  m_technicalTriggerMapLite->begin(); itTrig
511  != m_technicalTriggerMapLite->end(); itTrig++) {
512 
513  if (itTrig->second == nameAlgoTechTrig) {
514 
515  trigCategory = TechnicalTrigger;
516  bitNumber = itTrig->first;
517 
518  return true;
519  }
520  }
521 
522  } else if (m_retrieveL1EventSetup) {
523 
524  // test if the name is an algorithm alias
525  CItAlgo itAlgo = m_algorithmAliasMap->find(nameAlgoTechTrig);
526  if (itAlgo != m_algorithmAliasMap->end()) {
527  trigCategory = AlgorithmTrigger;
528  bitNumber = (itAlgo->second).algoBitNumber();
529 
530  return true;
531  }
532 
533  // test if the name is an algorithm name
534  itAlgo = m_algorithmMap->find(nameAlgoTechTrig);
535  if (itAlgo != m_algorithmMap->end()) {
536  trigCategory = AlgorithmTrigger;
537  bitNumber = (itAlgo->second).algoBitNumber();
538 
539  return true;
540  }
541 
542  // test if the name is a technical trigger
543  itAlgo = m_technicalTriggerMap->find(nameAlgoTechTrig);
544  if (itAlgo != m_technicalTriggerMap->end()) {
545  trigCategory = TechnicalTrigger;
546  bitNumber = (itAlgo->second).algoBitNumber();
547 
548  return true;
549  }
550 
551  } else {
552  // only L1GtTriggerMenuLite requested, but it is not valid
553  return false;
554 
555  }
556  } else if (m_retrieveL1EventSetup) {
557 
558  // test if the name is an algorithm alias
559  CItAlgo itAlgo = m_algorithmAliasMap->find(nameAlgoTechTrig);
560  if (itAlgo != m_algorithmAliasMap->end()) {
561  trigCategory = AlgorithmTrigger;
562  bitNumber = (itAlgo->second).algoBitNumber();
563 
564  return true;
565  }
566 
567  // test if the name is an algorithm name
568  itAlgo = m_algorithmMap->find(nameAlgoTechTrig);
569  if (itAlgo != m_algorithmMap->end()) {
570  trigCategory = AlgorithmTrigger;
571  bitNumber = (itAlgo->second).algoBitNumber();
572 
573  return true;
574  }
575 
576  // test if the name is a technical trigger
577  itAlgo = m_technicalTriggerMap->find(nameAlgoTechTrig);
578  if (itAlgo != m_technicalTriggerMap->end()) {
579  trigCategory = TechnicalTrigger;
580  bitNumber = (itAlgo->second).algoBitNumber();
581 
582  return true;
583  }
584 
585  } else {
586  // L1 trigger configuration not retrieved
587  return false;
588 
589  }
590 
591  // all possibilities already tested, so it should not arrive here
592  return false;
593 
594 
595 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:374
const AlgorithmMap * m_algorithmMap
Definition: L1GtUtils.h:334
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmAliasMapLite
Definition: L1GtUtils.h:347
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmMapLite
Definition: L1GtUtils.h:346
const AlgorithmMap * m_algorithmAliasMap
Definition: L1GtUtils.h:335
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:373
L1TriggerMap::const_iterator CItL1Trig
iterators through map containing the physics algorithms or the technical triggers ...
const AlgorithmMap * m_technicalTriggerMap
Definition: L1GtUtils.h:336
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:362
const L1GtTriggerMenuLite::L1TriggerMap * m_technicalTriggerMapLite
Definition: L1GtUtils.h:348
const bool L1GtUtils::l1AlgTechTrigBitNumber ( const std::string &  nameAlgoTechTrig,
int &  triggerAlgoTechTrig,
int &  bitNumber 
) const

deprecated version - use l1AlgoTechTrigBitNumber

Definition at line 598 of file L1GtUtils.cc.

References AlgorithmTrigger, and l1AlgoTechTrigBitNumber().

600  {
601 
602  TriggerCategory trigCategory = AlgorithmTrigger;
603  bitNumber = -1;
604 
605  const bool trigCategBitNr = l1AlgoTechTrigBitNumber(nameAlgoTechTrig,
606  trigCategory, bitNumber);
607  triggerAlgoTechTrig = trigCategory;
608 
609  return trigCategBitNr;
610 
611 }
const bool l1AlgoTechTrigBitNumber(const std::string &nameAlgoTechTrig, TriggerCategory &trigCategory, int &bitNumber) const
Definition: L1GtUtils.cc:470
TriggerCategory
Definition: L1GtUtils.h:59
const int L1GtUtils::l1Results ( const edm::Event iEvent,
const edm::InputTag l1GtRecordInputTag,
const edm::InputTag l1GtReadoutRecordInputTag,
const std::string &  nameAlgoTechTrig,
bool &  decisionBeforeMask,
bool &  decisionAfterMask,
int &  prescaleFactor,
int &  triggerMask 
) const

return results for a given algorithm or technical trigger: input: event input tag for the L1GlobalTriggerRecord product input tag for the L1GlobalTriggerReadoutRecord product algorithm trigger name or alias, or technical trigger name output (by reference): decision before mask, decision after mask, prescale factor trigger mask return: integer error code

Definition at line 614 of file L1GtUtils.cc.

References AlgorithmTrigger, availableL1Configuration(), decisionBeforeMask(), edm::Event::getByLabel(), L1GtTriggerMenuLite::gtTriggerMenuImplementation(), L1GtTriggerMenu::gtTriggerMenuImplementation(), edm::HandleBase::isValid(), l1AlgoTechTrigBitNumber(), LogDebug, m_l1GtMenu, m_l1GtMenuLite, m_l1GtMenuLiteValid, m_physicsDaqPartition, m_prescaleFactorsAlgoTrig, m_prescaleFactorsAlgoTrigLite, m_prescaleFactorsTechTrig, m_prescaleFactorsTechTrigLite, m_retrieveL1GtTriggerMenuLite, m_triggerMaskAlgoTrig, m_triggerMaskAlgoTrigLite, m_triggerMaskTechTrig, m_triggerMaskTechTrigLite, TechnicalTrigger, triggerCategory(), and trigResult().

Referenced by decision(), decisionAfterMask(), decisionBeforeMask(), l1Results(), prescaleFactor(), pat::PATTriggerProducer::produce(), and triggerMask().

618  {
619 
620  // initial values for returned results
621  decisionBeforeMask = false;
622  decisionAfterMask = false;
623  prescaleFactor = -1;
624  triggerMask = -1;
625 
626  // initialize error code and L1 configuration code
627  int iError = 0;
628  int l1ConfCode = 0;
629 
630  // check if L1 configuration is available
631 
632  if (!availableL1Configuration(iError, l1ConfCode)) {
633  return iError;
634  }
635 
636  // at this point, a valid L1 configuration is available, so the if/else if/else
637  // can be simplified
638 
639  // if the given name is not an algorithm trigger alias, an algorithm trigger name
640  // or a technical trigger in the current menu, return with error code 1
641 
642  TriggerCategory trigCategory = AlgorithmTrigger;
643  int bitNumber = -1;
644 
645 
646  if (!l1AlgoTechTrigBitNumber(nameAlgoTechTrig, trigCategory, bitNumber)) {
647 
648  iError = l1ConfCode + 1;
649 
651  if (m_l1GtMenuLiteValid) {
652 
653  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n "
654  << nameAlgoTechTrig
655  << "\not found in the trigger menu \n "
657  << "\nretrieved from L1GtTriggerMenuLite" << std::endl;
658 
659  } else {
660 
661  // fall through: L1 trigger configuration from event setup
662  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n "
663  << nameAlgoTechTrig
664  << "\not found in the trigger menu \n "
666  << "\nretrieved from Event Setup" << std::endl;
667 
668  }
669 
670  } else {
671  // L1 trigger configuration from event setup only
672  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n "
673  << nameAlgoTechTrig
674  << "\not found in the trigger menu \n "
676  << "\nretrieved from Event Setup" << std::endl;
677 
678  }
679 
680  return iError;
681 
682  }
683 
684  // check here if a positive bit number was retrieved
685  // exit in case of negative bit number, before retrieving L1 GT products, saving time
686 
687  if (bitNumber < 0) {
688 
689  iError = l1ConfCode + 2;
690 
692  if (m_l1GtMenuLiteValid) {
693  LogDebug("L1GtUtils") << "\nNegative bit number for "
694  << triggerCategory(trigCategory) << "\n "
695  << nameAlgoTechTrig << "\nfrom menu \n "
697  << "\nretrieved from L1GtTriggerMenuLite" << std::endl;
698 
699  } else {
700  // fall through: L1 trigger configuration from event setup
701  LogDebug("L1GtUtils") << "\nNegative bit number for "
702  << triggerCategory(trigCategory) << "\n "
703  << nameAlgoTechTrig << "\nfrom menu \n "
705  << "\nretrieved from Event Setup" << std::endl;
706 
707  }
708 
709  } else {
710  // L1 trigger configuration from event setup only
711  LogDebug("L1GtUtils") << "\nNegative bit number for "
712  << triggerCategory(trigCategory) << "\n "
713  << nameAlgoTechTrig << "\nfrom menu \n "
715  << "\nretrieved from Event Setup" << std::endl;
716 
717  }
718 
719  return iError;
720  }
721 
722 
723  // retrieve L1GlobalTriggerRecord and 1GlobalTriggerReadoutRecord product
724  // intermediate error code for the records
725  // the module returns an error code only if both the lite and the readout record are missing
726 
727  int iErrorRecord = 0;
728 
729  bool validRecord = false;
730  bool gtRecordValid = false;
731  bool gtReadoutRecordValid = false;
732 
734  iEvent.getByLabel(l1GtRecordInputTag, gtRecord);
735 
736  if (gtRecord.isValid()) {
737 
738  gtRecordValid = true;
739  validRecord = true;
740 
741  } else {
742 
743  iErrorRecord = 10;
744  LogDebug("L1GtUtils") << "\nL1GlobalTriggerRecord with \n "
745  << l1GtRecordInputTag << "\nnot found in the event."
746  << std::endl;
747  }
748 
750  iEvent.getByLabel(l1GtReadoutRecordInputTag, gtReadoutRecord);
751 
752  if (gtReadoutRecord.isValid()) {
753 
754  gtReadoutRecordValid = true;
755  validRecord = true;
756 
757  } else {
758 
759  iErrorRecord = iErrorRecord + 100;
760  LogDebug("L1GtUtils") << "\nL1GlobalTriggerReadoutRecord with \n "
761  << l1GtReadoutRecordInputTag << "\nnot found in the event."
762  << std::endl;
763 
764  }
765 
766  // get the prescale factor index from
767  // L1GlobalTriggerReadoutRecord if valid
768  // if not, from L1GlobalTriggerRecord if valid
769  // else return an error
770 
771 
772  int pfIndexTechTrig = -1;
773  int pfIndexAlgoTrig = -1;
774 
775  if (validRecord) {
776  if (gtReadoutRecordValid) {
777 
778  pfIndexTechTrig
779  = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexTech();
780  pfIndexAlgoTrig
781  = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexAlgo();
782 
783  } else {
784 
785  pfIndexTechTrig
786  = static_cast<int> (gtRecord->gtPrescaleFactorIndexTech());
787  pfIndexAlgoTrig
788  = static_cast<int> (gtRecord->gtPrescaleFactorIndexAlgo());
789 
790  }
791 
792  } else {
793 
794  LogDebug("L1GtUtils") << "\nError: "
795  << "\nNo valid L1GlobalTriggerRecord with \n "
796  << l1GtRecordInputTag << "\nfound in the event."
797  << "\nNo valid L1GlobalTriggerReadoutRecord with \n "
798  << l1GtReadoutRecordInputTag << "\nfound in the event."
799  << std::endl;
800 
801  iError = l1ConfCode + iErrorRecord;
802  return iError;
803 
804  }
805 
806  // depending on trigger category (algorithm trigger or technical trigger)
807  // get the correct quantities
808 
809  // number of sets of prescale factors
810  // index of prescale factor set retrieved from data
811  // pointer to the actual prescale factor set
812  // pointer to the set of trigger masks
813 
814  size_t pfSetsSize = 0;
815  int pfIndex = -1;
816  const std::vector<int>* prescaleFactorsSubset = 0;
817  const std::vector<unsigned int>* triggerMasksSet = 0;
818 
819  switch (trigCategory) {
820  case AlgorithmTrigger: {
822  if (m_l1GtMenuLiteValid) {
823  pfSetsSize = m_prescaleFactorsAlgoTrigLite->size();
824  triggerMasksSet = m_triggerMaskAlgoTrigLite;
825 
826  } else {
827  // fall through: L1 trigger configuration from event setup
828  pfSetsSize = m_prescaleFactorsAlgoTrig->size();
829  triggerMasksSet = m_triggerMaskAlgoTrig;
830 
831  }
832 
833  } else {
834  // L1 trigger configuration from event setup only
835  pfSetsSize = m_prescaleFactorsAlgoTrig->size();
836  triggerMasksSet = m_triggerMaskAlgoTrig;
837 
838  }
839 
840  pfIndex = pfIndexAlgoTrig;
841 
842  }
843  break;
844  case TechnicalTrigger: {
846  if (m_l1GtMenuLiteValid) {
847  pfSetsSize = m_prescaleFactorsTechTrigLite->size();
848  triggerMasksSet = m_triggerMaskTechTrigLite;
849 
850  } else {
851  // fall through: L1 trigger configuration from event setup
852  pfSetsSize = m_prescaleFactorsTechTrig->size();
853  triggerMasksSet = m_triggerMaskTechTrig;
854 
855  }
856 
857  } else {
858  // L1 trigger configuration from event setup only
859  pfSetsSize = m_prescaleFactorsTechTrig->size();
860  triggerMasksSet = m_triggerMaskTechTrig;
861 
862  }
863 
864  pfIndex = pfIndexTechTrig;
865 
866  }
867  break;
868  default: {
869  // should not be the case
870  iError = l1ConfCode + iErrorRecord + 3;
871  return iError;
872 
873  }
874  break;
875  }
876 
877 
878  // test prescale factor set index correctness, then retrieve the actual set of prescale factors
879 
880  if (pfIndex < 0) {
881 
882  iError = l1ConfCode + iErrorRecord + 1000;
883  LogDebug("L1GtUtils")
884  << "\nError: index of prescale factor set retrieved from the data \n"
885  << "less than zero."
886  << "\n Value of index retrieved from data = " << pfIndex
887  << std::endl;
888 
889  return iError;
890 
891  } else if (pfIndex >= (static_cast<int>(pfSetsSize))) {
892  iError = l1ConfCode + iErrorRecord + 2000;
893  LogDebug("L1GtUtils")
894  << "\nError: index of prescale factor set retrieved from the data \n"
895  << "greater than the size of the vector of prescale factor sets."
896  << "\n Value of index retrieved from data = " << pfIndex
897  << "\n Vector size = " << pfSetsSize << std::endl;
898 
899  return iError;
900 
901  } else {
902  switch (trigCategory) {
903  case AlgorithmTrigger: {
905  if (m_l1GtMenuLiteValid) {
906  prescaleFactorsSubset
907  = &((*m_prescaleFactorsAlgoTrigLite).at(pfIndex));
908 
909  } else {
910  // fall through: L1 trigger configuration from event setup
911  prescaleFactorsSubset
912  = &((*m_prescaleFactorsAlgoTrig).at(pfIndex));
913 
914  }
915 
916  } else {
917  // L1 trigger configuration from event setup only
918  prescaleFactorsSubset
919  = &((*m_prescaleFactorsAlgoTrig).at(pfIndex));
920 
921  }
922 
923  }
924  break;
925  case TechnicalTrigger: {
927  if (m_l1GtMenuLiteValid) {
928  prescaleFactorsSubset
929  = &((*m_prescaleFactorsTechTrigLite).at(pfIndex));
930 
931  } else {
932  // fall through: L1 trigger configuration from event setup
933  prescaleFactorsSubset
934  = &((*m_prescaleFactorsTechTrig).at(pfIndex));
935 
936  }
937 
938  } else {
939  // L1 trigger configuration from event setup only
940  prescaleFactorsSubset
941  = &((*m_prescaleFactorsTechTrig).at(pfIndex));
942 
943  }
944 
945  }
946  break;
947  default: {
948  // do nothing - it was tested before, with return
949 
950  }
951  break;
952  }
953 
954  }
955 
956 
957  // algorithm result before applying the trigger masks
958  // the bit number is positive (tested previously)
959 
960  switch (trigCategory) {
961  case AlgorithmTrigger: {
962  if (gtReadoutRecordValid) {
963  const DecisionWord& decWord = gtReadoutRecord->decisionWord();
964  decisionBeforeMask = trigResult(decWord, bitNumber,
965  nameAlgoTechTrig, trigCategory, iError);
966  if (iError) {
967  return (iError + l1ConfCode + iErrorRecord);
968  }
969 
970  } else {
971 
972  const DecisionWord& decWord =
973  gtRecord->decisionWordBeforeMask();
974  decisionBeforeMask = trigResult(decWord, bitNumber,
975  nameAlgoTechTrig, trigCategory, iError);
976  if (iError) {
977  return (iError + l1ConfCode + iErrorRecord);
978  }
979 
980  }
981 
982  }
983  break;
984  case TechnicalTrigger: {
985  if (gtReadoutRecordValid) {
986  const DecisionWord& decWord =
987  gtReadoutRecord->technicalTriggerWord();
988  decisionBeforeMask = trigResult(decWord, bitNumber,
989  nameAlgoTechTrig, trigCategory, iError);
990  if (iError) {
991  return (iError + l1ConfCode + iErrorRecord);
992  }
993 
994  } else {
995 
996  const DecisionWord& decWord =
997  gtRecord->technicalTriggerWordBeforeMask();
998  decisionBeforeMask = trigResult(decWord, bitNumber,
999  nameAlgoTechTrig, trigCategory, iError);
1000  if (iError) {
1001  return (iError + l1ConfCode + iErrorRecord);
1002  }
1003 
1004  }
1005 
1006  }
1007  break;
1008  default: {
1009  // do nothing - it was tested before, with return
1010 
1011  }
1012  break;
1013  }
1014 
1015  // prescale factor
1016  // the bit number is positive (tested previously)
1017 
1018  if (bitNumber < (static_cast<int> (prescaleFactorsSubset->size()))) {
1019  prescaleFactor = (*prescaleFactorsSubset)[bitNumber];
1020  } else {
1021  iError = l1ConfCode + iErrorRecord + 4000;
1022  LogDebug("L1GtUtils") << "\nError: bit number " << bitNumber
1023  << " retrieved for " << triggerCategory(trigCategory) << "\n "
1024  << nameAlgoTechTrig
1025  << "\ngreater than size of actual L1 GT prescale factor set: "
1026  << prescaleFactorsSubset->size()
1027  << "\nError: Inconsistent L1 trigger configuration!"
1028  << std::endl;
1029 
1030  return iError;
1031  }
1032 
1033  // trigger mask and trigger result after applying the trigger masks
1034 
1035  if (bitNumber < (static_cast<int> ((*triggerMasksSet).size()))) {
1036 
1038  if (m_l1GtMenuLiteValid) {
1039  triggerMask = (*triggerMasksSet)[bitNumber];
1040 
1041  } else {
1042  // fall through: L1 trigger configuration from event setup
1043  // masks in event setup are for all partitions
1044  triggerMask = ((*triggerMasksSet)[bitNumber]) & (1
1046 
1047  }
1048 
1049  } else {
1050  // L1 trigger configuration from event setup only
1051  // masks in event setup are for all partitions
1052  triggerMask = ((*triggerMasksSet)[bitNumber]) & (1
1054 
1055  }
1056 
1057 
1058  } else {
1059  iError = l1ConfCode + iErrorRecord + 5000;
1060  LogDebug("L1GtUtils") << "\nError: bit number " << bitNumber
1061  << " retrieved for " << triggerCategory(trigCategory) << "\n "
1062  << nameAlgoTechTrig
1063  << "\ngreater than size of L1 GT trigger mask set: "
1064  << (*triggerMasksSet).size()
1065  << "\nError: Inconsistent L1 trigger configuration!"
1066  << std::endl;
1067 
1068  return iError;
1069 
1070  }
1071 
1073 
1074  if (triggerMask) {
1075  decisionAfterMask = false;
1076  }
1077 
1078  return iError;
1079 
1080 }
#define LogDebug(id)
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:374
const bool decisionAfterMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1147
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
Definition: L1GtUtils.h:324
const std::vector< unsigned int > * m_triggerMaskTechTrig
Definition: L1GtUtils.h:325
const bool l1AlgoTechTrigBitNumber(const std::string &nameAlgoTechTrig, TriggerCategory &trigCategory, int &bitNumber) const
Definition: L1GtUtils.cc:470
TriggerCategory
Definition: L1GtUtils.h:59
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:2235
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrigLite
Definition: L1GtUtils.h:353
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
Definition: L1GtUtils.h:309
const std::string & gtTriggerMenuImplementation() const
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
Definition: L1GtUtils.h:308
const bool decisionBeforeMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1110
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrigLite
Definition: L1GtUtils.h:354
std::vector< bool > DecisionWord
typedefs
const std::string triggerCategory(const TriggerCategory &) const
public methods
Definition: L1GtUtils.cc:86
bool isValid() const
Definition: HandleBase.h:76
unsigned int m_physicsDaqPartition
index of physics DAQ partition
Definition: L1GtUtils.h:367
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:344
const std::vector< unsigned int > * m_triggerMaskTechTrigLite
Definition: L1GtUtils.h:351
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:362
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
Definition: L1GtUtils.h:350
const int triggerMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1256
const bool trigResult(const DecisionWord &decWord, const int bitNumber, const std::string &nameAlgoTechTrig, const TriggerCategory &trigCategory, int &errorCode) const
Definition: L1GtUtils.cc:2339
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:331
const int prescaleFactor(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1221
const std::string & gtTriggerMenuImplementation() const
const int L1GtUtils::l1Results ( const edm::Event iEvent,
const std::string &  nameAlgoTechTrig,
bool &  decisionBeforeMask,
bool &  decisionAfterMask,
int &  prescaleFactor,
int &  triggerMask 
) const

return results for a given algorithm or technical trigger, input tag for the an appropriate EDM product will be found from provenance input: event algorithm trigger name or alias, or technical trigger name output (by reference): decision before mask, decision after mask, prescale factor trigger mask return: integer error code

Definition at line 1083 of file L1GtUtils.cc.

References getInputTag(), and l1Results().

1085  {
1086 
1087  edm::InputTag l1GtRecordInputTag;
1088  edm::InputTag l1GtReadoutRecordInputTag;
1089 
1090  // initial values for returned results
1091  decisionBeforeMask = false;
1092  decisionAfterMask = false;
1093  prescaleFactor = -1;
1094  triggerMask = -1;
1095 
1096  getInputTag(iEvent, l1GtRecordInputTag, l1GtReadoutRecordInputTag);
1097 
1098  int l1ErrorCode = 0;
1099 
1100  l1ErrorCode = l1Results(iEvent, l1GtRecordInputTag,
1101  l1GtReadoutRecordInputTag, nameAlgoTechTrig, decisionBeforeMask,
1103 
1104  return l1ErrorCode;
1105 
1106 }
const bool decisionAfterMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1147
const int l1Results(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:614
void getInputTag(const edm::Event &iEvent, edm::InputTag &l1GtRecordInputTag, edm::InputTag &l1GtReadoutRecordInputTag) const
get the input tags for L1GlobalTriggerRecord and L1GlobalTriggerReadoutRecord
Definition: L1GtUtils.cc:339
const bool decisionBeforeMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1110
const int triggerMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1256
const int prescaleFactor(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1221
const std::string & L1GtUtils::l1TriggerMenu ( ) const

return the L1 trigger menu name

Definition at line 2120 of file L1GtUtils.cc.

References EmptyString, L1GtTriggerMenuLite::gtTriggerMenuName(), L1GtTriggerMenu::gtTriggerMenuName(), m_l1GtMenu, m_l1GtMenuLite, m_l1GtMenuLiteValid, m_retrieveL1EventSetup, and m_retrieveL1GtTriggerMenuLite.

Referenced by L1GtAnalyzer::analyzeL1GtUtilsCore().

2120  {
2121 
2123  if (m_l1GtMenuLiteValid) {
2125 
2126  } else if (m_retrieveL1EventSetup) {
2127  return m_l1GtMenu->gtTriggerMenuName();
2128 
2129  } else {
2130  // only L1GtTriggerMenuLite requested, but it is not valid
2131  return EmptyString;
2132 
2133  }
2134  } else if (m_retrieveL1EventSetup) {
2135  return m_l1GtMenu->gtTriggerMenuName();
2136 
2137  } else {
2138  // L1 trigger configuration not retrieved
2139  return EmptyString;
2140 
2141  }
2142 
2143 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:374
const std::string & gtTriggerMenuName() const
const std::string & gtTriggerMenuName() const
static const std::string EmptyString
Definition: L1GtUtils.h:277
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:373
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:344
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:362
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:331
const std::string & L1GtUtils::l1TriggerMenuImplementation ( ) const

return the L1 trigger menu implementation

Definition at line 2145 of file L1GtUtils.cc.

References EmptyString, L1GtTriggerMenuLite::gtTriggerMenuImplementation(), L1GtTriggerMenu::gtTriggerMenuImplementation(), m_l1GtMenu, m_l1GtMenuLite, m_l1GtMenuLiteValid, m_retrieveL1EventSetup, and m_retrieveL1GtTriggerMenuLite.

Referenced by L1GtAnalyzer::analyzeL1GtUtilsCore().

2145  {
2146 
2148  if (m_l1GtMenuLiteValid) {
2150 
2151  } else if (m_retrieveL1EventSetup) {
2153 
2154  } else {
2155  // only L1GtTriggerMenuLite requested, but it is not valid
2156  return EmptyString;
2157 
2158  }
2159  } else if (m_retrieveL1EventSetup) {
2161 
2162  } else {
2163  // L1 trigger configuration not retrieved
2164  return EmptyString;
2165 
2166  }
2167 
2168 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:374
const std::string & gtTriggerMenuImplementation() const
static const std::string EmptyString
Definition: L1GtUtils.h:277
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:373
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:344
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:362
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:331
const std::string & gtTriggerMenuImplementation() const
const int L1GtUtils::prescaleFactor ( const edm::Event iEvent,
const edm::InputTag l1GtRecordInputTag,
const edm::InputTag l1GtReadoutRecordInputTag,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

return prescale factor for a given algorithm or technical trigger

Definition at line 1221 of file L1GtUtils.cc.

References decisionAfterMask(), decisionBeforeMask(), l1Results(), and triggerMask().

Referenced by HLTInfo::analyze(), L1GtAnalyzer::analyzeL1GtUtilsCore(), decision(), decisionAfterMask(), decisionBeforeMask(), prescaleFactor(), PrescaleWeightProvider::prescaleWeight(), and triggerMask().

1224  {
1225 
1226  // initial values
1227  bool decisionBeforeMask = false;
1228  bool decisionAfterMask = false;
1229  int prescaleFactor = -1;
1230  int triggerMask = -1;
1231 
1232  errorCode = l1Results(iEvent, l1GtRecordInputTag,
1233  l1GtReadoutRecordInputTag, nameAlgoTechTrig, decisionBeforeMask,
1234  decisionAfterMask, prescaleFactor, triggerMask);
1235 
1236  return prescaleFactor;
1237 
1238 }
const bool decisionAfterMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1147
const int l1Results(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:614
const bool decisionBeforeMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1110
const int triggerMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1256
const int prescaleFactor(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1221
const int L1GtUtils::prescaleFactor ( const edm::Event iEvent,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

Definition at line 1240 of file L1GtUtils.cc.

References decisionAfterMask(), decisionBeforeMask(), l1Results(), prescaleFactor(), and triggerMask().

1241  {
1242 
1243  // initial values
1244  bool decisionBeforeMask = false;
1245  bool decisionAfterMask = false;
1246  int prescaleFactor = -1;
1247  int triggerMask = -1;
1248 
1249  errorCode = l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1250  decisionAfterMask, prescaleFactor, triggerMask);
1251 
1252  return prescaleFactor;
1253 
1254 }
const bool decisionAfterMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1147
const int l1Results(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:614
const bool decisionBeforeMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1110
const int triggerMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1256
const int prescaleFactor(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1221
const std::vector< int > & L1GtUtils::prescaleFactorSet ( const edm::Event iEvent,
const edm::InputTag l1GtRecordInputTag,
const edm::InputTag l1GtReadoutRecordInputTag,
const TriggerCategory trigCategory,
int &  errorCode 
)

return the actual set of prescale factors used for the event (must be the same for all events in the luminosity block, if no errors)

Definition at line 1800 of file L1GtUtils.cc.

References AlgorithmTrigger, m_l1GtMenuLiteValid, m_prescaleFactorSet, m_retrieveL1GtTriggerMenuLite, prescaleFactorSetIndex(), and TechnicalTrigger.

Referenced by L1GtAnalyzer::analyzeL1GtUtilsCore(), and prescaleFactorSet().

1803  {
1804 
1805  // clear the vector before filling it
1806  m_prescaleFactorSet.clear();
1807 
1808  // initialize error code
1809  int iError = 0;
1810 
1811  const int pfIndex = prescaleFactorSetIndex(iEvent, l1GtRecordInputTag,
1812  l1GtReadoutRecordInputTag, trigCategory, iError);
1813 
1814  if (iError == 0) {
1815 
1816  switch (trigCategory) {
1817  case AlgorithmTrigger: {
1819  if (m_l1GtMenuLiteValid) {
1821  = (*m_prescaleFactorsAlgoTrigLite).at(pfIndex);
1822 
1823  } else {
1824  // fall through: L1 trigger configuration from event setup
1825  m_prescaleFactorSet = (*m_prescaleFactorsAlgoTrig).at(
1826  pfIndex);
1827 
1828  }
1829 
1830  } else {
1831  // L1 trigger configuration from event setup only
1832  m_prescaleFactorSet = (*m_prescaleFactorsAlgoTrig).at(
1833  pfIndex);
1834 
1835  }
1836 
1837  }
1838  break;
1839  case TechnicalTrigger: {
1841  if (m_l1GtMenuLiteValid) {
1843  = (*m_prescaleFactorsTechTrigLite).at(pfIndex);
1844 
1845  } else {
1846  // fall through: L1 trigger configuration from event setup
1847  m_prescaleFactorSet = (*m_prescaleFactorsTechTrig).at(
1848  pfIndex);
1849 
1850  }
1851 
1852  } else {
1853  // L1 trigger configuration from event setup only
1854  m_prescaleFactorSet = (*m_prescaleFactorsTechTrig).at(
1855  pfIndex);
1856 
1857  }
1858 
1859  }
1860  break;
1861  default: {
1862  // do nothing - it was tested before, with return
1863 
1864  }
1865  break;
1866  }
1867 
1868  }
1869 
1870  errorCode = iError;
1871  return m_prescaleFactorSet;
1872 
1873 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:374
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:362
const int prescaleFactorSetIndex(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const TriggerCategory &trigCategory, int &errorCode) const
Definition: L1GtUtils.cc:1496
std::vector< int > m_prescaleFactorSet
Definition: L1GtUtils.h:370
const std::vector< int > & L1GtUtils::prescaleFactorSet ( const edm::Event iEvent,
const TriggerCategory trigCategory,
int &  errorCode 
)

Definition at line 1875 of file L1GtUtils.cc.

References getInputTag(), m_prescaleFactorSet, and prescaleFactorSet().

1876  {
1877 
1878  // clear the vector before filling it
1879  m_prescaleFactorSet.clear();
1880 
1881  // initialize error code
1882  int iError = 0;
1883 
1884  edm::InputTag l1GtRecordInputTag;
1885  edm::InputTag l1GtReadoutRecordInputTag;
1886 
1887  getInputTag(iEvent, l1GtRecordInputTag, l1GtReadoutRecordInputTag);
1888 
1889  m_prescaleFactorSet = prescaleFactorSet(iEvent, l1GtRecordInputTag,
1890  l1GtReadoutRecordInputTag, trigCategory, iError);
1891 
1892  errorCode = iError;
1893  return m_prescaleFactorSet;
1894 
1895 }
void getInputTag(const edm::Event &iEvent, edm::InputTag &l1GtRecordInputTag, edm::InputTag &l1GtReadoutRecordInputTag) const
get the input tags for L1GlobalTriggerRecord and L1GlobalTriggerReadoutRecord
Definition: L1GtUtils.cc:339
const std::vector< int > & prescaleFactorSet(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const TriggerCategory &trigCategory, int &errorCode)
Definition: L1GtUtils.cc:1800
std::vector< int > m_prescaleFactorSet
Definition: L1GtUtils.h:370
const std::vector< int > & L1GtUtils::prescaleFactorSet ( const edm::Event iEvent,
const edm::InputTag l1GtRecordInputTag,
const edm::InputTag l1GtReadoutRecordInputTag,
const std::string &  triggerAlgoTechTrig,
int &  errorCode 
)

deprecated versions

Definition at line 1899 of file L1GtUtils.cc.

References AlgorithmTrigger, availableL1Configuration(), LogDebug, m_prescaleFactorSet, prescaleFactorSet(), and TechnicalTrigger.

1902  {
1903 
1904  // clear the vector before filling it
1905  m_prescaleFactorSet.clear();
1906 
1907  // initialize error code and return value
1908  int iError = 0;
1909  int l1ConfCode = 0;
1910 
1911  // check if L1 configuration is available
1912 
1913  if (!availableL1Configuration(iError, l1ConfCode)) {
1914  errorCode = iError;
1915  return m_prescaleFactorSet;
1916  }
1917 
1918  // test if the argument for the "trigger algorithm type" is correct
1919  TriggerCategory trigCategory = AlgorithmTrigger;
1920 
1921  if (triggerAlgoTechTrig == "TechnicalTriggers") {
1922  trigCategory = TechnicalTrigger;
1923 
1924  } else if (triggerAlgoTechTrig == "PhysicsAlgorithms") {
1925  trigCategory = AlgorithmTrigger;
1926 
1927  } else {
1928 
1929  LogDebug("L1GtUtils")
1930  << "\nErrr : prescale factor set cannot be retrieved for the argument "
1931  << triggerAlgoTechTrig
1932  << "\n Supported arguments: 'PhysicsAlgorithms' or 'TechnicalTriggers'"
1933  << "\nWarning: this method is deprecated, please use method with TriggerCategory."
1934  << std::endl;
1935 
1936  iError = l1ConfCode + 6000;
1937 
1938  errorCode = iError;
1939  return m_prescaleFactorSet;
1940 
1941  }
1942 
1943  m_prescaleFactorSet = prescaleFactorSet(iEvent, l1GtRecordInputTag,
1944  l1GtReadoutRecordInputTag, trigCategory, iError);
1945 
1946  errorCode = iError;
1947  return m_prescaleFactorSet;
1948 }
#define LogDebug(id)
TriggerCategory
Definition: L1GtUtils.h:59
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:2235
const std::vector< int > & prescaleFactorSet(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const TriggerCategory &trigCategory, int &errorCode)
Definition: L1GtUtils.cc:1800
std::vector< int > m_prescaleFactorSet
Definition: L1GtUtils.h:370
const std::vector< int > & L1GtUtils::prescaleFactorSet ( const edm::Event iEvent,
const std::string &  triggerAlgoTechTrig,
int &  errorCode 
)

Definition at line 1952 of file L1GtUtils.cc.

References getInputTag(), m_prescaleFactorSet, and prescaleFactorSet().

1953  {
1954 
1955  // initialize error code
1956  int iError = 0;
1957 
1958  edm::InputTag l1GtRecordInputTag;
1959  edm::InputTag l1GtReadoutRecordInputTag;
1960 
1961  getInputTag(iEvent, l1GtRecordInputTag, l1GtReadoutRecordInputTag);
1962 
1963  m_prescaleFactorSet = prescaleFactorSet(iEvent, l1GtRecordInputTag,
1964  l1GtReadoutRecordInputTag, triggerAlgoTechTrig, iError);
1965 
1966  errorCode = iError;
1967  return m_prescaleFactorSet;
1968 
1969 }
void getInputTag(const edm::Event &iEvent, edm::InputTag &l1GtRecordInputTag, edm::InputTag &l1GtReadoutRecordInputTag) const
get the input tags for L1GlobalTriggerRecord and L1GlobalTriggerReadoutRecord
Definition: L1GtUtils.cc:339
const std::vector< int > & prescaleFactorSet(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const TriggerCategory &trigCategory, int &errorCode)
Definition: L1GtUtils.cc:1800
std::vector< int > m_prescaleFactorSet
Definition: L1GtUtils.h:370
const int L1GtUtils::prescaleFactorSetIndex ( const edm::Event iEvent,
const edm::InputTag l1GtRecordInputTag,
const edm::InputTag l1GtReadoutRecordInputTag,
const TriggerCategory trigCategory,
int &  errorCode 
) const

return the index of the actual set of prescale factors used for the event (must be the same for all events in the luminosity block, if no errors)

Definition at line 1496 of file L1GtUtils.cc.

References AlgorithmTrigger, availableL1Configuration(), edm::Event::getByLabel(), edm::HandleBase::isValid(), LogDebug, m_l1GtMenuLiteValid, m_prescaleFactorsAlgoTrig, m_prescaleFactorsAlgoTrigLite, m_prescaleFactorsTechTrig, m_prescaleFactorsTechTrigLite, m_retrieveL1GtTriggerMenuLite, and TechnicalTrigger.

Referenced by HLTInfo::analyze(), L1GtAnalyzer::analyzeL1GtUtilsCore(), prescaleFactorSet(), and prescaleFactorSetIndex().

1499  {
1500 
1501  // initialize the index to a negative value
1502  int pfIndex = -1;
1503 
1504  // initialize error code and L1 configuration code
1505  int iError = 0;
1506  int l1ConfCode = 0;
1507 
1508  // check if L1 configuration is available
1509 
1510  if (!availableL1Configuration(iError, l1ConfCode)) {
1511  errorCode = iError;
1512  return pfIndex;
1513  }
1514 
1515  // at this point, a valid L1 configuration is available, so the if/else if/else
1516  // can be simplified
1517 
1518  // retrieve L1GlobalTriggerRecord and 1GlobalTriggerReadoutRecord product
1519  // intermediate error code for the records
1520  // the module returns an error code only if both the lite and the readout record are missing
1521 
1522  int iErrorRecord = 0;
1523 
1524  bool validRecord = false;
1525  bool gtRecordValid = false;
1526  bool gtReadoutRecordValid = false;
1527 
1529  iEvent.getByLabel(l1GtRecordInputTag, gtRecord);
1530 
1531  if (gtRecord.isValid()) {
1532 
1533  gtRecordValid = true;
1534  validRecord = true;
1535 
1536  } else {
1537 
1538  iErrorRecord = 10;
1539  LogDebug("L1GtUtils") << "\nL1GlobalTriggerRecord with \n "
1540  << l1GtRecordInputTag << "\nnot found in the event."
1541  << std::endl;
1542  }
1543 
1545  iEvent.getByLabel(l1GtReadoutRecordInputTag, gtReadoutRecord);
1546 
1547  if (gtReadoutRecord.isValid()) {
1548 
1549  gtReadoutRecordValid = true;
1550  validRecord = true;
1551 
1552  } else {
1553 
1554  iErrorRecord = iErrorRecord + 100;
1555  LogDebug("L1GtUtils") << "\nL1GlobalTriggerReadoutRecord with \n "
1556  << l1GtReadoutRecordInputTag << "\nnot found in the event."
1557  << std::endl;
1558 
1559  }
1560 
1561  // get the prescale factor index from
1562  // L1GlobalTriggerReadoutRecord if valid
1563  // if not, from L1GlobalTriggerRecord if valid
1564  // else return an error
1565 
1566 
1567  int pfIndexTechTrig = -1;
1568  int pfIndexAlgoTrig = -1;
1569 
1570  if (validRecord) {
1571  if (gtReadoutRecordValid) {
1572 
1573  pfIndexTechTrig
1574  = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexTech();
1575  pfIndexAlgoTrig
1576  = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexAlgo();
1577 
1578  } else {
1579 
1580  pfIndexTechTrig
1581  = static_cast<int> (gtRecord->gtPrescaleFactorIndexTech());
1582  pfIndexAlgoTrig
1583  = static_cast<int> (gtRecord->gtPrescaleFactorIndexAlgo());
1584 
1585  }
1586 
1587  } else {
1588 
1589  LogDebug("L1GtUtils") << "\nError: "
1590  << "\nNo valid L1GlobalTriggerRecord with \n "
1591  << l1GtRecordInputTag << "\nfound in the event."
1592  << "\nNo valid L1GlobalTriggerReadoutRecord with \n "
1593  << l1GtReadoutRecordInputTag << "\nfound in the event."
1594  << std::endl;
1595 
1596  iError = l1ConfCode + iErrorRecord;
1597 
1598  errorCode = iError;
1599  return pfIndex;
1600 
1601  }
1602 
1603  // depending on trigger category (algorithm trigger or technical trigger)
1604  // get the correct quantities
1605 
1606  // number of sets of prescale factors
1607  // index of prescale factor set retrieved from data
1608  // pointer to the actual prescale factor set
1609  // pointer to the set of trigger masks
1610 
1611  size_t pfSetsSize = 0;
1612 
1613  switch (trigCategory) {
1614  case AlgorithmTrigger: {
1616  if (m_l1GtMenuLiteValid) {
1617  pfSetsSize = m_prescaleFactorsAlgoTrigLite->size();
1618 
1619  } else {
1620  // fall through: L1 trigger configuration from event setup
1621  pfSetsSize = m_prescaleFactorsAlgoTrig->size();
1622 
1623  }
1624 
1625  } else {
1626  // L1 trigger configuration from event setup only
1627  pfSetsSize = m_prescaleFactorsAlgoTrig->size();
1628 
1629  }
1630 
1631  pfIndex = pfIndexAlgoTrig;
1632 
1633  }
1634  break;
1635  case TechnicalTrigger: {
1637  if (m_l1GtMenuLiteValid) {
1638  pfSetsSize = m_prescaleFactorsTechTrigLite->size();
1639 
1640  } else {
1641  // fall through: L1 trigger configuration from event setup
1642  pfSetsSize = m_prescaleFactorsTechTrig->size();
1643 
1644  }
1645 
1646  } else {
1647  // L1 trigger configuration from event setup only
1648  pfSetsSize = m_prescaleFactorsTechTrig->size();
1649 
1650  }
1651 
1652  pfIndex = pfIndexTechTrig;
1653 
1654  }
1655  break;
1656  default: {
1657  // should not be the case
1658  iError = l1ConfCode + iErrorRecord + 3;
1659  return iError;
1660 
1661  }
1662  break;
1663  }
1664 
1665 
1666  // test prescale factor set index correctness, then retrieve the actual set of prescale factors
1667 
1668  if (pfIndex < 0) {
1669 
1670  iError = l1ConfCode + iErrorRecord + 1000;
1671  LogDebug("L1GtUtils")
1672  << "\nError: index of prescale factor set retrieved from the data \n"
1673  << "less than zero."
1674  << "\n Value of index retrieved from data = " << pfIndex
1675  << std::endl;
1676 
1677  errorCode = iError;
1678  return pfIndex;
1679 
1680  } else if (pfIndex >= (static_cast<int>(pfSetsSize))) {
1681  iError = l1ConfCode + iErrorRecord + 2000;
1682  LogDebug("L1GtUtils")
1683  << "\nError: index of prescale factor set retrieved from the data \n"
1684  << "greater than the size of the vector of prescale factor sets."
1685  << "\n Value of index retrieved from data = " << pfIndex
1686  << "\n Vector size = " << pfSetsSize << std::endl;
1687 
1688  errorCode = iError;
1689  return pfIndex;
1690 
1691  } else {
1692 
1693  errorCode = iError;
1694  return pfIndex;
1695  }
1696 
1697  errorCode = iError;
1698  return pfIndex;
1699 
1700 }
#define LogDebug(id)
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:374
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:2235
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrigLite
Definition: L1GtUtils.h:353
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
Definition: L1GtUtils.h:309
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
Definition: L1GtUtils.h:308
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrigLite
Definition: L1GtUtils.h:354
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:362
const int L1GtUtils::prescaleFactorSetIndex ( const edm::Event iEvent,
const TriggerCategory trigCategory,
int &  errorCode 
) const

Definition at line 1703 of file L1GtUtils.cc.

References getInputTag(), and prescaleFactorSetIndex().

1704  {
1705 
1706  // initialize error code and return value
1707  int iError = 0;
1708  int pfIndex = -1;
1709 
1710  edm::InputTag l1GtRecordInputTag;
1711  edm::InputTag l1GtReadoutRecordInputTag;
1712 
1713  getInputTag(iEvent, l1GtRecordInputTag, l1GtReadoutRecordInputTag);
1714 
1715  pfIndex = prescaleFactorSetIndex(iEvent, l1GtRecordInputTag,
1716  l1GtReadoutRecordInputTag, trigCategory, iError);
1717 
1718  // return the error code and the index value
1719  // if the error code is 0, the index returned is -1
1720  errorCode = iError;
1721  return pfIndex;
1722 
1723 }
void getInputTag(const edm::Event &iEvent, edm::InputTag &l1GtRecordInputTag, edm::InputTag &l1GtReadoutRecordInputTag) const
get the input tags for L1GlobalTriggerRecord and L1GlobalTriggerReadoutRecord
Definition: L1GtUtils.cc:339
const int prescaleFactorSetIndex(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const TriggerCategory &trigCategory, int &errorCode) const
Definition: L1GtUtils.cc:1496
const int L1GtUtils::prescaleFactorSetIndex ( const edm::Event iEvent,
const edm::InputTag l1GtRecordInputTag,
const edm::InputTag l1GtReadoutRecordInputTag,
const std::string &  triggerAlgoTechTrig,
int &  errorCode 
) const

deprecated versions

Definition at line 1727 of file L1GtUtils.cc.

References AlgorithmTrigger, availableL1Configuration(), LogDebug, prescaleFactorSetIndex(), and TechnicalTrigger.

1730  {
1731 
1732  // initialize error code and return value
1733  int iError = 0;
1734  int l1ConfCode = 0;
1735  int pfIndex = -1;
1736 
1737  // check if L1 configuration is available
1738 
1739  if (!availableL1Configuration(iError, l1ConfCode)) {
1740  errorCode = iError;
1741  return pfIndex;
1742  }
1743 
1744  // test if the argument for the "trigger algorithm type" is correct
1745  TriggerCategory trigCategory = AlgorithmTrigger;
1746 
1747  if (triggerAlgoTechTrig == "TechnicalTriggers") {
1748  trigCategory = TechnicalTrigger;
1749 
1750  } else if (triggerAlgoTechTrig == "PhysicsAlgorithms") {
1751  trigCategory = AlgorithmTrigger;
1752 
1753  } else {
1754 
1755  LogDebug("L1GtUtils")
1756  << "\nErrr : prescale factor set index cannot be retrieved for the argument "
1757  << triggerAlgoTechTrig
1758  << "\n Supported arguments: 'PhysicsAlgorithms' or 'TechnicalTriggers'"
1759  << "\nWarning: this method is deprecated, please use method with TriggerCategory."
1760  << std::endl;
1761 
1762  iError = l1ConfCode + 6000;
1763 
1764  errorCode = iError;
1765  return pfIndex;
1766 
1767  }
1768 
1769  pfIndex = prescaleFactorSetIndex(iEvent, l1GtRecordInputTag,
1770  l1GtReadoutRecordInputTag, trigCategory, errorCode);
1771 
1772  errorCode = iError;
1773  return pfIndex;
1774 
1775 }
#define LogDebug(id)
TriggerCategory
Definition: L1GtUtils.h:59
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:2235
const int prescaleFactorSetIndex(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const TriggerCategory &trigCategory, int &errorCode) const
Definition: L1GtUtils.cc:1496
const int L1GtUtils::prescaleFactorSetIndex ( const edm::Event iEvent,
const std::string &  triggerAlgoTechTrig,
int &  errorCode 
) const

Definition at line 1778 of file L1GtUtils.cc.

References getInputTag(), and prescaleFactorSetIndex().

1779  {
1780 
1781  // initialize error code and return value
1782  int iError = 0;
1783  int pfIndex = -1;
1784 
1785  edm::InputTag l1GtRecordInputTag;
1786  edm::InputTag l1GtReadoutRecordInputTag;
1787 
1788  getInputTag(iEvent, l1GtRecordInputTag, l1GtReadoutRecordInputTag);
1789 
1790  pfIndex = prescaleFactorSetIndex(iEvent, l1GtRecordInputTag,
1791  l1GtReadoutRecordInputTag, triggerAlgoTechTrig, iError);
1792 
1793  // return the error code and the index value
1794  // if the error code is not 0, the index returned is -1
1795  errorCode = iError;
1796  return pfIndex;
1797 
1798 }
void getInputTag(const edm::Event &iEvent, edm::InputTag &l1GtRecordInputTag, edm::InputTag &l1GtReadoutRecordInputTag) const
get the input tags for L1GlobalTriggerRecord and L1GlobalTriggerReadoutRecord
Definition: L1GtUtils.cc:339
const int prescaleFactorSetIndex(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const TriggerCategory &trigCategory, int &errorCode) const
Definition: L1GtUtils.cc:1496
const L1GtTriggerMenuLite * L1GtUtils::ptrL1GtTriggerMenuLite ( int &  errorCode)

return a pointer to the L1GtTriggerMenuLite product

Definition at line 2198 of file L1GtUtils.cc.

References availableL1Configuration(), m_l1GtMenuLite, m_l1GtMenuLiteValid, and m_retrieveL1GtTriggerMenuLite.

2198  {
2199 
2200  // initialize error code and return value
2201  int iError = 0;
2202  int l1ConfCode = 0;
2203 
2204  // check if L1 configuration is available
2205 
2206  if (!availableL1Configuration(iError, l1ConfCode)) {
2207  errorCode = iError;
2208  return 0;
2209  }
2210 
2212  if (m_l1GtMenuLiteValid) {
2213 
2214  errorCode = iError;
2215  return m_l1GtMenuLite;
2216 
2217  } else {
2218  iError = l1ConfCode;
2219 
2220  errorCode = iError;
2221  return 0;
2222  }
2223  } else {
2224  iError = l1ConfCode;
2225 
2226  errorCode = iError;
2227  return 0;
2228  }
2229 
2230  errorCode = iError;
2231  return m_l1GtMenuLite;
2232 
2233 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:374
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:2235
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:344
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:362
const L1GtTriggerMenu * L1GtUtils::ptrL1TriggerMenuEventSetup ( int &  errorCode)

return a pointer to the L1 trigger menu from event setup

Definition at line 2170 of file L1GtUtils.cc.

References availableL1Configuration(), m_l1GtMenu, and m_retrieveL1EventSetup.

2170  {
2171 
2172  // initialize error code and return value
2173  int iError = 0;
2174  int l1ConfCode = 0;
2175 
2176  // check if L1 configuration is available
2177 
2178  if (!availableL1Configuration(iError, l1ConfCode)) {
2179  errorCode = iError;
2180  return 0;
2181  }
2182 
2183  if (m_retrieveL1EventSetup) {
2184  errorCode = iError;
2185  return m_l1GtMenu;
2186  } else {
2187  iError = l1ConfCode;
2188 
2189  errorCode = iError;
2190  return 0;
2191 
2192  }
2193 
2194  errorCode = iError;
2195  return m_l1GtMenu;
2196 }
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:2235
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:373
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:331
void L1GtUtils::retrieveL1EventSetup ( const edm::EventSetup evSetup)

retrieve all the relevant L1 trigger event setup records and cache them to improve the speed

Definition at line 107 of file L1GtUtils.cc.

References edm::EventSetup::get(), L1GtTriggerMenu::gtAlgorithmAliasMap(), L1GtTriggerMenu::gtAlgorithmMap(), L1GtStableParameters::gtNumberPhysTriggers(), L1GtStableParameters::gtNumberTechnicalTriggers(), L1GtPrescaleFactors::gtPrescaleFactors(), L1GtTriggerMenu::gtTechnicalTriggerMap(), L1GtTriggerMask::gtTriggerMask(), m_algorithmAliasMap, m_algorithmMap, m_l1EventSetupValid, m_l1GtMenu, m_l1GtMenuCacheID, m_l1GtPfAlgo, m_l1GtPfAlgoCacheID, m_l1GtPfTech, m_l1GtPfTechCacheID, m_l1GtStablePar, m_l1GtStableParCacheID, m_l1GtTmAlgo, m_l1GtTmAlgoCacheID, m_l1GtTmTech, m_l1GtTmTechCacheID, m_l1GtTmVetoAlgo, m_l1GtTmVetoAlgoCacheID, m_l1GtTmVetoTech, m_l1GtTmVetoTechCacheID, m_numberAlgorithmTriggers, m_numberTechnicalTriggers, m_prescaleFactorsAlgoTrig, m_prescaleFactorSet, m_prescaleFactorsTechTrig, m_retrieveL1EventSetup, m_technicalTriggerMap, m_triggerMaskAlgoTrig, m_triggerMaskSet, m_triggerMaskTechTrig, m_triggerMaskVetoAlgoTrig, m_triggerMaskVetoTechTrig, max(), and edm::ESHandle< class >::product().

Referenced by TriggerHelper::acceptL1(), GenericTriggerEventFlag::acceptL1(), HLTInfo::analyze(), L1GtAnalyzer::analyzeL1GtUtils(), L1GtAnalyzer::analyzeL1GtUtilsEventSetup(), PrescaleWeightProvider::prescaleWeight(), and pat::PATTriggerProducer::produce().

107  {
108 
109  //
110  m_retrieveL1EventSetup = true;
111 
112  m_l1EventSetupValid = true;
113  // FIXME test for each record if valid; if not set m_l1EventSetupValid = false;
114 
115  // get / update the stable parameters from the EventSetup
116  // local cache & check on cacheIdentifier
117 
118  unsigned long long l1GtStableParCacheID =
119  evSetup.get<L1GtStableParametersRcd>().cacheIdentifier();
120 
121  if (m_l1GtStableParCacheID != l1GtStableParCacheID) {
122 
124  evSetup.get<L1GtStableParametersRcd>().get(l1GtStablePar);
125  m_l1GtStablePar = l1GtStablePar.product();
126 
127  // number of algorithm triggers
129 
130  // number of technical triggers
133 
134  int maxNumberTrigger = std::max(m_numberAlgorithmTriggers,
136 
137  m_triggerMaskSet.reserve(maxNumberTrigger);
138  m_prescaleFactorSet.reserve(maxNumberTrigger);
139 
140  //
141  m_l1GtStableParCacheID = l1GtStableParCacheID;
142 
143  }
144 
145  // get / update the prescale factors from the EventSetup
146  // local cache & check on cacheIdentifier
147 
148  unsigned long long l1GtPfAlgoCacheID =
149  evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().cacheIdentifier();
150 
151  if (m_l1GtPfAlgoCacheID != l1GtPfAlgoCacheID) {
152 
154  evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().get(l1GtPfAlgo);
155  m_l1GtPfAlgo = l1GtPfAlgo.product();
156 
158 
159  m_l1GtPfAlgoCacheID = l1GtPfAlgoCacheID;
160 
161  }
162 
163  unsigned long long l1GtPfTechCacheID = evSetup.get<
164  L1GtPrescaleFactorsTechTrigRcd>().cacheIdentifier();
165 
166  if (m_l1GtPfTechCacheID != l1GtPfTechCacheID) {
167 
169  evSetup.get<L1GtPrescaleFactorsTechTrigRcd>().get(l1GtPfTech);
170  m_l1GtPfTech = l1GtPfTech.product();
171 
173 
174  m_l1GtPfTechCacheID = l1GtPfTechCacheID;
175 
176  }
177 
178  // get / update the trigger mask from the EventSetup
179  // local cache & check on cacheIdentifier
180 
181  unsigned long long l1GtTmAlgoCacheID =
182  evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().cacheIdentifier();
183 
184  if (m_l1GtTmAlgoCacheID != l1GtTmAlgoCacheID) {
185 
187  evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().get(l1GtTmAlgo);
188  m_l1GtTmAlgo = l1GtTmAlgo.product();
189 
191 
192  m_l1GtTmAlgoCacheID = l1GtTmAlgoCacheID;
193 
194  }
195 
196  unsigned long long l1GtTmTechCacheID =
197  evSetup.get<L1GtTriggerMaskTechTrigRcd>().cacheIdentifier();
198 
199  if (m_l1GtTmTechCacheID != l1GtTmTechCacheID) {
200 
202  evSetup.get<L1GtTriggerMaskTechTrigRcd>().get(l1GtTmTech);
203  m_l1GtTmTech = l1GtTmTech.product();
204 
206 
207  m_l1GtTmTechCacheID = l1GtTmTechCacheID;
208 
209  }
210 
211  unsigned long long l1GtTmVetoAlgoCacheID =
212  evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd>().cacheIdentifier();
213 
214  if (m_l1GtTmVetoAlgoCacheID != l1GtTmVetoAlgoCacheID) {
215 
216  edm::ESHandle<L1GtTriggerMask> l1GtTmVetoAlgo;
217  evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd>().get(l1GtTmVetoAlgo);
218  m_l1GtTmVetoAlgo = l1GtTmVetoAlgo.product();
219 
221 
222  m_l1GtTmVetoAlgoCacheID = l1GtTmVetoAlgoCacheID;
223 
224  }
225 
226  unsigned long long l1GtTmVetoTechCacheID =
227  evSetup.get<L1GtTriggerMaskVetoTechTrigRcd>().cacheIdentifier();
228 
229  if (m_l1GtTmVetoTechCacheID != l1GtTmVetoTechCacheID) {
230 
231  edm::ESHandle<L1GtTriggerMask> l1GtTmVetoTech;
232  evSetup.get<L1GtTriggerMaskVetoTechTrigRcd>().get(l1GtTmVetoTech);
233  m_l1GtTmVetoTech = l1GtTmVetoTech.product();
234 
236 
237  m_l1GtTmVetoTechCacheID = l1GtTmVetoTechCacheID;
238 
239  }
240 
241  // get / update the trigger menu from the EventSetup
242  // local cache & check on cacheIdentifier
243 
244  unsigned long long l1GtMenuCacheID =
245  evSetup.get<L1GtTriggerMenuRcd>().cacheIdentifier();
246 
247  if (m_l1GtMenuCacheID != l1GtMenuCacheID) {
248 
250  evSetup.get<L1GtTriggerMenuRcd>().get(l1GtMenu);
251  m_l1GtMenu = l1GtMenu.product();
252 
255 
257 
258  m_l1GtMenuCacheID = l1GtMenuCacheID;
259 
260  }
261 
262 }
std::vector< unsigned int > m_triggerMaskSet
Definition: L1GtUtils.h:369
unsigned long long m_l1GtMenuCacheID
Definition: L1GtUtils.h:332
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
Definition: L1GtUtils.h:324
const std::vector< unsigned int > * m_triggerMaskTechTrig
Definition: L1GtUtils.h:325
const L1GtTriggerMask * m_l1GtTmVetoTech
Definition: L1GtUtils.h:321
const L1GtTriggerMask * m_l1GtTmAlgo
trigger masks &amp; veto masks
Definition: L1GtUtils.h:312
const AlgorithmMap * m_algorithmMap
Definition: L1GtUtils.h:334
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
Definition: L1GtUtils.h:309
const L1GtStableParameters * m_l1GtStablePar
event setup cached stuff
Definition: L1GtUtils.h:292
unsigned long long m_l1GtPfAlgoCacheID
Definition: L1GtUtils.h:303
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
Definition: L1GtUtils.h:308
unsigned int gtNumberTechnicalTriggers() const
get / set the number of technical triggers
unsigned long long m_l1GtTmVetoTechCacheID
Definition: L1GtUtils.h:322
unsigned int gtNumberPhysTriggers() const
get / set the number of physics trigger algorithms
const AlgorithmMap * m_algorithmAliasMap
Definition: L1GtUtils.h:335
unsigned long long m_l1GtTmTechCacheID
Definition: L1GtUtils.h:316
const T & max(const T &a, const T &b)
const std::vector< unsigned int > & gtTriggerMask() const
get the trigger mask
const L1GtTriggerMask * m_l1GtTmVetoAlgo
Definition: L1GtUtils.h:318
const L1GtPrescaleFactors * m_l1GtPfAlgo
prescale factors
Definition: L1GtUtils.h:302
unsigned long long m_l1GtTmAlgoCacheID
Definition: L1GtUtils.h:313
unsigned int m_numberTechnicalTriggers
number of technical triggers
Definition: L1GtUtils.h:299
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:373
unsigned int m_numberAlgorithmTriggers
number of algorithm triggers
Definition: L1GtUtils.h:296
const L1GtTriggerMask * m_l1GtTmTech
Definition: L1GtUtils.h:315
const std::vector< std::vector< int > > & gtPrescaleFactors() const
get the prescale factors by reference
const L1GtPrescaleFactors * m_l1GtPfTech
Definition: L1GtUtils.h:305
const AlgorithmMap * m_technicalTriggerMap
Definition: L1GtUtils.h:336
const T & get() const
Definition: EventSetup.h:55
const std::vector< unsigned int > * m_triggerMaskVetoAlgoTrig
Definition: L1GtUtils.h:327
T const * product() const
Definition: ESHandle.h:62
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:331
unsigned long long m_l1GtPfTechCacheID
Definition: L1GtUtils.h:306
const AlgorithmMap & gtTechnicalTriggerMap() const
get / set the technical trigger map
bool m_l1EventSetupValid
Definition: L1GtUtils.h:338
unsigned long long m_l1GtTmVetoAlgoCacheID
Definition: L1GtUtils.h:319
std::vector< int > m_prescaleFactorSet
Definition: L1GtUtils.h:370
const AlgorithmMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
unsigned long long m_l1GtStableParCacheID
Definition: L1GtUtils.h:293
const std::vector< unsigned int > * m_triggerMaskVetoTechTrig
Definition: L1GtUtils.h:328
void L1GtUtils::retrieveL1GtTriggerMenuLite ( const edm::Event iEvent,
edm::InputTag l1GtMenuLiteInputTag 
)

retrieve L1GtTriggerMenuLite (per run product) and cache it to improve the speed input tag explicitly given

Definition at line 283 of file L1GtUtils.cc.

References edm::Run::getByLabel(), edm::Event::getRun(), L1GtTriggerMenuLite::gtAlgorithmAliasMap(), L1GtTriggerMenuLite::gtAlgorithmMap(), L1GtTriggerMenuLite::gtPrescaleFactorsAlgoTrig(), L1GtTriggerMenuLite::gtPrescaleFactorsTechTrig(), L1GtTriggerMenuLite::gtTechnicalTriggerMap(), L1GtTriggerMenuLite::gtTriggerMaskAlgoTrig(), L1GtTriggerMenuLite::gtTriggerMaskTechTrig(), edm::RunAuxiliary::id(), edm::HandleBase::isValid(), LogDebug, m_algorithmAliasMapLite, m_algorithmMapLite, m_l1GtMenuLite, m_l1GtMenuLiteValid, m_prescaleFactorsAlgoTrigLite, m_prescaleFactorsTechTrigLite, m_retrieveL1GtTriggerMenuLite, m_runIDCache, m_technicalTriggerMapLite, m_triggerMaskAlgoTrigLite, m_triggerMaskTechTrigLite, edm::Handle< T >::product(), edm::RunAuxiliary::run(), and edm::Run::runAuxiliary().

Referenced by L1GtAnalyzer::analyzeL1GtUtils(), L1GtAnalyzer::analyzeL1GtUtilsMenuLite(), and retrieveL1GtTriggerMenuLite().

284  {
285 
286  //
288 
289  // get Run Data - the same code can be run in beginRun, with getByLabel from edm::Run
290  const edm::Run& iRun = iEvent.getRun();
291  const edm::RunID* runID = &(iRun.runAuxiliary().id());
292 
293  if (runID != m_runIDCache) {
294 
295  // get L1GtTriggerMenuLite
297  iRun.getByLabel(l1GtMenuLiteInputTag, l1GtMenuLite);
298 
299  if (!l1GtMenuLite.isValid()) {
300 
301  LogDebug("L1GtUtils") << "\nL1GtTriggerMenuLite with \n "
302  << l1GtMenuLiteInputTag
303  << "\nrequested in configuration, but not found in the event."
304  << std::endl;
305 
306  m_l1GtMenuLiteValid = false;
307  } else {
308  m_l1GtMenuLite = l1GtMenuLite.product();
309  m_l1GtMenuLiteValid = true;
310 
311  LogDebug("L1GtUtils") << "\nL1GtTriggerMenuLite with \n "
312  << l1GtMenuLiteInputTag << "\nretrieved for run "
313  << iRun.runAuxiliary().run() << std::endl;
314 
319 
324 
329 
330  }
331 
332  m_runIDCache = runID;
333  }
334 
335 }
#define LogDebug(id)
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:374
bool getByLabel(std::string const &label, Handle< PROD > &result) const
Definition: Run.h:174
const std::vector< unsigned int > & gtTriggerMaskAlgoTrig() const
get the trigger mask for physics algorithms
const std::vector< std::vector< int > > & gtPrescaleFactorsAlgoTrig() const
get the prescale factors by reference / set the prescale factors
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrigLite
Definition: L1GtUtils.h:353
Run const & getRun() const
Definition: Event.cc:44
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmAliasMapLite
Definition: L1GtUtils.h:347
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmMapLite
Definition: L1GtUtils.h:346
RunID const & id() const
Definition: RunAuxiliary.h:37
const edm::RunID * m_runIDCache
Definition: L1GtUtils.h:356
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrigLite
Definition: L1GtUtils.h:354
const std::vector< unsigned int > & gtTriggerMaskTechTrig() const
get the trigger mask for technical triggers
const L1TriggerMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
const std::vector< std::vector< int > > & gtPrescaleFactorsTechTrig() const
bool isValid() const
Definition: HandleBase.h:76
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:344
const std::vector< unsigned int > * m_triggerMaskTechTrigLite
Definition: L1GtUtils.h:351
RunAuxiliary const & runAuxiliary() const
Definition: Run.h:38
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:362
T const * product() const
Definition: Handle.h:74
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
Definition: L1GtUtils.h:350
const L1TriggerMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
const L1TriggerMap & gtTechnicalTriggerMap() const
get / set the technical trigger map
const L1GtTriggerMenuLite::L1TriggerMap * m_technicalTriggerMapLite
Definition: L1GtUtils.h:348
RunNumber_t run() const
Definition: RunAuxiliary.h:41
Definition: Run.h:31
void L1GtUtils::retrieveL1GtTriggerMenuLite ( const edm::Event iEvent)

input tag found from provenance

Definition at line 264 of file L1GtUtils.cc.

References getL1GtTriggerMenuLiteInputTag(), edm::Event::getRun(), edm::RunAuxiliary::id(), m_provRunIDCache, retrieveL1GtTriggerMenuLite(), and edm::Run::runAuxiliary().

264  {
265 
266  // cache the L1GtTriggerMenuLite
267 
268  const edm::Run& iRun = iEvent.getRun();
269  const edm::RunID* runID = &(iRun.runAuxiliary().id());
270 
271  if (runID != m_provRunIDCache) {
272 
273  edm::InputTag l1GtTriggerMenuLiteInputTag;
274  getL1GtTriggerMenuLiteInputTag(iEvent, l1GtTriggerMenuLiteInputTag);
275 
276  retrieveL1GtTriggerMenuLite(iEvent, l1GtTriggerMenuLiteInputTag);
277 
278  m_provRunIDCache = runID;
279 
280  }
281 }
Run const & getRun() const
Definition: Event.cc:44
void getL1GtTriggerMenuLiteInputTag(const edm::Event &iEvent, edm::InputTag &l1GtTriggerMenuLiteInputTag) const
get the input tags for L1GtTriggerMenuLite
Definition: L1GtUtils.cc:410
RunID const & id() const
Definition: RunAuxiliary.h:37
const edm::RunID * m_provRunIDCache
Definition: L1GtUtils.h:359
void retrieveL1GtTriggerMenuLite(const edm::Event &, edm::InputTag &)
Definition: L1GtUtils.cc:283
RunAuxiliary const & runAuxiliary() const
Definition: Run.h:38
Definition: Run.h:31
const std::string L1GtUtils::triggerCategory ( const TriggerCategory trigCategory) const

public methods

Definition at line 86 of file L1GtUtils.cc.

References AlgorithmTrigger, EmptyString, and TechnicalTrigger.

Referenced by l1Results(), triggerMask(), and trigResult().

87  {
88 
89  switch (trigCategory) {
90  case AlgorithmTrigger: {
91  return "Algorithm Trigger";
92  }
93  break;
94  case TechnicalTrigger: {
95  return "Technical Trigger";
96  }
97 
98  break;
99  default: {
100  return EmptyString;
101  }
102  break;
103  }
104 }
static const std::string EmptyString
Definition: L1GtUtils.h:277
const int L1GtUtils::triggerMask ( const edm::Event iEvent,
const edm::InputTag l1GtRecordInputTag,
const edm::InputTag l1GtReadoutRecordInputTag,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

return trigger mask for a given algorithm or technical trigger

Definition at line 1256 of file L1GtUtils.cc.

References decisionAfterMask(), decisionBeforeMask(), l1Results(), and prescaleFactor().

Referenced by L1GtAnalyzer::analyzeL1GtUtilsCore(), decision(), decisionAfterMask(), decisionBeforeMask(), prescaleFactor(), and triggerMask().

1259  {
1260 
1261  // initial values
1262  bool decisionBeforeMask = false;
1263  bool decisionAfterMask = false;
1264  int prescaleFactor = -1;
1265  int triggerMask = -1;
1266 
1267  errorCode = l1Results(iEvent, l1GtRecordInputTag,
1268  l1GtReadoutRecordInputTag, nameAlgoTechTrig, decisionBeforeMask,
1269  decisionAfterMask, prescaleFactor, triggerMask);
1270 
1271  return triggerMask;
1272 
1273 }
const bool decisionAfterMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1147
const int l1Results(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:614
const bool decisionBeforeMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1110
const int triggerMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1256
const int prescaleFactor(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1221
const int L1GtUtils::triggerMask ( const edm::Event iEvent,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

Definition at line 1275 of file L1GtUtils.cc.

References decisionAfterMask(), decisionBeforeMask(), l1Results(), prescaleFactor(), and triggerMask().

1276  {
1277 
1278  // initial values
1279  bool decisionBeforeMask = false;
1280  bool decisionAfterMask = false;
1281  int prescaleFactor = -1;
1282  int triggerMask = -1;
1283 
1284  errorCode = l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1285  decisionAfterMask, prescaleFactor, triggerMask);
1286 
1287  return triggerMask;
1288 
1289 }
const bool decisionAfterMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1147
const int l1Results(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:614
const bool decisionBeforeMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1110
const int triggerMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1256
const int prescaleFactor(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1221
const int L1GtUtils::triggerMask ( const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

faster than previous two methods - one needs in fact for the masks the event setup only

Definition at line 1291 of file L1GtUtils.cc.

References AlgorithmTrigger, availableL1Configuration(), L1GtTriggerMenuLite::gtTriggerMenuImplementation(), L1GtTriggerMenu::gtTriggerMenuImplementation(), l1AlgoTechTrigBitNumber(), LogDebug, m_l1GtMenu, m_l1GtMenuLite, m_l1GtMenuLiteValid, m_physicsDaqPartition, m_retrieveL1GtTriggerMenuLite, m_triggerMaskAlgoTrig, m_triggerMaskAlgoTrigLite, m_triggerMaskTechTrig, m_triggerMaskTechTrigLite, TechnicalTrigger, and triggerCategory().

1292  {
1293 
1294  // initial values for returned results
1295  int triggerMaskValue = -1;
1296 
1297  // initialize error code and L1 configuration code
1298  int iError = 0;
1299  int l1ConfCode = 0;
1300 
1301  // check if L1 configuration is available
1302 
1303  if (!availableL1Configuration(iError, l1ConfCode)) {
1304  errorCode = iError;
1305  return triggerMaskValue;
1306  }
1307 
1308  // at this point, a valid L1 configuration is available, so the if/else if/else
1309  // can be simplified
1310 
1311  // if the given name is not an algorithm trigger alias, an algorithm trigger name
1312  // or a technical trigger in the current menu, return with error code 1
1313 
1314  TriggerCategory trigCategory = AlgorithmTrigger;
1315  int bitNumber = -1;
1316 
1317  if (!l1AlgoTechTrigBitNumber(nameAlgoTechTrig, trigCategory, bitNumber)) {
1318 
1319  iError = l1ConfCode + 1;
1320 
1322  if (m_l1GtMenuLiteValid) {
1323 
1324  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n "
1325  << nameAlgoTechTrig
1326  << "\not found in the trigger menu \n "
1328  << "\nretrieved from L1GtTriggerMenuLite" << std::endl;
1329 
1330  } else {
1331 
1332  // fall through: L1 trigger configuration from event setup
1333  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n "
1334  << nameAlgoTechTrig
1335  << "\not found in the trigger menu \n "
1337  << "\nretrieved from Event Setup" << std::endl;
1338 
1339  }
1340 
1341  } else {
1342  // L1 trigger configuration from event setup only
1343  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n "
1344  << nameAlgoTechTrig
1345  << "\not found in the trigger menu \n "
1347  << "\nretrieved from Event Setup" << std::endl;
1348 
1349  }
1350 
1351  errorCode = iError;
1352  return triggerMaskValue;
1353 
1354  }
1355 
1356  // check here if a positive bit number was retrieved
1357  // exit in case of negative bit number, before retrieving L1 GT products, saving time
1358 
1359  if (bitNumber < 0) {
1360 
1361  iError = l1ConfCode + 2;
1362 
1364  if (m_l1GtMenuLiteValid) {
1365  LogDebug("L1GtUtils") << "\nNegative bit number for "
1366  << triggerCategory(trigCategory) << "\n "
1367  << nameAlgoTechTrig << "\nfrom menu \n "
1369  << "\nretrieved from L1GtTriggerMenuLite" << std::endl;
1370 
1371  } else {
1372  // fall through: L1 trigger configuration from event setup
1373  LogDebug("L1GtUtils") << "\nNegative bit number for "
1374  << triggerCategory(trigCategory) << "\n "
1375  << nameAlgoTechTrig << "\nfrom menu \n "
1377  << "\nretrieved from Event Setup" << std::endl;
1378 
1379  }
1380 
1381  } else {
1382  // L1 trigger configuration from event setup only
1383  LogDebug("L1GtUtils") << "\nNegative bit number for "
1384  << triggerCategory(trigCategory) << "\n "
1385  << nameAlgoTechTrig << "\nfrom menu \n "
1387  << "\nretrieved from Event Setup" << std::endl;
1388 
1389  }
1390 
1391  errorCode = iError;
1392  return triggerMaskValue;
1393  }
1394 
1395  // depending on trigger category (algorithm trigger or technical trigger)
1396  // get the correct quantities
1397 
1398  // pointer to the set of trigger masks
1399 
1400  const std::vector<unsigned int>* triggerMasksSet = 0;
1401 
1402  switch (trigCategory) {
1403  case AlgorithmTrigger: {
1405  if (m_l1GtMenuLiteValid) {
1406  triggerMasksSet = m_triggerMaskAlgoTrigLite;
1407 
1408  } else {
1409  // fall through: L1 trigger configuration from event setup
1410  triggerMasksSet = m_triggerMaskAlgoTrig;
1411 
1412  }
1413 
1414  } else {
1415  // L1 trigger configuration from event setup only
1416  triggerMasksSet = m_triggerMaskAlgoTrig;
1417 
1418  }
1419 
1420  }
1421  break;
1422  case TechnicalTrigger: {
1424  if (m_l1GtMenuLiteValid) {
1425  triggerMasksSet = m_triggerMaskTechTrigLite;
1426 
1427  } else {
1428  // fall through: L1 trigger configuration from event setup
1429  triggerMasksSet = m_triggerMaskTechTrig;
1430 
1431  }
1432 
1433  } else {
1434  // L1 trigger configuration from event setup only
1435  triggerMasksSet = m_triggerMaskTechTrig;
1436 
1437  }
1438 
1439  }
1440  break;
1441  default: {
1442  // should not be the case
1443  iError = l1ConfCode + 3;
1444 
1445  errorCode = iError;
1446  return triggerMaskValue;
1447 
1448  }
1449  break;
1450  }
1451 
1452  // trigger mask
1453 
1454  if (bitNumber < (static_cast<int> ((*triggerMasksSet).size()))) {
1455 
1457  if (m_l1GtMenuLiteValid) {
1458  triggerMaskValue = (*triggerMasksSet)[bitNumber];
1459 
1460  } else {
1461  // fall through: L1 trigger configuration from event setup
1462  // masks in event setup are for all partitions
1463  triggerMaskValue = ((*triggerMasksSet)[bitNumber]) & (1
1465 
1466  }
1467 
1468  } else {
1469  // L1 trigger configuration from event setup only
1470  // masks in event setup are for all partitions
1471  triggerMaskValue = ((*triggerMasksSet)[bitNumber]) & (1
1473 
1474  }
1475 
1476  } else {
1477  iError = l1ConfCode + 5000;
1478  LogDebug("L1GtUtils") << "\nError: bit number " << bitNumber
1479  << " retrieved for " << triggerCategory(trigCategory) << "\n "
1480  << nameAlgoTechTrig
1481  << "\ngreater than size of L1 GT trigger mask set: "
1482  << (*triggerMasksSet).size()
1483  << "\nError: Inconsistent L1 trigger configuration!"
1484  << std::endl;
1485 
1486  errorCode = iError;
1487  return triggerMaskValue;
1488 
1489  }
1490 
1491  errorCode = iError;
1492  return triggerMaskValue;
1493 
1494 }
#define LogDebug(id)
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:374
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
Definition: L1GtUtils.h:324
const std::vector< unsigned int > * m_triggerMaskTechTrig
Definition: L1GtUtils.h:325
const bool l1AlgoTechTrigBitNumber(const std::string &nameAlgoTechTrig, TriggerCategory &trigCategory, int &bitNumber) const
Definition: L1GtUtils.cc:470
TriggerCategory
Definition: L1GtUtils.h:59
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:2235
const std::string & gtTriggerMenuImplementation() const
const std::string triggerCategory(const TriggerCategory &) const
public methods
Definition: L1GtUtils.cc:86
unsigned int m_physicsDaqPartition
index of physics DAQ partition
Definition: L1GtUtils.h:367
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:344
const std::vector< unsigned int > * m_triggerMaskTechTrigLite
Definition: L1GtUtils.h:351
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:362
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
Definition: L1GtUtils.h:350
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:331
const std::string & gtTriggerMenuImplementation() const
const std::vector< unsigned int > & L1GtUtils::triggerMaskSet ( const TriggerCategory trigCategory,
int &  errorCode 
)

return the set of trigger masks for the physics partition (partition zero) used for the event (remain the same in the whole run, if no errors)

Definition at line 1972 of file L1GtUtils.cc.

References AlgorithmTrigger, availableL1Configuration(), i, m_l1GtMenuLiteValid, m_physicsDaqPartition, m_retrieveL1GtTriggerMenuLite, m_triggerMaskAlgoTrig, m_triggerMaskAlgoTrigLite, m_triggerMaskSet, m_triggerMaskTechTrig, m_triggerMaskTechTrigLite, and TechnicalTrigger.

Referenced by L1GtAnalyzer::analyzeL1GtUtilsCore(), and triggerMaskSet().

1973  {
1974 
1975  // clear the vector before filling it
1976  m_triggerMaskSet.clear();
1977 
1978  // initialize error code and L1 configuration code
1979  int iError = 0;
1980  int l1ConfCode = 0;
1981 
1982  // check if L1 configuration is available
1983 
1984  if (!availableL1Configuration(iError, l1ConfCode)) {
1985  errorCode = iError;
1986  return m_triggerMaskSet;
1987  }
1988 
1989  // at this point, a valid L1 configuration is available, so the if/else if/else
1990  // can be simplified
1991 
1992 
1993  // depending on trigger category (algorithm trigger or technical trigger)
1994  // get the correct quantities
1995 
1996  // pointer to the set of trigger masks
1997 
1998  switch (trigCategory) {
1999  case AlgorithmTrigger: {
2001  // L1GtTriggerMenuLite has masks for physics partition only
2002  // avoid copy to m_triggerMaskSet, return directly m_triggerMaskAlgoTrigLite
2003  if (m_l1GtMenuLiteValid) {
2004  errorCode = iError;
2005  return (*m_triggerMaskAlgoTrigLite);
2006 
2007  } else {
2008  // fall through: L1 trigger configuration from event setup
2009  for (unsigned i = 0; i < m_triggerMaskAlgoTrig->size(); i++) {
2010  m_triggerMaskSet.push_back(
2011  ((*m_triggerMaskAlgoTrig)[i]) & (1
2012  << m_physicsDaqPartition));
2013  }
2014 
2015  }
2016 
2017  } else {
2018  // L1 trigger configuration from event setup only
2019  for (unsigned i = 0; i < m_triggerMaskAlgoTrig->size(); i++) {
2020  m_triggerMaskSet.push_back(((*m_triggerMaskAlgoTrig)[i])
2021  & (1 << m_physicsDaqPartition));
2022  }
2023 
2024  }
2025  }
2026  break;
2027  case TechnicalTrigger: {
2029  if (m_l1GtMenuLiteValid) {
2030  errorCode = iError;
2031  return (*m_triggerMaskTechTrigLite);
2032 
2033  } else {
2034  // fall through: L1 trigger configuration from event setup
2035  for (unsigned i = 0; i < m_triggerMaskTechTrig->size(); i++) {
2036  m_triggerMaskSet.push_back(
2037  ((*m_triggerMaskTechTrig)[i]) & (1
2038  << m_physicsDaqPartition));
2039  }
2040 
2041  }
2042 
2043  } else {
2044  // L1 trigger configuration from event setup only
2045  for (unsigned i = 0; i < m_triggerMaskTechTrig->size(); i++) {
2046  m_triggerMaskSet.push_back(((*m_triggerMaskTechTrig)[i])
2047  & (1 << m_physicsDaqPartition));
2048  }
2049 
2050  }
2051  }
2052  break;
2053  default: {
2054  // should not be the case
2055  iError = l1ConfCode + 3;
2056 
2057  errorCode = iError;
2058  return m_triggerMaskSet;
2059 
2060  }
2061  break;
2062  }
2063 
2064  errorCode = iError;
2065  return m_triggerMaskSet;
2066 
2067 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:374
int i
Definition: DBlmapReader.cc:9
std::vector< unsigned int > m_triggerMaskSet
Definition: L1GtUtils.h:369
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
Definition: L1GtUtils.h:324
const std::vector< unsigned int > * m_triggerMaskTechTrig
Definition: L1GtUtils.h:325
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:2235
unsigned int m_physicsDaqPartition
index of physics DAQ partition
Definition: L1GtUtils.h:367
const std::vector< unsigned int > * m_triggerMaskTechTrigLite
Definition: L1GtUtils.h:351
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:362
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
Definition: L1GtUtils.h:350
const std::vector< unsigned int > & L1GtUtils::triggerMaskSet ( const std::string &  triggerAlgoTechTrig,
int &  errorCode 
)

deprecated version

Definition at line 2071 of file L1GtUtils.cc.

References AlgorithmTrigger, availableL1Configuration(), LogDebug, m_triggerMaskSet, TechnicalTrigger, and triggerMaskSet().

2072  {
2073 
2074  // clear the vector before filling it
2075  m_triggerMaskSet.clear();
2076 
2077  // initialize error code and return value
2078  int iError = 0;
2079  int l1ConfCode = 0;
2080 
2081  // check if L1 configuration is available
2082 
2083  if (!availableL1Configuration(iError, l1ConfCode)) {
2084  errorCode = iError;
2085  return m_triggerMaskSet;
2086  }
2087 
2088  // test if the argument for the "trigger algorithm type" is correct
2089  TriggerCategory trigCategory = AlgorithmTrigger;
2090 
2091  if (triggerAlgoTechTrig == "TechnicalTriggers") {
2092  trigCategory = TechnicalTrigger;
2093 
2094  } else if (triggerAlgoTechTrig == "PhysicsAlgorithms") {
2095  trigCategory = AlgorithmTrigger;
2096 
2097  } else {
2098 
2099  LogDebug("L1GtUtils")
2100  << "\nErrr : trigger mask set cannot be retrieved for the argument "
2101  << triggerAlgoTechTrig
2102  << "\n Supported arguments: 'PhysicsAlgorithms' or 'TechnicalTriggers'"
2103  << "\nWarning: this method is deprecated, please use method with TriggerCategory."
2104  << std::endl;
2105 
2106  iError = l1ConfCode + 6000;
2107 
2108  errorCode = iError;
2109  return m_triggerMaskSet;
2110 
2111  }
2112 
2113  m_triggerMaskSet = triggerMaskSet(trigCategory, iError);
2114 
2115  errorCode = iError;
2116  return m_triggerMaskSet;
2117 
2118 }
#define LogDebug(id)
std::vector< unsigned int > m_triggerMaskSet
Definition: L1GtUtils.h:369
TriggerCategory
Definition: L1GtUtils.h:59
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:2235
const std::vector< unsigned int > & triggerMaskSet(const TriggerCategory &trigCategory, int &errorCode)
Definition: L1GtUtils.cc:1972
const bool L1GtUtils::trigResult ( const DecisionWord decWord,
const int  bitNumber,
const std::string &  nameAlgoTechTrig,
const TriggerCategory trigCategory,
int &  errorCode 
) const
private

return the trigger result given bit number and decision word errorCode != 0 if bit number greater than size of decision word print in debug mode a message in case of error

Definition at line 2339 of file L1GtUtils.cc.

References LogDebug, and triggerCategory().

Referenced by l1Results().

2341  {
2342 
2343  bool trigRes = false;
2344  errorCode = 0;
2345 
2346  if (bitNumber < (static_cast<int> (decWord.size()))) {
2347  trigRes = decWord[bitNumber];
2348  } else {
2349  errorCode = 3000;
2350  LogDebug("L1GtUtils") << "\nError: bit number " << bitNumber
2351  << " retrieved for " << triggerCategory(trigCategory) << "\n "
2352  << nameAlgoTechTrig
2353  << "\ngreater than size of L1 GT decision word: "
2354  << decWord.size()
2355  << "\nError: Inconsistent L1 trigger configuration!"
2356  << std::endl;
2357  }
2358 
2359  return trigRes;
2360 }
#define LogDebug(id)
const std::string triggerCategory(const TriggerCategory &) const
public methods
Definition: L1GtUtils.cc:86

Member Data Documentation

const std::string L1GtUtils::EmptyString = ""
staticprivate

Definition at line 277 of file L1GtUtils.h.

Referenced by l1TriggerMenu(), l1TriggerMenuImplementation(), and triggerCategory().

const int L1GtUtils::L1GtNotValidError = 99999
staticprivate

Definition at line 278 of file L1GtUtils.h.

Referenced by availableL1Configuration().

const AlgorithmMap* L1GtUtils::m_algorithmAliasMap
private

Definition at line 335 of file L1GtUtils.h.

Referenced by l1AlgoTechTrigBitNumber(), and retrieveL1EventSetup().

const L1GtTriggerMenuLite::L1TriggerMap* L1GtUtils::m_algorithmAliasMapLite
private

Definition at line 347 of file L1GtUtils.h.

Referenced by l1AlgoTechTrigBitNumber(), and retrieveL1GtTriggerMenuLite().

const AlgorithmMap* L1GtUtils::m_algorithmMap
private

Definition at line 334 of file L1GtUtils.h.

Referenced by l1AlgoTechTrigBitNumber(), and retrieveL1EventSetup().

const L1GtTriggerMenuLite::L1TriggerMap* L1GtUtils::m_algorithmMapLite
private

Definition at line 346 of file L1GtUtils.h.

Referenced by l1AlgoTechTrigBitNumber(), and retrieveL1GtTriggerMenuLite().

bool L1GtUtils::m_l1EventSetupValid
private

Definition at line 338 of file L1GtUtils.h.

Referenced by availableL1Configuration(), and retrieveL1EventSetup().

const L1GtTriggerMenu* L1GtUtils::m_l1GtMenu
private
unsigned long long L1GtUtils::m_l1GtMenuCacheID
private

Definition at line 332 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtTriggerMenuLite* L1GtUtils::m_l1GtMenuLite
private
bool L1GtUtils::m_l1GtMenuLiteValid
private
const L1GtPrescaleFactors* L1GtUtils::m_l1GtPfAlgo
private

prescale factors

Definition at line 302 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtPfAlgoCacheID
private

Definition at line 303 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtPrescaleFactors* L1GtUtils::m_l1GtPfTech
private

Definition at line 305 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtPfTechCacheID
private

Definition at line 306 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtStableParameters* L1GtUtils::m_l1GtStablePar
private

event setup cached stuff

stable parameters

Definition at line 292 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtStableParCacheID
private

Definition at line 293 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtTriggerMask* L1GtUtils::m_l1GtTmAlgo
private

trigger masks & veto masks

Definition at line 312 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtTmAlgoCacheID
private

Definition at line 313 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtTriggerMask* L1GtUtils::m_l1GtTmTech
private

Definition at line 315 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtTmTechCacheID
private

Definition at line 316 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtTriggerMask* L1GtUtils::m_l1GtTmVetoAlgo
private

Definition at line 318 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtTmVetoAlgoCacheID
private

Definition at line 319 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtTriggerMask* L1GtUtils::m_l1GtTmVetoTech
private

Definition at line 321 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtTmVetoTechCacheID
private

Definition at line 322 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned int L1GtUtils::m_numberAlgorithmTriggers
private

number of algorithm triggers

Definition at line 296 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned int L1GtUtils::m_numberTechnicalTriggers
private

number of technical triggers

Definition at line 299 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned int L1GtUtils::m_physicsDaqPartition
private

index of physics DAQ partition

Definition at line 367 of file L1GtUtils.h.

Referenced by l1Results(), triggerMask(), and triggerMaskSet().

const std::vector<std::vector<int> >* L1GtUtils::m_prescaleFactorsAlgoTrig
private

Definition at line 308 of file L1GtUtils.h.

Referenced by l1Results(), prescaleFactorSetIndex(), and retrieveL1EventSetup().

const std::vector<std::vector<int> >* L1GtUtils::m_prescaleFactorsAlgoTrigLite
private

Definition at line 353 of file L1GtUtils.h.

Referenced by l1Results(), prescaleFactorSetIndex(), and retrieveL1GtTriggerMenuLite().

std::vector<int> L1GtUtils::m_prescaleFactorSet
private

Definition at line 370 of file L1GtUtils.h.

Referenced by prescaleFactorSet(), and retrieveL1EventSetup().

const std::vector<std::vector<int> >* L1GtUtils::m_prescaleFactorsTechTrig
private

Definition at line 309 of file L1GtUtils.h.

Referenced by l1Results(), prescaleFactorSetIndex(), and retrieveL1EventSetup().

const std::vector<std::vector<int> >* L1GtUtils::m_prescaleFactorsTechTrigLite
private

Definition at line 354 of file L1GtUtils.h.

Referenced by l1Results(), prescaleFactorSetIndex(), and retrieveL1GtTriggerMenuLite().

const edm::RunID* L1GtUtils::m_provRunIDCache
private

Definition at line 359 of file L1GtUtils.h.

Referenced by retrieveL1GtTriggerMenuLite().

bool L1GtUtils::m_retrieveL1EventSetup
private

flags to check which method was used to retrieve L1 trigger configuration

Definition at line 373 of file L1GtUtils.h.

Referenced by availableL1Configuration(), l1AlgoTechTrigBitNumber(), l1TriggerMenu(), l1TriggerMenuImplementation(), ptrL1TriggerMenuEventSetup(), and retrieveL1EventSetup().

bool L1GtUtils::m_retrieveL1GtTriggerMenuLite
private
const edm::RunID* L1GtUtils::m_runIDCache
private

Definition at line 356 of file L1GtUtils.h.

Referenced by retrieveL1GtTriggerMenuLite().

const AlgorithmMap* L1GtUtils::m_technicalTriggerMap
private

Definition at line 336 of file L1GtUtils.h.

Referenced by l1AlgoTechTrigBitNumber(), and retrieveL1EventSetup().

const L1GtTriggerMenuLite::L1TriggerMap* L1GtUtils::m_technicalTriggerMapLite
private

Definition at line 348 of file L1GtUtils.h.

Referenced by l1AlgoTechTrigBitNumber(), and retrieveL1GtTriggerMenuLite().

const std::vector<unsigned int>* L1GtUtils::m_triggerMaskAlgoTrig
private

Definition at line 324 of file L1GtUtils.h.

Referenced by l1Results(), retrieveL1EventSetup(), triggerMask(), and triggerMaskSet().

const std::vector<unsigned int>* L1GtUtils::m_triggerMaskAlgoTrigLite
private

Definition at line 350 of file L1GtUtils.h.

Referenced by l1Results(), retrieveL1GtTriggerMenuLite(), triggerMask(), and triggerMaskSet().

std::vector<unsigned int> L1GtUtils::m_triggerMaskSet
private

Definition at line 369 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup(), and triggerMaskSet().

const std::vector<unsigned int>* L1GtUtils::m_triggerMaskTechTrig
private

Definition at line 325 of file L1GtUtils.h.

Referenced by l1Results(), retrieveL1EventSetup(), triggerMask(), and triggerMaskSet().

const std::vector<unsigned int>* L1GtUtils::m_triggerMaskTechTrigLite
private

Definition at line 351 of file L1GtUtils.h.

Referenced by l1Results(), retrieveL1GtTriggerMenuLite(), triggerMask(), and triggerMaskSet().

const std::vector<unsigned int>* L1GtUtils::m_triggerMaskVetoAlgoTrig
private

Definition at line 327 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const std::vector<unsigned int>* L1GtUtils::m_triggerMaskVetoTechTrig
private

Definition at line 328 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().