CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
L1GtUtils Class Reference

#include <L1GtUtils.h>

Classes

class  LogicalExpressionL1Results
 

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 std::string &nameAlgoTechTrig, int &errorCode) const
 
const bool decisionAfterMask (const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
 return decision after trigger mask for a given algorithm or technical trigger More...
 
const bool decisionBeforeMask (const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
 return decision before trigger mask for a given algorithm or technical trigger More...
 
void getL1GtRunCache (const edm::Run &, const edm::EventSetup &, const bool, const bool)
 get all the run-constant quantities for L1 trigger and cache them More...
 
void getL1GtRunCache (const edm::Event &, const edm::EventSetup &, const bool, const bool)
 for use in analyze(const edm::Event&, const edm::EventSetup&) More...
 
const bool l1AlgoTechTrigBitNumber (const std::string &nameAlgoTechTrig, TriggerCategory &trigCategory, int &bitNumber) const
 
 L1GtUtils (edm::ParameterSet const &pset, edm::ConsumesCollector &&iC, bool useL1GtTriggerMenuLite)
 
 L1GtUtils (edm::ParameterSet const &pset, edm::ConsumesCollector &iC, bool useL1GtTriggerMenuLite)
 
template<typename T >
 L1GtUtils (edm::ParameterSet const &pset, edm::ConsumesCollector &&iC, bool useL1GtTriggerMenuLite, T &module)
 
template<typename T >
 L1GtUtils (edm::ParameterSet const &pset, edm::ConsumesCollector &iC, bool useL1GtTriggerMenuLite, T &module)
 
template<typename T >
 L1GtUtils (edm::ParameterSet const &pset, edm::ConsumesCollector &&iC, bool useL1GtTriggerMenuLite, T &module, edm::InputTag const &l1GtRecordInputTag, edm::InputTag const &l1GtReadoutRecordInputTag, edm::InputTag const &l1GtTriggerMenuLiteInputTag)
 
template<typename T >
 L1GtUtils (edm::ParameterSet const &pset, edm::ConsumesCollector &iC, bool useL1GtTriggerMenuLite, T &module, edm::InputTag const &l1GtRecordInputTag, edm::InputTag const &l1GtReadoutRecordInputTag, edm::InputTag const &l1GtTriggerMenuLiteInputTag)
 
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 bool l1TriggerNameFromBit (const int &bitNumber, const TriggerCategory &trigCategory, std::string &aliasL1Trigger, std::string &nameL1Trigger) const
 
const int prescaleFactor (const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
 return prescale factor for a given algorithm or technical trigger More...
 
const std::vector< int > & prescaleFactorSet (const edm::Event &iEvent, const TriggerCategory &trigCategory, int &errorCode)
 
const int prescaleFactorSetIndex (const edm::Event &iEvent, const TriggerCategory &trigCategory, 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::Run &)
 retrieve L1GtTriggerMenuLite (per run product) and cache it to improve the speed More...
 
const std::string triggerCategory (const TriggerCategory &) const
 public methods More...
 
const int triggerMask (const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
 return trigger mask for a given algorithm or technical trigger More...
 
const int triggerMask (const std::string &nameAlgoTechTrig, int &errorCode) const
 
const std::vector< unsigned int > & triggerMaskSet (const TriggerCategory &trigCategory, int &errorCode)
 
virtual ~L1GtUtils ()
 destructor More...
 

Static Public Member Functions

static void fillDescription (edm::ParameterSetDescription &desc)
 

Private Member Functions

 L1GtUtils ()
 
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::L1TriggerMapm_algorithmAliasMapLite
 
const AlgorithmMapm_algorithmMap
 
const L1GtTriggerMenuLite::L1TriggerMapm_algorithmMapLite
 
bool m_beginRunCache
 flag for call of getL1GtRunCache in beginRun More...
 
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
 
std::unique_ptr< L1GtUtilsHelperm_l1GtUtilsHelper
 
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
 
bool m_retrieveL1EventSetup
 flags to check which method was used to retrieve L1 trigger configuration More...
 
bool m_retrieveL1GtTriggerMenuLite
 
edm::RunID m_runIDCache
 run cache ID More...
 
const AlgorithmMapm_technicalTriggerMap
 
const L1GtTriggerMenuLite::L1TriggerMapm_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

Description: return L1 trigger results for a logical expression.

Implementation: Return L1 trigger results for a logical expression of algorithm or technical triggers. Mixture of algorithm and technical triggers in the logical expression is allowed only if trigger names or aliases are used. Mixing bit numbers and names or aliases is not supported. If the expression has bit numbers, they are assumed to be technical triggers.

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 48 of file L1GtUtils.h.

Member Enumeration Documentation

Enumerator
AlgorithmTrigger 
TechnicalTrigger 

Definition at line 96 of file L1GtUtils.h.

Constructor & Destructor Documentation

L1GtUtils::L1GtUtils ( edm::ParameterSet const &  pset,
edm::ConsumesCollector &&  iC,
bool  useL1GtTriggerMenuLite 
)

Definition at line 85 of file L1GtUtils.cc.

static const bool useL1GtTriggerMenuLite(true)
L1GtUtils::L1GtUtils ( edm::ParameterSet const &  pset,
edm::ConsumesCollector iC,
bool  useL1GtTriggerMenuLite 
)

Definition at line 88 of file L1GtUtils.cc.

References m_l1GtUtilsHelper.

89  : L1GtUtils() {
91 }
std::unique_ptr< L1GtUtilsHelper > m_l1GtUtilsHelper
Definition: L1GtUtils.h:429
static const bool useL1GtTriggerMenuLite(true)
template<typename T >
L1GtUtils::L1GtUtils ( edm::ParameterSet const &  pset,
edm::ConsumesCollector &&  iC,
bool  useL1GtTriggerMenuLite,
T module 
)

Definition at line 433 of file L1GtUtils.h.

static const bool useL1GtTriggerMenuLite(true)
Definition: vlib.h:198
template<typename T >
L1GtUtils::L1GtUtils ( edm::ParameterSet const &  pset,
edm::ConsumesCollector iC,
bool  useL1GtTriggerMenuLite,
T module 
)

Definition at line 437 of file L1GtUtils.h.

References m_l1GtUtilsHelper.

438  : L1GtUtils() {
440 }
std::unique_ptr< L1GtUtilsHelper > m_l1GtUtilsHelper
Definition: L1GtUtils.h:429
static const bool useL1GtTriggerMenuLite(true)
Definition: vlib.h:198
template<typename T >
L1GtUtils::L1GtUtils ( edm::ParameterSet const &  pset,
edm::ConsumesCollector &&  iC,
bool  useL1GtTriggerMenuLite,
T module,
edm::InputTag const &  l1GtRecordInputTag,
edm::InputTag const &  l1GtReadoutRecordInputTag,
edm::InputTag const &  l1GtTriggerMenuLiteInputTag 
)

Definition at line 443 of file L1GtUtils.h.

450  : L1GtUtils(pset,
451  iC,
453  module,
static const bool useL1GtTriggerMenuLite(true)
Definition: vlib.h:198
template<typename T >
L1GtUtils::L1GtUtils ( edm::ParameterSet const &  pset,
edm::ConsumesCollector iC,
bool  useL1GtTriggerMenuLite,
T module,
edm::InputTag const &  l1GtRecordInputTag,
edm::InputTag const &  l1GtReadoutRecordInputTag,
edm::InputTag const &  l1GtTriggerMenuLiteInputTag 
)

Definition at line 459 of file L1GtUtils.h.

References m_l1GtUtilsHelper.

466  : L1GtUtils() {
468  iC,
470  module,
474 }
std::unique_ptr< L1GtUtilsHelper > m_l1GtUtilsHelper
Definition: L1GtUtils.h:429
static const bool useL1GtTriggerMenuLite(true)
Definition: vlib.h:198
L1GtUtils::~L1GtUtils ( )
virtual

destructor

Definition at line 94 of file L1GtUtils.cc.

94  {
95  // empty
96 }
L1GtUtils::L1GtUtils ( )
private

Definition at line 48 of file L1GtUtils.cc.

49  :
50 
53 
55 
56  m_l1GtPfAlgoCacheID(0ULL),
57  m_l1GtPfTechCacheID(0ULL),
58 
59  m_l1GtTmAlgoCacheID(0ULL),
60  m_l1GtTmTechCacheID(0ULL),
61 
64 
65  m_l1GtMenuCacheID(0ULL),
66 
67  m_l1EventSetupValid(false),
68 
69  m_l1GtMenuLiteValid(false),
70 
71  m_beginRunCache(false),
72 
73  m_runIDCache(0),
74 
76 
78 
80 
81 {
82  // empty
83 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:427
edm::RunID m_runIDCache
run cache ID
Definition: L1GtUtils.h:416
unsigned long long m_l1GtMenuCacheID
Definition: L1GtUtils.h:387
unsigned long long m_l1GtPfAlgoCacheID
Definition: L1GtUtils.h:358
unsigned long long m_l1GtTmVetoTechCacheID
Definition: L1GtUtils.h:377
unsigned long long m_l1GtTmTechCacheID
Definition: L1GtUtils.h:371
unsigned long long m_l1GtTmAlgoCacheID
Definition: L1GtUtils.h:368
unsigned int m_numberTechnicalTriggers
number of technical triggers
Definition: L1GtUtils.h:354
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:426
unsigned int m_physicsDaqPartition
index of physics DAQ partition
Definition: L1GtUtils.h:420
unsigned int m_numberAlgorithmTriggers
number of algorithm triggers
Definition: L1GtUtils.h:351
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:410
bool m_beginRunCache
flag for call of getL1GtRunCache in beginRun
Definition: L1GtUtils.h:413
unsigned long long m_l1GtPfTechCacheID
Definition: L1GtUtils.h:361
bool m_l1EventSetupValid
Definition: L1GtUtils.h:393
unsigned long long m_l1GtTmVetoAlgoCacheID
Definition: L1GtUtils.h:374
unsigned long long m_l1GtStableParCacheID
Definition: L1GtUtils.h:348

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 1637 of file L1GtUtils.cc.

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

Referenced by IsoTrackCalib::analyze(), IsolatedTracksNxN::analyze(), L1GtAnalyzer::analyzeL1GtUtilsCore(), L1GtAnalyzer::analyzeTrigger(), l1Results(), L1GtUtils::LogicalExpressionL1Results::logicalExpressionRunUpdate(), prescaleFactorSetIndex(), ptrL1GtTriggerMenuLite(), ptrL1TriggerMenuEventSetup(), triggerMask(), and triggerMaskSet().

1637  {
1639  if (!m_retrieveL1EventSetup) {
1640  LogDebug("L1GtUtils") << "\nRetrieve L1 trigger configuration from L1GtTriggerMenuLite only.\n" << std::endl;
1641  l1ConfCode = 0;
1642  } else {
1643  LogDebug("L1GtUtils") << "\nFall through: retrieve L1 trigger configuration from L1GtTriggerMenuLite."
1644  << "\nIf L1GtTriggerMenuLite not valid, try to retrieve from event setup.\n"
1645  << std::endl;
1646  l1ConfCode = 100000;
1647  }
1648 
1649  if (m_l1GtMenuLiteValid) {
1650  LogDebug("L1GtUtils") << "\nRetrieve L1 trigger configuration from L1GtTriggerMenuLite, valid product.\n"
1651  << std::endl;
1652  l1ConfCode = l1ConfCode + 10000;
1653  errorCode = 0;
1654 
1655  return true;
1656 
1657  } else if (m_retrieveL1EventSetup) {
1658  if (m_l1EventSetupValid) {
1659  LogDebug("L1GtUtils") << "\nFall through: retrieve L1 trigger configuration from event setup."
1660  << "\nFirst option was L1GtTriggerMenuLite - but product is not valid.\n"
1661  << std::endl;
1662  l1ConfCode = l1ConfCode + 20000;
1663  errorCode = 0;
1664 
1665  return true;
1666 
1667  } else {
1668  LogDebug("L1GtUtils") << "\nFall through: L1GtTriggerMenuLite not valid, event setup not valid.\n" << std::endl;
1669  l1ConfCode = l1ConfCode + L1GtNotValidError;
1670  errorCode = l1ConfCode;
1671 
1672  return false;
1673  }
1674 
1675  } else {
1676  LogDebug("L1GtUtils") << "\nError: L1 trigger configuration requested from L1GtTriggerMenuLite only"
1677  << "\nbut L1GtTriggerMenuLite is not valid.\n"
1678  << std::endl;
1679  l1ConfCode = l1ConfCode + L1GtNotValidError;
1680  errorCode = l1ConfCode;
1681 
1682  return false;
1683  }
1684  } else if (m_retrieveL1EventSetup) {
1685  LogDebug("L1GtUtils") << "\nRetrieve L1 trigger configuration from event setup."
1686  << "\nL1GtTriggerMenuLite product was not requested.\n"
1687  << std::endl;
1688  l1ConfCode = 200000;
1689 
1690  if (m_l1EventSetupValid) {
1691  LogDebug("L1GtUtils") << "\nRetrieve L1 trigger configuration from event setup only."
1692  << "\nValid L1 trigger event setup.\n"
1693  << std::endl;
1694  l1ConfCode = l1ConfCode + 10000;
1695  errorCode = 0;
1696 
1697  return true;
1698 
1699  } else {
1700  LogDebug("L1GtUtils") << "\nRetrieve L1 trigger configuration from event setup only."
1701  << "\nNo valid L1 trigger event setup.\n"
1702  << std::endl;
1703  l1ConfCode = l1ConfCode + L1GtNotValidError;
1704  errorCode = l1ConfCode;
1705 
1706  return false;
1707  }
1708 
1709  } else {
1710  LogDebug("L1GtUtils") << "\nError: no L1 trigger configuration requested to be retrieved."
1711  << "\nMust call before getL1GtRunCache in beginRun and analyze.\n"
1712  << std::endl;
1713  l1ConfCode = 300000;
1714  errorCode = l1ConfCode;
1715 
1716  return false;
1717  }
1718 }
#define LogDebug(id)
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:427
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:426
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:410
static const int L1GtNotValidError
Definition: L1GtUtils.h:330
bool m_l1EventSetupValid
Definition: L1GtUtils.h:393
const bool L1GtUtils::decision ( const edm::Event iEvent,
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 1024 of file L1GtUtils.cc.

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

Referenced by IsoTrackCalib::analyze(), IsolatedTracksNxN::analyze(), L1GtAnalyzer::analyzeL1GtUtilsCore(), L1GtAnalyzer::analyzeTrigger(), and PrescaleWeightProvider::prescaleWeight().

1024  {
1025  // initial values
1026  bool decisionBeforeMask = false;
1027  bool decisionAfterMask = false;
1028  int prescaleFactor = -1;
1029  int triggerMask = -1;
1030 
1031  errorCode = l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask, decisionAfterMask, prescaleFactor, triggerMask);
1032 
1033  return decisionAfterMask;
1034 }
const int l1Results(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:624
const int triggerMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1050
const bool decisionBeforeMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:996
const bool decisionAfterMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1010
const int prescaleFactor(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1036
const bool L1GtUtils::decisionAfterMask ( const edm::Event iEvent,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

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

Definition at line 1010 of file L1GtUtils.cc.

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

Referenced by HLTSeedL1LogicScalers::analyzeL1GtUtils(), L1GtAnalyzer::analyzeL1GtUtilsCore(), L1GtAnalyzer::analyzeTrigger(), decision(), decisionBeforeMask(), prescaleFactor(), and triggerMask().

1012  {
1013  // initial values
1014  bool decisionBeforeMask = false;
1015  bool decisionAfterMask = false;
1016  int prescaleFactor = -1;
1017  int triggerMask = -1;
1018 
1019  errorCode = l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask, decisionAfterMask, prescaleFactor, triggerMask);
1020 
1021  return decisionAfterMask;
1022 }
const int l1Results(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:624
const int triggerMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1050
const bool decisionBeforeMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:996
const bool decisionAfterMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1010
const int prescaleFactor(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1036
const bool L1GtUtils::decisionBeforeMask ( const edm::Event iEvent,
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 algorithm trigger name or alias, or technical trigger name output (by reference): error code return: the corresponding quantity

Definition at line 996 of file L1GtUtils.cc.

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

Referenced by HLTSeedL1LogicScalers::analyzeL1GtUtils(), L1GtAnalyzer::analyzeL1GtUtilsCore(), L1GtAnalyzer::analyzeTrigger(), decision(), decisionAfterMask(), l1Results(), prescaleFactor(), and triggerMask().

998  {
999  // initial values
1000  bool decisionBeforeMask = false;
1001  bool decisionAfterMask = false;
1002  int prescaleFactor = -1;
1003  int triggerMask = -1;
1004 
1005  errorCode = l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask, decisionAfterMask, prescaleFactor, triggerMask);
1006 
1007  return decisionBeforeMask;
1008 }
const int l1Results(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:624
const int triggerMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1050
const bool decisionBeforeMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:996
const bool decisionAfterMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1010
const int prescaleFactor(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1036
static void L1GtUtils::fillDescription ( edm::ParameterSetDescription desc)
inlinestatic

Definition at line 93 of file L1GtUtils.h.

References L1GtUtilsHelper::fillDescription().

static void fillDescription(edm::ParameterSetDescription &desc)
void L1GtUtils::getL1GtRunCache ( const edm::Run iRun,
const edm::EventSetup evSetup,
const bool  useL1EventSetup,
const bool  useL1GtTriggerMenuLite 
)

get all the run-constant quantities for L1 trigger and cache them

for use in beginRun(const edm::Run&, const edm::EventSetup&);

Definition at line 274 of file L1GtUtils.cc.

References m_beginRunCache, retrieveL1EventSetup(), and retrieveL1GtTriggerMenuLite().

Referenced by IsoTrackCalib::analyze(), IsolatedTracksNxN::analyze(), L1GtAnalyzer::analyzeL1GtUtils(), L1GtAnalyzer::analyzeL1GtUtilsEventSetup(), L1GtAnalyzer::analyzeL1GtUtilsMenuLite(), L1GtAnalyzer::analyzeTrigger(), L1GtAnalyzer::beginRun(), HLTPrescaleProvider::init(), HLTPrescaleProvider::prescaleSet(), HLTPrescaleProvider::prescaleValues(), and HLTPrescaleProvider::prescaleValuesInDetail().

277  {
278  // first call will turn this to true: the quantities which can be cached in
279  // beginRun will not be cached then in analyze
280  m_beginRunCache = true;
281 
282  // if requested, retrieve and cache L1 event setup
283  // keep the caching based on cacheIdentifier() for each record
284  if (useL1EventSetup) {
285  retrieveL1EventSetup(evSetup);
286  }
287 
288  // cached per run
289 
290  // if requested, retrieve and cache the L1GtTriggerMenuLite
291  // L1GtTriggerMenuLite is defined per run and produced in prompt reco by L1Reco
292  // and put in the Run section
295  }
296 }
void retrieveL1EventSetup(const edm::EventSetup &)
retrieve all the relevant L1 trigger event setup records and cache them to improve the speed ...
Definition: L1GtUtils.cc:112
static const bool useL1GtTriggerMenuLite(true)
bool m_beginRunCache
flag for call of getL1GtRunCache in beginRun
Definition: L1GtUtils.h:413
static const bool useL1EventSetup(true)
void retrieveL1GtTriggerMenuLite(const edm::Run &)
retrieve L1GtTriggerMenuLite (per run product) and cache it to improve the speed
Definition: L1GtUtils.cc:241
void L1GtUtils::getL1GtRunCache ( const edm::Event iEvent,
const edm::EventSetup evSetup,
const bool  useL1EventSetup,
const bool  useL1GtTriggerMenuLite 
)

for use in analyze(const edm::Event&, const edm::EventSetup&)

Definition at line 298 of file L1GtUtils.cc.

References edm::Event::getRun(), edm::RunAuxiliary::id(), m_beginRunCache, m_runIDCache, retrieveL1EventSetup(), retrieveL1GtTriggerMenuLite(), and edm::Run::runAuxiliary().

301  {
302  // if there was no retrieval and caching in beginRun, do it here
303  if (!m_beginRunCache) {
304  // if requested, retrieve and cache L1 event setup
305  // keep the caching based on cacheIdentifier() for each record
306  if (useL1EventSetup) {
307  retrieveL1EventSetup(evSetup);
308  }
309  }
310 
311  // cached per run
312 
313  const edm::Run& iRun = iEvent.getRun();
314  edm::RunID runID = iRun.runAuxiliary().id();
315 
316  if (runID != m_runIDCache) {
317  if (!m_beginRunCache) {
318  // if requested, retrieve and cache the L1GtTriggerMenuLite
319  // L1GtTriggerMenuLite is defined per run and produced in prompt reco by L1Reco
320  // and put in the Run section
323  }
324  }
325  m_runIDCache = runID;
326  }
327 }
edm::RunID m_runIDCache
run cache ID
Definition: L1GtUtils.h:416
Run const & getRun() const
Definition: Event.cc:108
RunID const & id() const
Definition: RunAuxiliary.h:27
void retrieveL1EventSetup(const edm::EventSetup &)
retrieve all the relevant L1 trigger event setup records and cache them to improve the speed ...
Definition: L1GtUtils.cc:112
RunAuxiliary const & runAuxiliary() const override
Definition: Run.h:61
static const bool useL1GtTriggerMenuLite(true)
bool m_beginRunCache
flag for call of getL1GtRunCache in beginRun
Definition: L1GtUtils.h:413
static const bool useL1EventSetup(true)
Definition: Run.h:45
void retrieveL1GtTriggerMenuLite(const edm::Run &)
retrieve L1GtTriggerMenuLite (per run product) and cache it to improve the speed
Definition: L1GtUtils.cc:241
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 329 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 l1Results(), L1GtUtils::LogicalExpressionL1Results::logicalExpressionRunUpdate(), pat::PATTriggerProducer::produce(), and triggerMask().

331  {
332  trigCategory = AlgorithmTrigger;
333  bitNumber = -1;
334 
336  if (m_l1GtMenuLiteValid) {
337  // test if the name is an algorithm alias
339  itTrig != m_algorithmAliasMapLite->end();
340  itTrig++) {
341  if (itTrig->second == nameAlgoTechTrig) {
342  trigCategory = AlgorithmTrigger;
343  bitNumber = itTrig->first;
344 
345  return true;
346  }
347  }
348 
349  // test if the name is an algorithm name
350  for (L1GtTriggerMenuLite::CItL1Trig itTrig = m_algorithmMapLite->begin(); itTrig != m_algorithmMapLite->end();
351  itTrig++) {
352  if (itTrig->second == nameAlgoTechTrig) {
353  trigCategory = AlgorithmTrigger;
354  bitNumber = itTrig->first;
355 
356  return true;
357  }
358  }
359 
360  // test if the name is a technical trigger
362  itTrig != m_technicalTriggerMapLite->end();
363  itTrig++) {
364  if (itTrig->second == nameAlgoTechTrig) {
365  trigCategory = TechnicalTrigger;
366  bitNumber = itTrig->first;
367 
368  return true;
369  }
370  }
371 
372  } else if (m_retrieveL1EventSetup) {
373  // test if the name is an algorithm alias
374  CItAlgo itAlgo = m_algorithmAliasMap->find(nameAlgoTechTrig);
375  if (itAlgo != m_algorithmAliasMap->end()) {
376  trigCategory = AlgorithmTrigger;
377  bitNumber = (itAlgo->second).algoBitNumber();
378 
379  return true;
380  }
381 
382  // test if the name is an algorithm name
383  itAlgo = m_algorithmMap->find(nameAlgoTechTrig);
384  if (itAlgo != m_algorithmMap->end()) {
385  trigCategory = AlgorithmTrigger;
386  bitNumber = (itAlgo->second).algoBitNumber();
387 
388  return true;
389  }
390 
391  // test if the name is a technical trigger
392  itAlgo = m_technicalTriggerMap->find(nameAlgoTechTrig);
393  if (itAlgo != m_technicalTriggerMap->end()) {
394  trigCategory = TechnicalTrigger;
395  bitNumber = (itAlgo->second).algoBitNumber();
396 
397  return true;
398  }
399 
400  } else {
401  // only L1GtTriggerMenuLite requested, but it is not valid
402  return false;
403  }
404  } else if (m_retrieveL1EventSetup) {
405  // test if the name is an algorithm alias
406  CItAlgo itAlgo = m_algorithmAliasMap->find(nameAlgoTechTrig);
407  if (itAlgo != m_algorithmAliasMap->end()) {
408  trigCategory = AlgorithmTrigger;
409  bitNumber = (itAlgo->second).algoBitNumber();
410 
411  return true;
412  }
413 
414  // test if the name is an algorithm name
415  itAlgo = m_algorithmMap->find(nameAlgoTechTrig);
416  if (itAlgo != m_algorithmMap->end()) {
417  trigCategory = AlgorithmTrigger;
418  bitNumber = (itAlgo->second).algoBitNumber();
419 
420  return true;
421  }
422 
423  // test if the name is a technical trigger
424  itAlgo = m_technicalTriggerMap->find(nameAlgoTechTrig);
425  if (itAlgo != m_technicalTriggerMap->end()) {
426  trigCategory = TechnicalTrigger;
427  bitNumber = (itAlgo->second).algoBitNumber();
428 
429  return true;
430  }
431 
432  } else {
433  // L1 trigger configuration not retrieved
434  return false;
435  }
436 
437  // all possibilities already tested, so it should not arrive here
438  return false;
439 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:427
const AlgorithmMap * m_algorithmMap
Definition: L1GtUtils.h:389
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmAliasMapLite
Definition: L1GtUtils.h:401
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmMapLite
Definition: L1GtUtils.h:400
const AlgorithmMap * m_algorithmAliasMap
Definition: L1GtUtils.h:390
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:426
L1TriggerMap::const_iterator CItL1Trig
iterators through map containing the physics algorithms or the technical triggers ...
const AlgorithmMap * m_technicalTriggerMap
Definition: L1GtUtils.h:391
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:410
const L1GtTriggerMenuLite::L1TriggerMap * m_technicalTriggerMapLite
Definition: L1GtUtils.h:402
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: 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 624 of file L1GtUtils.cc.

References AlgorithmTrigger, availableL1Configuration(), L1TBPTX_cfi::bitNumber, decisionBeforeMask(), L1GlobalTriggerReadoutRecord::decisionWord(), L1GlobalTriggerRecord::decisionWordBeforeMask(), edm::Event::getByToken(), L1GlobalTriggerReadoutRecord::gtFdlWord(), L1GlobalTriggerRecord::gtPrescaleFactorIndexAlgo(), L1GlobalTriggerRecord::gtPrescaleFactorIndexTech(), L1GtTriggerMenuLite::gtTriggerMenuImplementation(), L1GtTriggerMenu::gtTriggerMenuImplementation(), edm::HandleBase::isValid(), l1AlgoTechTrigBitNumber(), LogDebug, m_l1GtMenu, m_l1GtMenuLite, m_l1GtMenuLiteValid, m_l1GtUtilsHelper, m_physicsDaqPartition, m_prescaleFactorsAlgoTrig, m_prescaleFactorsAlgoTrigLite, m_prescaleFactorsTechTrig, m_prescaleFactorsTechTrigLite, m_retrieveL1GtTriggerMenuLite, m_triggerMaskAlgoTrig, m_triggerMaskAlgoTrigLite, m_triggerMaskTechTrig, m_triggerMaskTechTrigLite, TechnicalTrigger, L1GlobalTriggerReadoutRecord::technicalTriggerWord(), L1GlobalTriggerRecord::technicalTriggerWordBeforeMask(), triggerCategory(), and trigResult().

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

629  {
630  // initial values for returned results
631  decisionBeforeMask = false;
632  decisionAfterMask = false;
633  prescaleFactor = -1;
634  triggerMask = -1;
635 
636  // initialize error code and L1 configuration code
637  int iError = 0;
638  int l1ConfCode = 0;
639 
640  // check if L1 configuration is available
641 
642  if (!availableL1Configuration(iError, l1ConfCode)) {
643  return iError;
644  }
645 
646  // at this point, a valid L1 configuration is available, so the if/else if/else
647  // can be simplified
648 
649  // if the given name is not an algorithm trigger alias, an algorithm trigger name
650  // or a technical trigger in the current menu, return with error code 1
651 
652  TriggerCategory trigCategory = AlgorithmTrigger;
653  int bitNumber = -1;
654 
655  if (!l1AlgoTechTrigBitNumber(nameAlgoTechTrig, trigCategory, bitNumber)) {
656  iError = l1ConfCode + 1;
657 
659  if (m_l1GtMenuLiteValid) {
660  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n " << nameAlgoTechTrig
661  << "\not found in the trigger menu \n " << m_l1GtMenuLite->gtTriggerMenuImplementation()
662  << "\nretrieved from L1GtTriggerMenuLite" << std::endl;
663 
664  } else {
665  // fall through: L1 trigger configuration from event setup
666  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n " << nameAlgoTechTrig
667  << "\not found in the trigger menu \n " << m_l1GtMenu->gtTriggerMenuImplementation()
668  << "\nretrieved from Event Setup" << std::endl;
669  }
670 
671  } else {
672  // L1 trigger configuration from event setup only
673  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n " << nameAlgoTechTrig
674  << "\not found in the trigger menu \n " << m_l1GtMenu->gtTriggerMenuImplementation()
675  << "\nretrieved from Event Setup" << std::endl;
676  }
677 
678  return iError;
679  }
680 
681  // check here if a positive bit number was retrieved
682  // exit in case of negative bit number, before retrieving L1 GT products, saving time
683 
684  if (bitNumber < 0) {
685  iError = l1ConfCode + 2;
686 
688  if (m_l1GtMenuLiteValid) {
689  LogDebug("L1GtUtils") << "\nNegative bit number for " << triggerCategory(trigCategory) << "\n "
690  << nameAlgoTechTrig << "\nfrom menu \n " << m_l1GtMenuLite->gtTriggerMenuImplementation()
691  << "\nretrieved from L1GtTriggerMenuLite" << std::endl;
692 
693  } else {
694  // fall through: L1 trigger configuration from event setup
695  LogDebug("L1GtUtils") << "\nNegative bit number for " << triggerCategory(trigCategory) << "\n "
696  << nameAlgoTechTrig << "\nfrom menu \n " << m_l1GtMenu->gtTriggerMenuImplementation()
697  << "\nretrieved from Event Setup" << std::endl;
698  }
699 
700  } else {
701  // L1 trigger configuration from event setup only
702  LogDebug("L1GtUtils") << "\nNegative bit number for " << triggerCategory(trigCategory) << "\n "
703  << nameAlgoTechTrig << "\nfrom menu \n " << m_l1GtMenu->gtTriggerMenuImplementation()
704  << "\nretrieved from Event Setup" << std::endl;
705  }
706 
707  return iError;
708  }
709 
710  // retrieve L1GlobalTriggerRecord and 1GlobalTriggerReadoutRecord product
711  // intermediate error code for the records
712  // the module returns an error code only if both the lite and the readout record are missing
713 
714  int iErrorRecord = 0;
715 
716  bool validRecord = false;
717  bool gtReadoutRecordValid = false;
718 
720  if (!m_l1GtUtilsHelper->l1GtRecordToken().isUninitialized()) {
721  iEvent.getByToken(m_l1GtUtilsHelper->l1GtRecordToken(), gtRecord);
722  }
723  if (gtRecord.isValid()) {
724  validRecord = true;
725 
726  } else {
727  iErrorRecord = 10;
728  LogDebug("L1GtUtils") << "\nL1GlobalTriggerRecord with \n " << m_l1GtUtilsHelper->l1GtRecordInputTag()
729  << "\nnot found in the event." << std::endl;
730  }
731 
733  if (!m_l1GtUtilsHelper->l1GtReadoutRecordToken().isUninitialized()) {
734  iEvent.getByToken(m_l1GtUtilsHelper->l1GtReadoutRecordToken(), gtReadoutRecord);
735  }
736  if (gtReadoutRecord.isValid()) {
737  gtReadoutRecordValid = true;
738  validRecord = true;
739 
740  } else {
741  iErrorRecord = iErrorRecord + 100;
742  LogDebug("L1GtUtils") << "\nL1GlobalTriggerReadoutRecord with \n "
743  << m_l1GtUtilsHelper->l1GtReadoutRecordInputTag() << "\nnot found in the event." << std::endl;
744  }
745 
746  // get the prescale factor index from
747  // L1GlobalTriggerReadoutRecord if valid
748  // if not, from L1GlobalTriggerRecord if valid
749  // else return an error
750 
751  int pfIndexTechTrig = -1;
752  int pfIndexAlgoTrig = -1;
753 
754  if (validRecord) {
755  if (gtReadoutRecordValid) {
756  pfIndexTechTrig = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexTech();
757  pfIndexAlgoTrig = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexAlgo();
758 
759  } else {
760  pfIndexTechTrig = static_cast<int>(gtRecord->gtPrescaleFactorIndexTech());
761  pfIndexAlgoTrig = static_cast<int>(gtRecord->gtPrescaleFactorIndexAlgo());
762  }
763 
764  } else {
765  LogDebug("L1GtUtils") << "\nError: "
766  << "\nNo valid L1GlobalTriggerRecord with \n " << m_l1GtUtilsHelper->l1GtRecordInputTag()
767  << "\nfound in the event."
768  << "\nNo valid L1GlobalTriggerReadoutRecord with \n "
769  << m_l1GtUtilsHelper->l1GtReadoutRecordInputTag() << "\nfound in the event." << std::endl;
770 
771  iError = l1ConfCode + iErrorRecord;
772  return iError;
773  }
774 
775  // depending on trigger category (algorithm trigger or technical trigger)
776  // get the correct quantities
777 
778  // number of sets of prescale factors
779  // index of prescale factor set retrieved from data
780  // pointer to the actual prescale factor set
781  // pointer to the set of trigger masks
782 
783  size_t pfSetsSize = 0;
784  int pfIndex = -1;
785  const std::vector<int>* prescaleFactorsSubset = nullptr;
786  const std::vector<unsigned int>* triggerMasksSet = nullptr;
787 
788  switch (trigCategory) {
789  case AlgorithmTrigger: {
791  if (m_l1GtMenuLiteValid) {
792  pfSetsSize = m_prescaleFactorsAlgoTrigLite->size();
793  triggerMasksSet = m_triggerMaskAlgoTrigLite;
794 
795  } else {
796  // fall through: L1 trigger configuration from event setup
797  pfSetsSize = m_prescaleFactorsAlgoTrig->size();
798  triggerMasksSet = m_triggerMaskAlgoTrig;
799  }
800 
801  } else {
802  // L1 trigger configuration from event setup only
803  pfSetsSize = m_prescaleFactorsAlgoTrig->size();
804  triggerMasksSet = m_triggerMaskAlgoTrig;
805  }
806 
807  pfIndex = pfIndexAlgoTrig;
808 
809  } break;
810  case TechnicalTrigger: {
812  if (m_l1GtMenuLiteValid) {
813  pfSetsSize = m_prescaleFactorsTechTrigLite->size();
814  triggerMasksSet = m_triggerMaskTechTrigLite;
815 
816  } else {
817  // fall through: L1 trigger configuration from event setup
818  pfSetsSize = m_prescaleFactorsTechTrig->size();
819  triggerMasksSet = m_triggerMaskTechTrig;
820  }
821 
822  } else {
823  // L1 trigger configuration from event setup only
824  pfSetsSize = m_prescaleFactorsTechTrig->size();
825  triggerMasksSet = m_triggerMaskTechTrig;
826  }
827 
828  pfIndex = pfIndexTechTrig;
829 
830  } break;
831  default: {
832  // should not be the case
833  iError = l1ConfCode + iErrorRecord + 3;
834  return iError;
835 
836  } break;
837  }
838 
839  // test prescale factor set index correctness, then retrieve the actual set of prescale factors
840 
841  if (pfIndex < 0) {
842  iError = l1ConfCode + iErrorRecord + 1000;
843  LogDebug("L1GtUtils") << "\nError: index of prescale factor set retrieved from the data \n"
844  << "less than zero."
845  << "\n Value of index retrieved from data = " << pfIndex << std::endl;
846 
847  return iError;
848 
849  } else if (pfIndex >= (static_cast<int>(pfSetsSize))) {
850  iError = l1ConfCode + iErrorRecord + 2000;
851  LogDebug("L1GtUtils") << "\nError: index of prescale factor set retrieved from the data \n"
852  << "greater than the size of the vector of prescale factor sets."
853  << "\n Value of index retrieved from data = " << pfIndex
854  << "\n Vector size = " << pfSetsSize << std::endl;
855 
856  return iError;
857 
858  } else {
859  switch (trigCategory) {
860  case AlgorithmTrigger: {
862  if (m_l1GtMenuLiteValid) {
863  prescaleFactorsSubset = &((*m_prescaleFactorsAlgoTrigLite).at(pfIndex));
864 
865  } else {
866  // fall through: L1 trigger configuration from event setup
867  prescaleFactorsSubset = &((*m_prescaleFactorsAlgoTrig).at(pfIndex));
868  }
869 
870  } else {
871  // L1 trigger configuration from event setup only
872  prescaleFactorsSubset = &((*m_prescaleFactorsAlgoTrig).at(pfIndex));
873  }
874 
875  } break;
876  case TechnicalTrigger: {
878  if (m_l1GtMenuLiteValid) {
879  prescaleFactorsSubset = &((*m_prescaleFactorsTechTrigLite).at(pfIndex));
880 
881  } else {
882  // fall through: L1 trigger configuration from event setup
883  prescaleFactorsSubset = &((*m_prescaleFactorsTechTrig).at(pfIndex));
884  }
885 
886  } else {
887  // L1 trigger configuration from event setup only
888  prescaleFactorsSubset = &((*m_prescaleFactorsTechTrig).at(pfIndex));
889  }
890 
891  } break;
892  default: {
893  // do nothing - it was tested before, with return
894 
895  } break;
896  }
897  }
898 
899  // algorithm result before applying the trigger masks
900  // the bit number is positive (tested previously)
901 
902  switch (trigCategory) {
903  case AlgorithmTrigger: {
904  if (gtReadoutRecordValid) {
905  const DecisionWord& decWord = gtReadoutRecord->decisionWord();
906  decisionBeforeMask = trigResult(decWord, bitNumber, nameAlgoTechTrig, trigCategory, iError);
907  if (iError) {
908  return (iError + l1ConfCode + iErrorRecord);
909  }
910 
911  } else {
912  const DecisionWord& decWord = gtRecord->decisionWordBeforeMask();
913  decisionBeforeMask = trigResult(decWord, bitNumber, nameAlgoTechTrig, trigCategory, iError);
914  if (iError) {
915  return (iError + l1ConfCode + iErrorRecord);
916  }
917  }
918 
919  } break;
920  case TechnicalTrigger: {
921  if (gtReadoutRecordValid) {
922  const DecisionWord& decWord = gtReadoutRecord->technicalTriggerWord();
923  decisionBeforeMask = trigResult(decWord, bitNumber, nameAlgoTechTrig, trigCategory, iError);
924  if (iError) {
925  return (iError + l1ConfCode + iErrorRecord);
926  }
927 
928  } else {
929  const DecisionWord& decWord = gtRecord->technicalTriggerWordBeforeMask();
930  decisionBeforeMask = trigResult(decWord, bitNumber, nameAlgoTechTrig, trigCategory, iError);
931  if (iError) {
932  return (iError + l1ConfCode + iErrorRecord);
933  }
934  }
935 
936  } break;
937  default: {
938  // do nothing - it was tested before, with return
939 
940  } break;
941  }
942 
943  // prescale factor
944  // the bit number is positive (tested previously)
945 
946  if (bitNumber < (static_cast<int>(prescaleFactorsSubset->size()))) {
947  prescaleFactor = (*prescaleFactorsSubset)[bitNumber];
948  } else {
949  iError = l1ConfCode + iErrorRecord + 4000;
950  LogDebug("L1GtUtils") << "\nError: bit number " << bitNumber << " retrieved for " << triggerCategory(trigCategory)
951  << "\n " << nameAlgoTechTrig << "\ngreater than size of actual L1 GT prescale factor set: "
952  << prescaleFactorsSubset->size() << "\nError: Inconsistent L1 trigger configuration!"
953  << std::endl;
954 
955  return iError;
956  }
957 
958  // trigger mask and trigger result after applying the trigger masks
959 
960  if (bitNumber < (static_cast<int>((*triggerMasksSet).size()))) {
962  if (m_l1GtMenuLiteValid) {
963  triggerMask = (*triggerMasksSet)[bitNumber];
964 
965  } else {
966  // fall through: L1 trigger configuration from event setup
967  // masks in event setup are for all partitions
968  triggerMask = ((*triggerMasksSet)[bitNumber]) & (1 << m_physicsDaqPartition);
969  }
970 
971  } else {
972  // L1 trigger configuration from event setup only
973  // masks in event setup are for all partitions
974  triggerMask = ((*triggerMasksSet)[bitNumber]) & (1 << m_physicsDaqPartition);
975  }
976 
977  } else {
978  iError = l1ConfCode + iErrorRecord + 5000;
979  LogDebug("L1GtUtils") << "\nError: bit number " << bitNumber << " retrieved for " << triggerCategory(trigCategory)
980  << "\n " << nameAlgoTechTrig
981  << "\ngreater than size of L1 GT trigger mask set: " << (*triggerMasksSet).size()
982  << "\nError: Inconsistent L1 trigger configuration!" << std::endl;
983 
984  return iError;
985  }
986 
988 
989  if (triggerMask) {
990  decisionAfterMask = false;
991  }
992 
993  return iError;
994 }
#define LogDebug(id)
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:427
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
Definition: L1GtUtils.h:379
const TechnicalTriggerWord & technicalTriggerWord(int bxInEventValue) const
const std::vector< unsigned int > * m_triggerMaskTechTrig
Definition: L1GtUtils.h:380
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
const bool l1AlgoTechTrigBitNumber(const std::string &nameAlgoTechTrig, TriggerCategory &trigCategory, int &bitNumber) const
Definition: L1GtUtils.cc:329
TriggerCategory
Definition: L1GtUtils.h:96
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:1637
const DecisionWord decisionWordBeforeMask() const
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrigLite
Definition: L1GtUtils.h:407
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
Definition: L1GtUtils.h:364
const std::string & gtTriggerMenuImplementation() const
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
Definition: L1GtUtils.h:363
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrigLite
Definition: L1GtUtils.h:408
std::vector< bool > DecisionWord
typedefs
const std::string triggerCategory(const TriggerCategory &) const
public methods
Definition: L1GtUtils.cc:98
const unsigned int gtPrescaleFactorIndexAlgo() const
bool isValid() const
Definition: HandleBase.h:70
unsigned int m_physicsDaqPartition
index of physics DAQ partition
Definition: L1GtUtils.h:420
const DecisionWord & decisionWord(int bxInEventValue) const
const int triggerMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1050
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:398
const bool decisionBeforeMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:996
const L1GtFdlWord gtFdlWord(int bxInEventValue) const
get / set FDL word (record) in the GT readout record
std::unique_ptr< L1GtUtilsHelper > m_l1GtUtilsHelper
Definition: L1GtUtils.h:429
const std::vector< unsigned int > * m_triggerMaskTechTrigLite
Definition: L1GtUtils.h:405
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:410
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
Definition: L1GtUtils.h:404
const bool trigResult(const DecisionWord &decWord, const int bitNumber, const std::string &nameAlgoTechTrig, const TriggerCategory &trigCategory, int &errorCode) const
Definition: L1GtUtils.cc:1722
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:386
const TechnicalTriggerWord technicalTriggerWordBeforeMask() const
const unsigned int gtPrescaleFactorIndexTech() const
get/set index of the set of prescale factors
const bool decisionAfterMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1010
const std::string & gtTriggerMenuImplementation() const
const int prescaleFactor(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1036
const std::string & L1GtUtils::l1TriggerMenu ( ) const

return the L1 trigger menu name

Definition at line 1535 of file L1GtUtils.cc.

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

Referenced by L1MenuTreeProducer::analyze(), L1GtAnalyzer::analyzeL1GtUtilsCore(), L1GtAnalyzer::analyzeTrigger(), and L1Analysis::L1AnalysisL1Menu::SetPrescaleFactorIndex().

1535  {
1537  if (m_l1GtMenuLiteValid) {
1539 
1540  } else if (m_retrieveL1EventSetup) {
1541  return m_l1GtMenu->gtTriggerMenuName();
1542 
1543  } else {
1544  // only L1GtTriggerMenuLite requested, but it is not valid
1545  return EmptyString;
1546  }
1547  } else if (m_retrieveL1EventSetup) {
1548  return m_l1GtMenu->gtTriggerMenuName();
1549 
1550  } else {
1551  // L1 trigger configuration not retrieved
1552  return EmptyString;
1553  }
1554 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:427
const std::string & gtTriggerMenuName() const
const std::string & gtTriggerMenuName() const
static const std::string EmptyString
Definition: L1GtUtils.h:329
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:426
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:398
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:410
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:386
const std::string & L1GtUtils::l1TriggerMenuImplementation ( ) const

return the L1 trigger menu implementation

Definition at line 1556 of file L1GtUtils.cc.

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

Referenced by L1MenuTreeProducer::analyze(), L1GtAnalyzer::analyzeL1GtUtilsCore(), and L1GtAnalyzer::analyzeTrigger().

1556  {
1558  if (m_l1GtMenuLiteValid) {
1560 
1561  } else if (m_retrieveL1EventSetup) {
1563 
1564  } else {
1565  // only L1GtTriggerMenuLite requested, but it is not valid
1566  return EmptyString;
1567  }
1568  } else if (m_retrieveL1EventSetup) {
1570 
1571  } else {
1572  // L1 trigger configuration not retrieved
1573  return EmptyString;
1574  }
1575 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:427
const std::string & gtTriggerMenuImplementation() const
static const std::string EmptyString
Definition: L1GtUtils.h:329
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:426
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:398
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:410
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:386
const std::string & gtTriggerMenuImplementation() const
const bool L1GtUtils::l1TriggerNameFromBit ( const int &  bitNumber,
const TriggerCategory trigCategory,
std::string &  aliasL1Trigger,
std::string &  nameL1Trigger 
) const

return the trigger name and alias for a given trigger category and a given bit number

in case no algorithm trigger / technical trigger is defined for that bit in the menu, the returned function is false, and the name and the alias is empty

Definition at line 441 of file L1GtUtils.cc.

References HIPAlignmentAlgorithm_cfi::algoName, AlgorithmTrigger, L1TBPTX_cfi::bitNumber, m_algorithmAliasMap, m_algorithmAliasMapLite, m_algorithmMapLite, m_l1GtMenuLiteValid, m_retrieveL1EventSetup, m_retrieveL1GtTriggerMenuLite, m_technicalTriggerMap, m_technicalTriggerMapLite, and TechnicalTrigger.

Referenced by L1GtUtils::LogicalExpressionL1Results::logicalExpressionRunUpdate().

444  {
445  aliasL1Trigger.clear();
446  nameL1Trigger.clear();
447 
449  if (m_l1GtMenuLiteValid) {
450  // for an algorithm trigger
451  if (trigCategory == AlgorithmTrigger) {
452  bool trigAliasFound = false;
453  bool trigNameFound = false;
454 
456  itTrig != m_algorithmAliasMapLite->end();
457  itTrig++) {
458  if (static_cast<int>(itTrig->first) == bitNumber) {
459  aliasL1Trigger = itTrig->second;
460  trigAliasFound = true;
461  break;
462  }
463  }
464 
465  for (L1GtTriggerMenuLite::CItL1Trig itTrig = m_algorithmMapLite->begin(); itTrig != m_algorithmMapLite->end();
466  itTrig++) {
467  if (static_cast<int>(itTrig->first) == bitNumber) {
468  nameL1Trigger = itTrig->second;
469  trigNameFound = true;
470  break;
471  }
472  }
473 
474  if (!(trigAliasFound && trigNameFound)) {
475  return false;
476  }
477 
478  return true;
479 
480  } else if (trigCategory == TechnicalTrigger) {
481  // for a technical trigger
482 
483  bool trigNameFound = false;
484 
486  itTrig != m_technicalTriggerMapLite->end();
487  itTrig++) {
488  if (static_cast<int>(itTrig->first) == bitNumber) {
489  nameL1Trigger = itTrig->second;
490 
491  // technically, no alias is defined for technical triggers
492  // users use mainly aliases, so just return the name here
493  aliasL1Trigger = itTrig->second;
494 
495  trigNameFound = true;
496  break;
497  }
498  }
499 
500  if (!(trigNameFound)) {
501  return false;
502  }
503 
504  return true;
505 
506  } else {
507  // non-existing trigger category...
508  return false;
509  }
510 
511  } else if (m_retrieveL1EventSetup) {
512  // for an algorithm trigger
513  if (trigCategory == AlgorithmTrigger) {
514  bool trigAliasFound = false;
515 
516  for (CItAlgo itTrig = m_algorithmAliasMap->begin(); itTrig != m_algorithmAliasMap->end(); itTrig++) {
517  if ((itTrig->second).algoBitNumber() == bitNumber) {
518  aliasL1Trigger = itTrig->first;
519  // get the name here, avoiding a loop on m_algorithmMap
520  nameL1Trigger = (itTrig->second).algoName();
521 
522  trigAliasFound = true;
523  break;
524  }
525  }
526 
527  if (!(trigAliasFound)) {
528  return false;
529  }
530 
531  return true;
532 
533  } else if (trigCategory == TechnicalTrigger) {
534  // for a technical trigger
535 
536  bool trigNameFound = false;
537 
538  for (CItAlgo itTrig = m_technicalTriggerMap->begin(); itTrig != m_technicalTriggerMap->end(); itTrig++) {
539  if ((itTrig->second).algoBitNumber() == bitNumber) {
540  nameL1Trigger = (itTrig->second).algoName();
541  // technically, no alias is defined for technical triggers
542  // users use mainly aliases, so just return the name here
543  aliasL1Trigger = nameL1Trigger;
544 
545  trigNameFound = true;
546  break;
547  }
548  }
549 
550  if (!(trigNameFound)) {
551  return false;
552  }
553 
554  return true;
555 
556  } else {
557  // non-existing trigger category...
558  return false;
559  }
560 
561  } else {
562  // only L1GtTriggerMenuLite requested, but it is not valid
563  return false;
564  }
565  } else if (m_retrieveL1EventSetup) {
566  // for an algorithm trigger
567  if (trigCategory == AlgorithmTrigger) {
568  bool trigAliasFound = false;
569 
570  for (CItAlgo itTrig = m_algorithmAliasMap->begin(); itTrig != m_algorithmAliasMap->end(); itTrig++) {
571  if ((itTrig->second).algoBitNumber() == bitNumber) {
572  aliasL1Trigger = itTrig->first;
573  // get the name here, avoiding a loop on m_algorithmMap
574  nameL1Trigger = (itTrig->second).algoName();
575 
576  trigAliasFound = true;
577  break;
578  }
579  }
580 
581  if (!(trigAliasFound)) {
582  return false;
583  }
584 
585  return true;
586 
587  } else if (trigCategory == TechnicalTrigger) {
588  // for a technical trigger
589 
590  bool trigNameFound = false;
591 
592  for (CItAlgo itTrig = m_technicalTriggerMap->begin(); itTrig != m_technicalTriggerMap->end(); itTrig++) {
593  if ((itTrig->second).algoBitNumber() == bitNumber) {
594  nameL1Trigger = (itTrig->second).algoName();
595  // technically, no alias is defined for technical triggers
596  // users use mainly aliases, so just return the name here
597  aliasL1Trigger = itTrig->first;
598 
599  trigNameFound = true;
600  break;
601  }
602  }
603 
604  if (!(trigNameFound)) {
605  return false;
606  }
607 
608  return true;
609 
610  } else {
611  // non-existing trigger category...
612  return false;
613  }
614 
615  } else {
616  // L1 trigger configuration not retrieved
617  return false;
618  }
619 
620  // all possibilities already tested, so it should not arrive here
621  return false;
622 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:427
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmAliasMapLite
Definition: L1GtUtils.h:401
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmMapLite
Definition: L1GtUtils.h:400
const AlgorithmMap * m_algorithmAliasMap
Definition: L1GtUtils.h:390
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:426
L1TriggerMap::const_iterator CItL1Trig
iterators through map containing the physics algorithms or the technical triggers ...
const AlgorithmMap * m_technicalTriggerMap
Definition: L1GtUtils.h:391
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:410
const L1GtTriggerMenuLite::L1TriggerMap * m_technicalTriggerMapLite
Definition: L1GtUtils.h:402
const int L1GtUtils::prescaleFactor ( const edm::Event iEvent,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

return prescale factor for a given algorithm or technical trigger

Definition at line 1036 of file L1GtUtils.cc.

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

Referenced by HLTInfo::analyze(), IsolatedTracksNxN::analyze(), L1GtAnalyzer::analyzeL1GtUtilsCore(), L1GtAnalyzer::analyzeTrigger(), decision(), decisionAfterMask(), decisionBeforeMask(), HLTPrescaleProvider::prescaleValues(), PrescaleWeightProvider::prescaleWeight(), and triggerMask().

1038  {
1039  // initial values
1040  bool decisionBeforeMask = false;
1041  bool decisionAfterMask = false;
1042  int prescaleFactor = -1;
1043  int triggerMask = -1;
1044 
1045  errorCode = l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask, decisionAfterMask, prescaleFactor, triggerMask);
1046 
1047  return prescaleFactor;
1048 }
const int l1Results(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:624
const int triggerMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1050
const bool decisionBeforeMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:996
const bool decisionAfterMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1010
const int prescaleFactor(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1036
const std::vector< int > & L1GtUtils::prescaleFactorSet ( const edm::Event iEvent,
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 1399 of file L1GtUtils.cc.

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

Referenced by L1GtAnalyzer::analyzeL1GtUtilsCore().

1401  {
1402  // clear the vector before filling it
1403  m_prescaleFactorSet.clear();
1404 
1405  // initialize error code
1406  int iError = 0;
1407 
1408  const int pfIndex = prescaleFactorSetIndex(iEvent, trigCategory, iError);
1409 
1410  if (iError == 0) {
1411  switch (trigCategory) {
1412  case AlgorithmTrigger: {
1414  if (m_l1GtMenuLiteValid) {
1415  m_prescaleFactorSet = (*m_prescaleFactorsAlgoTrigLite).at(pfIndex);
1416 
1417  } else {
1418  // fall through: L1 trigger configuration from event setup
1419  m_prescaleFactorSet = (*m_prescaleFactorsAlgoTrig).at(pfIndex);
1420  }
1421 
1422  } else {
1423  // L1 trigger configuration from event setup only
1424  m_prescaleFactorSet = (*m_prescaleFactorsAlgoTrig).at(pfIndex);
1425  }
1426 
1427  } break;
1428  case TechnicalTrigger: {
1430  if (m_l1GtMenuLiteValid) {
1431  m_prescaleFactorSet = (*m_prescaleFactorsTechTrigLite).at(pfIndex);
1432 
1433  } else {
1434  // fall through: L1 trigger configuration from event setup
1435  m_prescaleFactorSet = (*m_prescaleFactorsTechTrig).at(pfIndex);
1436  }
1437 
1438  } else {
1439  // L1 trigger configuration from event setup only
1440  m_prescaleFactorSet = (*m_prescaleFactorsTechTrig).at(pfIndex);
1441  }
1442 
1443  } break;
1444  default: {
1445  // do nothing - it was tested before, with return
1446 
1447  } break;
1448  }
1449  }
1450 
1451  errorCode = iError;
1452  return m_prescaleFactorSet;
1453 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:427
const int prescaleFactorSetIndex(const edm::Event &iEvent, const TriggerCategory &trigCategory, int &errorCode) const
Definition: L1GtUtils.cc:1227
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:410
std::vector< int > m_prescaleFactorSet
Definition: L1GtUtils.h:423
const int L1GtUtils::prescaleFactorSetIndex ( const edm::Event iEvent,
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 1227 of file L1GtUtils.cc.

References AlgorithmTrigger, availableL1Configuration(), edm::Event::getByToken(), L1GlobalTriggerReadoutRecord::gtFdlWord(), L1GlobalTriggerRecord::gtPrescaleFactorIndexAlgo(), L1GlobalTriggerRecord::gtPrescaleFactorIndexTech(), edm::HandleBase::isValid(), LogDebug, m_l1GtMenuLiteValid, m_l1GtUtilsHelper, m_prescaleFactorsAlgoTrig, m_prescaleFactorsAlgoTrigLite, m_prescaleFactorsTechTrig, m_prescaleFactorsTechTrigLite, m_retrieveL1GtTriggerMenuLite, and TechnicalTrigger.

Referenced by HLTInfo::analyze(), L1GtAnalyzer::analyzeL1GtUtilsCore(), prescaleFactorSet(), HLTPrescaleProvider::prescaleSet(), and L1Analysis::L1AnalysisL1Menu::SetPrescaleFactorIndex().

1229  {
1230  // initialize the index to a negative value
1231  int pfIndex = -1;
1232 
1233  // initialize error code and L1 configuration code
1234  int iError = 0;
1235  int l1ConfCode = 0;
1236 
1237  // check if L1 configuration is available
1238 
1239  if (!availableL1Configuration(iError, l1ConfCode)) {
1240  errorCode = iError;
1241  return pfIndex;
1242  }
1243 
1244  // at this point, a valid L1 configuration is available, so the if/else if/else
1245  // can be simplified
1246 
1247  // retrieve L1GlobalTriggerRecord and 1GlobalTriggerReadoutRecord product
1248  // intermediate error code for the records
1249  // the module returns an error code only if both the lite and the readout record are missing
1250 
1251  int iErrorRecord = 0;
1252 
1253  bool validRecord = false;
1254  bool gtReadoutRecordValid = false;
1255 
1257  if (!m_l1GtUtilsHelper->l1GtRecordToken().isUninitialized()) {
1258  iEvent.getByToken(m_l1GtUtilsHelper->l1GtRecordToken(), gtRecord);
1259  }
1260  if (gtRecord.isValid()) {
1261  validRecord = true;
1262 
1263  } else {
1264  iErrorRecord = 10;
1265  LogDebug("L1GtUtils") << "\nL1GlobalTriggerRecord with \n " << m_l1GtUtilsHelper->l1GtRecordInputTag()
1266  << "\nnot found in the event." << std::endl;
1267  }
1268 
1270  if (!m_l1GtUtilsHelper->l1GtReadoutRecordToken().isUninitialized()) {
1271  iEvent.getByToken(m_l1GtUtilsHelper->l1GtReadoutRecordToken(), gtReadoutRecord);
1272  }
1273  if (gtReadoutRecord.isValid()) {
1274  gtReadoutRecordValid = true;
1275  validRecord = true;
1276 
1277  } else {
1278  iErrorRecord = iErrorRecord + 100;
1279  LogDebug("L1GtUtils") << "\nL1GlobalTriggerReadoutRecord with \n "
1280  << m_l1GtUtilsHelper->l1GtReadoutRecordInputTag() << "\nnot found in the event." << std::endl;
1281  }
1282 
1283  // get the prescale factor index from
1284  // L1GlobalTriggerReadoutRecord if valid
1285  // if not, from L1GlobalTriggerRecord if valid
1286  // else return an error
1287 
1288  int pfIndexTechTrig = -1;
1289  int pfIndexAlgoTrig = -1;
1290 
1291  if (validRecord) {
1292  if (gtReadoutRecordValid) {
1293  pfIndexTechTrig = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexTech();
1294  pfIndexAlgoTrig = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexAlgo();
1295 
1296  } else {
1297  pfIndexTechTrig = static_cast<int>(gtRecord->gtPrescaleFactorIndexTech());
1298  pfIndexAlgoTrig = static_cast<int>(gtRecord->gtPrescaleFactorIndexAlgo());
1299  }
1300 
1301  } else {
1302  LogDebug("L1GtUtils") << "\nError: "
1303  << "\nNo valid L1GlobalTriggerRecord with \n " << m_l1GtUtilsHelper->l1GtRecordInputTag()
1304  << "\nfound in the event."
1305  << "\nNo valid L1GlobalTriggerReadoutRecord with \n "
1306  << m_l1GtUtilsHelper->l1GtReadoutRecordInputTag() << "\nfound in the event." << std::endl;
1307 
1308  iError = l1ConfCode + iErrorRecord;
1309 
1310  errorCode = iError;
1311  return pfIndex;
1312  }
1313 
1314  // depending on trigger category (algorithm trigger or technical trigger)
1315  // get the correct quantities
1316 
1317  // number of sets of prescale factors
1318  // index of prescale factor set retrieved from data
1319  // pointer to the actual prescale factor set
1320  // pointer to the set of trigger masks
1321 
1322  size_t pfSetsSize = 0;
1323 
1324  switch (trigCategory) {
1325  case AlgorithmTrigger: {
1327  if (m_l1GtMenuLiteValid) {
1328  pfSetsSize = m_prescaleFactorsAlgoTrigLite->size();
1329 
1330  } else {
1331  // fall through: L1 trigger configuration from event setup
1332  pfSetsSize = m_prescaleFactorsAlgoTrig->size();
1333  }
1334 
1335  } else {
1336  // L1 trigger configuration from event setup only
1337  pfSetsSize = m_prescaleFactorsAlgoTrig->size();
1338  }
1339 
1340  pfIndex = pfIndexAlgoTrig;
1341 
1342  } break;
1343  case TechnicalTrigger: {
1345  if (m_l1GtMenuLiteValid) {
1346  pfSetsSize = m_prescaleFactorsTechTrigLite->size();
1347 
1348  } else {
1349  // fall through: L1 trigger configuration from event setup
1350  pfSetsSize = m_prescaleFactorsTechTrig->size();
1351  }
1352 
1353  } else {
1354  // L1 trigger configuration from event setup only
1355  pfSetsSize = m_prescaleFactorsTechTrig->size();
1356  }
1357 
1358  pfIndex = pfIndexTechTrig;
1359 
1360  } break;
1361  default: {
1362  // should not be the case
1363  iError = l1ConfCode + iErrorRecord + 3;
1364  return iError;
1365 
1366  } break;
1367  }
1368 
1369  // test prescale factor set index correctness, then retrieve the actual set of prescale factors
1370 
1371  if (pfIndex < 0) {
1372  iError = l1ConfCode + iErrorRecord + 1000;
1373  LogDebug("L1GtUtils") << "\nError: index of prescale factor set retrieved from the data \n"
1374  << "less than zero."
1375  << "\n Value of index retrieved from data = " << pfIndex << std::endl;
1376 
1377  errorCode = iError;
1378  return pfIndex;
1379 
1380  } else if (pfIndex >= (static_cast<int>(pfSetsSize))) {
1381  iError = l1ConfCode + iErrorRecord + 2000;
1382  LogDebug("L1GtUtils") << "\nError: index of prescale factor set retrieved from the data \n"
1383  << "greater than the size of the vector of prescale factor sets."
1384  << "\n Value of index retrieved from data = " << pfIndex
1385  << "\n Vector size = " << pfSetsSize << std::endl;
1386 
1387  errorCode = iError;
1388  return pfIndex;
1389 
1390  } else {
1391  errorCode = iError;
1392  return pfIndex;
1393  }
1394 
1395  errorCode = iError;
1396  return pfIndex;
1397 }
#define LogDebug(id)
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:427
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:1637
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrigLite
Definition: L1GtUtils.h:407
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
Definition: L1GtUtils.h:364
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
Definition: L1GtUtils.h:363
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrigLite
Definition: L1GtUtils.h:408
const unsigned int gtPrescaleFactorIndexAlgo() const
bool isValid() const
Definition: HandleBase.h:70
const L1GtFdlWord gtFdlWord(int bxInEventValue) const
get / set FDL word (record) in the GT readout record
std::unique_ptr< L1GtUtilsHelper > m_l1GtUtilsHelper
Definition: L1GtUtils.h:429
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:410
const unsigned int gtPrescaleFactorIndexTech() const
get/set index of the set of prescale factors
const L1GtTriggerMenuLite * L1GtUtils::ptrL1GtTriggerMenuLite ( int &  errorCode)

return a pointer to the L1GtTriggerMenuLite product

Definition at line 1603 of file L1GtUtils.cc.

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

1603  {
1604  // initialize error code and return value
1605  int iError = 0;
1606  int l1ConfCode = 0;
1607 
1608  // check if L1 configuration is available
1609 
1610  if (!availableL1Configuration(iError, l1ConfCode)) {
1611  errorCode = iError;
1612  return nullptr;
1613  }
1614 
1616  if (m_l1GtMenuLiteValid) {
1617  errorCode = iError;
1618  return m_l1GtMenuLite;
1619 
1620  } else {
1621  iError = l1ConfCode;
1622 
1623  errorCode = iError;
1624  return nullptr;
1625  }
1626  } else {
1627  iError = l1ConfCode;
1628 
1629  errorCode = iError;
1630  return nullptr;
1631  }
1632 
1633  errorCode = iError;
1634  return m_l1GtMenuLite;
1635 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:427
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:1637
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:398
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:410
const L1GtTriggerMenu * L1GtUtils::ptrL1TriggerMenuEventSetup ( int &  errorCode)

return a pointer to the L1 trigger menu from event setup

Definition at line 1577 of file L1GtUtils.cc.

References availableL1Configuration(), m_l1GtMenu, and m_retrieveL1EventSetup.

Referenced by IsolatedTracksNxN::analyze(), and IsoTrackCalib::beginRun().

1577  {
1578  // initialize error code and return value
1579  int iError = 0;
1580  int l1ConfCode = 0;
1581 
1582  // check if L1 configuration is available
1583 
1584  if (!availableL1Configuration(iError, l1ConfCode)) {
1585  errorCode = iError;
1586  return nullptr;
1587  }
1588 
1589  if (m_retrieveL1EventSetup) {
1590  errorCode = iError;
1591  return m_l1GtMenu;
1592  } else {
1593  iError = l1ConfCode;
1594 
1595  errorCode = iError;
1596  return nullptr;
1597  }
1598 
1599  errorCode = iError;
1600  return m_l1GtMenu;
1601 }
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:1637
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:426
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:386
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 112 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, SiStripPI::max, and edm::ESHandle< T >::product().

Referenced by HLTSeedL1LogicScalers::analyze(), L1MenuTreeProducer::analyze(), L1TRate_Offline::bookHistograms(), L1TRate::bookHistograms(), L1TSync::bookHistograms(), L1TSync_Offline::bookHistograms(), and getL1GtRunCache().

112  {
113  //
114  m_retrieveL1EventSetup = true;
115 
116  m_l1EventSetupValid = true;
117  // FIXME test for each record if valid; if not set m_l1EventSetupValid = false;
118 
119  // get / update the stable parameters from the EventSetup
120  // local cache & check on cacheIdentifier
121 
122  unsigned long long l1GtStableParCacheID = evSetup.get<L1GtStableParametersRcd>().cacheIdentifier();
123 
124  if (m_l1GtStableParCacheID != l1GtStableParCacheID) {
126  evSetup.get<L1GtStableParametersRcd>().get(l1GtStablePar);
127  m_l1GtStablePar = l1GtStablePar.product();
128 
129  // number of algorithm triggers
131 
132  // number of technical triggers
134 
136 
137  m_triggerMaskSet.reserve(maxNumberTrigger);
138  m_prescaleFactorSet.reserve(maxNumberTrigger);
139 
140  //
141  m_l1GtStableParCacheID = l1GtStableParCacheID;
142  }
143 
144  // get / update the prescale factors from the EventSetup
145  // local cache & check on cacheIdentifier
146 
147  unsigned long long l1GtPfAlgoCacheID = evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().cacheIdentifier();
148 
149  if (m_l1GtPfAlgoCacheID != l1GtPfAlgoCacheID) {
151  evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().get(l1GtPfAlgo);
152  m_l1GtPfAlgo = l1GtPfAlgo.product();
153 
155 
156  m_l1GtPfAlgoCacheID = l1GtPfAlgoCacheID;
157  }
158 
159  unsigned long long l1GtPfTechCacheID = evSetup.get<L1GtPrescaleFactorsTechTrigRcd>().cacheIdentifier();
160 
161  if (m_l1GtPfTechCacheID != l1GtPfTechCacheID) {
163  evSetup.get<L1GtPrescaleFactorsTechTrigRcd>().get(l1GtPfTech);
164  m_l1GtPfTech = l1GtPfTech.product();
165 
167 
168  m_l1GtPfTechCacheID = l1GtPfTechCacheID;
169  }
170 
171  // get / update the trigger mask from the EventSetup
172  // local cache & check on cacheIdentifier
173 
174  unsigned long long l1GtTmAlgoCacheID = evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().cacheIdentifier();
175 
176  if (m_l1GtTmAlgoCacheID != l1GtTmAlgoCacheID) {
178  evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().get(l1GtTmAlgo);
179  m_l1GtTmAlgo = l1GtTmAlgo.product();
180 
182 
183  m_l1GtTmAlgoCacheID = l1GtTmAlgoCacheID;
184  }
185 
186  unsigned long long l1GtTmTechCacheID = evSetup.get<L1GtTriggerMaskTechTrigRcd>().cacheIdentifier();
187 
188  if (m_l1GtTmTechCacheID != l1GtTmTechCacheID) {
190  evSetup.get<L1GtTriggerMaskTechTrigRcd>().get(l1GtTmTech);
191  m_l1GtTmTech = l1GtTmTech.product();
192 
194 
195  m_l1GtTmTechCacheID = l1GtTmTechCacheID;
196  }
197 
198  unsigned long long l1GtTmVetoAlgoCacheID = evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd>().cacheIdentifier();
199 
200  if (m_l1GtTmVetoAlgoCacheID != l1GtTmVetoAlgoCacheID) {
201  edm::ESHandle<L1GtTriggerMask> l1GtTmVetoAlgo;
202  evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd>().get(l1GtTmVetoAlgo);
203  m_l1GtTmVetoAlgo = l1GtTmVetoAlgo.product();
204 
206 
207  m_l1GtTmVetoAlgoCacheID = l1GtTmVetoAlgoCacheID;
208  }
209 
210  unsigned long long l1GtTmVetoTechCacheID = evSetup.get<L1GtTriggerMaskVetoTechTrigRcd>().cacheIdentifier();
211 
212  if (m_l1GtTmVetoTechCacheID != l1GtTmVetoTechCacheID) {
213  edm::ESHandle<L1GtTriggerMask> l1GtTmVetoTech;
214  evSetup.get<L1GtTriggerMaskVetoTechTrigRcd>().get(l1GtTmVetoTech);
215  m_l1GtTmVetoTech = l1GtTmVetoTech.product();
216 
218 
219  m_l1GtTmVetoTechCacheID = l1GtTmVetoTechCacheID;
220  }
221 
222  // get / update the trigger menu from the EventSetup
223  // local cache & check on cacheIdentifier
224 
225  unsigned long long l1GtMenuCacheID = evSetup.get<L1GtTriggerMenuRcd>().cacheIdentifier();
226 
227  if (m_l1GtMenuCacheID != l1GtMenuCacheID) {
229  evSetup.get<L1GtTriggerMenuRcd>().get(l1GtMenu);
230  m_l1GtMenu = l1GtMenu.product();
231 
234 
236 
237  m_l1GtMenuCacheID = l1GtMenuCacheID;
238  }
239 }
std::vector< unsigned int > m_triggerMaskSet
Definition: L1GtUtils.h:422
unsigned long long m_l1GtMenuCacheID
Definition: L1GtUtils.h:387
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
Definition: L1GtUtils.h:379
const std::vector< unsigned int > * m_triggerMaskTechTrig
Definition: L1GtUtils.h:380
const L1GtTriggerMask * m_l1GtTmVetoTech
Definition: L1GtUtils.h:376
const L1GtTriggerMask * m_l1GtTmAlgo
trigger masks & veto masks
Definition: L1GtUtils.h:367
const AlgorithmMap * m_algorithmMap
Definition: L1GtUtils.h:389
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
Definition: L1GtUtils.h:364
const L1GtStableParameters * m_l1GtStablePar
event setup cached stuff
Definition: L1GtUtils.h:347
unsigned long long m_l1GtPfAlgoCacheID
Definition: L1GtUtils.h:358
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
Definition: L1GtUtils.h:363
unsigned int gtNumberTechnicalTriggers() const
get / set the number of technical triggers
unsigned long long m_l1GtTmVetoTechCacheID
Definition: L1GtUtils.h:377
unsigned int gtNumberPhysTriggers() const
get / set the number of physics trigger algorithms
const AlgorithmMap * m_algorithmAliasMap
Definition: L1GtUtils.h:390
unsigned long long m_l1GtTmTechCacheID
Definition: L1GtUtils.h:371
const std::vector< unsigned int > & gtTriggerMask() const
get the trigger mask
const L1GtTriggerMask * m_l1GtTmVetoAlgo
Definition: L1GtUtils.h:373
const L1GtPrescaleFactors * m_l1GtPfAlgo
prescale factors
Definition: L1GtUtils.h:357
unsigned long long m_l1GtTmAlgoCacheID
Definition: L1GtUtils.h:368
unsigned int m_numberTechnicalTriggers
number of technical triggers
Definition: L1GtUtils.h:354
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:426
unsigned int m_numberAlgorithmTriggers
number of algorithm triggers
Definition: L1GtUtils.h:351
const L1GtTriggerMask * m_l1GtTmTech
Definition: L1GtUtils.h:370
const std::vector< std::vector< int > > & gtPrescaleFactors() const
get the prescale factors by reference
const L1GtPrescaleFactors * m_l1GtPfTech
Definition: L1GtUtils.h:360
const AlgorithmMap * m_technicalTriggerMap
Definition: L1GtUtils.h:391
const std::vector< unsigned int > * m_triggerMaskVetoAlgoTrig
Definition: L1GtUtils.h:382
T get() const
Definition: EventSetup.h:73
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:386
unsigned long long m_l1GtPfTechCacheID
Definition: L1GtUtils.h:361
const AlgorithmMap & gtTechnicalTriggerMap() const
get / set the technical trigger map
bool m_l1EventSetupValid
Definition: L1GtUtils.h:393
unsigned long long m_l1GtTmVetoAlgoCacheID
Definition: L1GtUtils.h:374
std::vector< int > m_prescaleFactorSet
Definition: L1GtUtils.h:423
const AlgorithmMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
T const * product() const
Definition: ESHandle.h:86
unsigned long long m_l1GtStableParCacheID
Definition: L1GtUtils.h:348
const std::vector< unsigned int > * m_triggerMaskVetoTechTrig
Definition: L1GtUtils.h:383
void L1GtUtils::retrieveL1GtTriggerMenuLite ( const edm::Run iRun)

retrieve L1GtTriggerMenuLite (per run product) and cache it to improve the speed

for use in beginRun(const edm::Run&, const edm::EventSetup&);

Definition at line 241 of file L1GtUtils.cc.

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

Referenced by getL1GtRunCache().

241  {
243 
244  // get L1GtTriggerMenuLite
246  if (!m_l1GtUtilsHelper->l1GtTriggerMenuLiteToken().isUninitialized()) {
247  iRun.getByToken(m_l1GtUtilsHelper->l1GtTriggerMenuLiteToken(), l1GtMenuLite);
248  }
249 
250  if (!l1GtMenuLite.isValid()) {
251  LogDebug("L1GtUtils") << "\nL1GtTriggerMenuLite with \n " << m_l1GtUtilsHelper->l1GtTriggerMenuLiteInputTag()
252  << "\nrequested, but not found in the run." << std::endl;
253 
254  m_l1GtMenuLiteValid = false;
255  } else {
256  m_l1GtMenuLite = l1GtMenuLite.product();
257  m_l1GtMenuLiteValid = true;
258 
259  LogDebug("L1GtUtils") << "\nL1GtTriggerMenuLite with \n " << m_l1GtUtilsHelper->l1GtTriggerMenuLiteInputTag()
260  << "\nretrieved for run " << iRun.runAuxiliary().run() << std::endl;
261 
265 
268 
271  }
272 }
#define LogDebug(id)
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:427
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:407
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmAliasMapLite
Definition: L1GtUtils.h:401
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmMapLite
Definition: L1GtUtils.h:400
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrigLite
Definition: L1GtUtils.h:408
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Run.h:315
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)
RunAuxiliary const & runAuxiliary() const override
Definition: Run.h:61
const std::vector< std::vector< int > > & gtPrescaleFactorsTechTrig() const
bool isValid() const
Definition: HandleBase.h:70
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:398
T const * product() const
Definition: Handle.h:69
std::unique_ptr< L1GtUtilsHelper > m_l1GtUtilsHelper
Definition: L1GtUtils.h:429
const std::vector< unsigned int > * m_triggerMaskTechTrigLite
Definition: L1GtUtils.h:405
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:410
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
Definition: L1GtUtils.h:404
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:402
RunNumber_t run() const
Definition: RunAuxiliary.h:31
const std::string L1GtUtils::triggerCategory ( const TriggerCategory trigCategory) const

public methods

Definition at line 98 of file L1GtUtils.cc.

References AlgorithmTrigger, EmptyString, and TechnicalTrigger.

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

98  {
99  switch (trigCategory) {
100  case AlgorithmTrigger: {
101  return "Algorithm Trigger";
102  } break;
103  case TechnicalTrigger: {
104  return "Technical Trigger";
105  }
106 
107  break;
108  default: { return EmptyString; } break;
109  }
110 }
static const std::string EmptyString
Definition: L1GtUtils.h:329
const int L1GtUtils::triggerMask ( const edm::Event iEvent,
const std::string &  nameAlgoTechTrig,
int &  errorCode 
) const

return trigger mask for a given algorithm or technical trigger

Definition at line 1050 of file L1GtUtils.cc.

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

Referenced by L1GtAnalyzer::analyzeL1GtUtilsCore(), L1GtAnalyzer::analyzeTrigger(), decision(), decisionAfterMask(), decisionBeforeMask(), L1TMenuHelper::getLUSOTrigger(), and prescaleFactor().

1050  {
1051  // initial values
1052  bool decisionBeforeMask = false;
1053  bool decisionAfterMask = false;
1054  int prescaleFactor = -1;
1055  int triggerMask = -1;
1056 
1057  errorCode = l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask, decisionAfterMask, prescaleFactor, triggerMask);
1058 
1059  return triggerMask;
1060 }
const int l1Results(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:624
const int triggerMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1050
const bool decisionBeforeMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:996
const bool decisionAfterMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1010
const int prescaleFactor(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1036
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 1062 of file L1GtUtils.cc.

References AlgorithmTrigger, availableL1Configuration(), L1TBPTX_cfi::bitNumber, 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().

1062  {
1063  // initial values for returned results
1064  int triggerMaskValue = -1;
1065 
1066  // initialize error code and L1 configuration code
1067  int iError = 0;
1068  int l1ConfCode = 0;
1069 
1070  // check if L1 configuration is available
1071 
1072  if (!availableL1Configuration(iError, l1ConfCode)) {
1073  errorCode = iError;
1074  return triggerMaskValue;
1075  }
1076 
1077  // at this point, a valid L1 configuration is available, so the if/else if/else
1078  // can be simplified
1079 
1080  // if the given name is not an algorithm trigger alias, an algorithm trigger name
1081  // or a technical trigger in the current menu, return with error code 1
1082 
1083  TriggerCategory trigCategory = AlgorithmTrigger;
1084  int bitNumber = -1;
1085 
1086  if (!l1AlgoTechTrigBitNumber(nameAlgoTechTrig, trigCategory, bitNumber)) {
1087  iError = l1ConfCode + 1;
1088 
1090  if (m_l1GtMenuLiteValid) {
1091  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n " << nameAlgoTechTrig
1092  << "\not found in the trigger menu \n " << m_l1GtMenuLite->gtTriggerMenuImplementation()
1093  << "\nretrieved from L1GtTriggerMenuLite" << std::endl;
1094 
1095  } else {
1096  // fall through: L1 trigger configuration from event setup
1097  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n " << nameAlgoTechTrig
1098  << "\not found in the trigger menu \n " << m_l1GtMenu->gtTriggerMenuImplementation()
1099  << "\nretrieved from Event Setup" << std::endl;
1100  }
1101 
1102  } else {
1103  // L1 trigger configuration from event setup only
1104  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n " << nameAlgoTechTrig
1105  << "\not found in the trigger menu \n " << m_l1GtMenu->gtTriggerMenuImplementation()
1106  << "\nretrieved from Event Setup" << std::endl;
1107  }
1108 
1109  errorCode = iError;
1110  return triggerMaskValue;
1111  }
1112 
1113  // check here if a positive bit number was retrieved
1114  // exit in case of negative bit number, before retrieving L1 GT products, saving time
1115 
1116  if (bitNumber < 0) {
1117  iError = l1ConfCode + 2;
1118 
1120  if (m_l1GtMenuLiteValid) {
1121  LogDebug("L1GtUtils") << "\nNegative bit number for " << triggerCategory(trigCategory) << "\n "
1122  << nameAlgoTechTrig << "\nfrom menu \n " << m_l1GtMenuLite->gtTriggerMenuImplementation()
1123  << "\nretrieved from L1GtTriggerMenuLite" << std::endl;
1124 
1125  } else {
1126  // fall through: L1 trigger configuration from event setup
1127  LogDebug("L1GtUtils") << "\nNegative bit number for " << triggerCategory(trigCategory) << "\n "
1128  << nameAlgoTechTrig << "\nfrom menu \n " << m_l1GtMenu->gtTriggerMenuImplementation()
1129  << "\nretrieved from Event Setup" << std::endl;
1130  }
1131 
1132  } else {
1133  // L1 trigger configuration from event setup only
1134  LogDebug("L1GtUtils") << "\nNegative bit number for " << triggerCategory(trigCategory) << "\n "
1135  << nameAlgoTechTrig << "\nfrom menu \n " << m_l1GtMenu->gtTriggerMenuImplementation()
1136  << "\nretrieved from Event Setup" << std::endl;
1137  }
1138 
1139  errorCode = iError;
1140  return triggerMaskValue;
1141  }
1142 
1143  // depending on trigger category (algorithm trigger or technical trigger)
1144  // get the correct quantities
1145 
1146  // pointer to the set of trigger masks
1147 
1148  const std::vector<unsigned int>* triggerMasksSet = nullptr;
1149 
1150  switch (trigCategory) {
1151  case AlgorithmTrigger: {
1153  if (m_l1GtMenuLiteValid) {
1154  triggerMasksSet = m_triggerMaskAlgoTrigLite;
1155 
1156  } else {
1157  // fall through: L1 trigger configuration from event setup
1158  triggerMasksSet = m_triggerMaskAlgoTrig;
1159  }
1160 
1161  } else {
1162  // L1 trigger configuration from event setup only
1163  triggerMasksSet = m_triggerMaskAlgoTrig;
1164  }
1165 
1166  } break;
1167  case TechnicalTrigger: {
1169  if (m_l1GtMenuLiteValid) {
1170  triggerMasksSet = m_triggerMaskTechTrigLite;
1171 
1172  } else {
1173  // fall through: L1 trigger configuration from event setup
1174  triggerMasksSet = m_triggerMaskTechTrig;
1175  }
1176 
1177  } else {
1178  // L1 trigger configuration from event setup only
1179  triggerMasksSet = m_triggerMaskTechTrig;
1180  }
1181 
1182  } break;
1183  default: {
1184  // should not be the case
1185  iError = l1ConfCode + 3;
1186 
1187  errorCode = iError;
1188  return triggerMaskValue;
1189 
1190  } break;
1191  }
1192 
1193  // trigger mask
1194 
1195  if (bitNumber < (static_cast<int>((*triggerMasksSet).size()))) {
1197  if (m_l1GtMenuLiteValid) {
1198  triggerMaskValue = (*triggerMasksSet)[bitNumber];
1199 
1200  } else {
1201  // fall through: L1 trigger configuration from event setup
1202  // masks in event setup are for all partitions
1203  triggerMaskValue = ((*triggerMasksSet)[bitNumber]) & (1 << m_physicsDaqPartition);
1204  }
1205 
1206  } else {
1207  // L1 trigger configuration from event setup only
1208  // masks in event setup are for all partitions
1209  triggerMaskValue = ((*triggerMasksSet)[bitNumber]) & (1 << m_physicsDaqPartition);
1210  }
1211 
1212  } else {
1213  iError = l1ConfCode + 5000;
1214  LogDebug("L1GtUtils") << "\nError: bit number " << bitNumber << " retrieved for " << triggerCategory(trigCategory)
1215  << "\n " << nameAlgoTechTrig
1216  << "\ngreater than size of L1 GT trigger mask set: " << (*triggerMasksSet).size()
1217  << "\nError: Inconsistent L1 trigger configuration!" << std::endl;
1218 
1219  errorCode = iError;
1220  return triggerMaskValue;
1221  }
1222 
1223  errorCode = iError;
1224  return triggerMaskValue;
1225 }
#define LogDebug(id)
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:427
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
Definition: L1GtUtils.h:379
const std::vector< unsigned int > * m_triggerMaskTechTrig
Definition: L1GtUtils.h:380
const bool l1AlgoTechTrigBitNumber(const std::string &nameAlgoTechTrig, TriggerCategory &trigCategory, int &bitNumber) const
Definition: L1GtUtils.cc:329
TriggerCategory
Definition: L1GtUtils.h:96
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:1637
const std::string & gtTriggerMenuImplementation() const
const std::string triggerCategory(const TriggerCategory &) const
public methods
Definition: L1GtUtils.cc:98
unsigned int m_physicsDaqPartition
index of physics DAQ partition
Definition: L1GtUtils.h:420
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:398
const std::vector< unsigned int > * m_triggerMaskTechTrigLite
Definition: L1GtUtils.h:405
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:410
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
Definition: L1GtUtils.h:404
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:386
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 1455 of file L1GtUtils.cc.

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

Referenced by L1GtAnalyzer::analyzeL1GtUtilsCore().

1455  {
1456  // clear the vector before filling it
1457  m_triggerMaskSet.clear();
1458 
1459  // initialize error code and L1 configuration code
1460  int iError = 0;
1461  int l1ConfCode = 0;
1462 
1463  // check if L1 configuration is available
1464 
1465  if (!availableL1Configuration(iError, l1ConfCode)) {
1466  errorCode = iError;
1467  return m_triggerMaskSet;
1468  }
1469 
1470  // at this point, a valid L1 configuration is available, so the if/else if/else
1471  // can be simplified
1472 
1473  // depending on trigger category (algorithm trigger or technical trigger)
1474  // get the correct quantities
1475 
1476  // pointer to the set of trigger masks
1477 
1478  switch (trigCategory) {
1479  case AlgorithmTrigger: {
1481  // L1GtTriggerMenuLite has masks for physics partition only
1482  // avoid copy to m_triggerMaskSet, return directly m_triggerMaskAlgoTrigLite
1483  if (m_l1GtMenuLiteValid) {
1484  errorCode = iError;
1485  return (*m_triggerMaskAlgoTrigLite);
1486 
1487  } else {
1488  // fall through: L1 trigger configuration from event setup
1489  for (unsigned i = 0; i < m_triggerMaskAlgoTrig->size(); i++) {
1491  }
1492  }
1493 
1494  } else {
1495  // L1 trigger configuration from event setup only
1496  for (unsigned i = 0; i < m_triggerMaskAlgoTrig->size(); i++) {
1498  }
1499  }
1500  } break;
1501  case TechnicalTrigger: {
1503  if (m_l1GtMenuLiteValid) {
1504  errorCode = iError;
1505  return (*m_triggerMaskTechTrigLite);
1506 
1507  } else {
1508  // fall through: L1 trigger configuration from event setup
1509  for (unsigned i = 0; i < m_triggerMaskTechTrig->size(); i++) {
1511  }
1512  }
1513 
1514  } else {
1515  // L1 trigger configuration from event setup only
1516  for (unsigned i = 0; i < m_triggerMaskTechTrig->size(); i++) {
1518  }
1519  }
1520  } break;
1521  default: {
1522  // should not be the case
1523  iError = l1ConfCode + 3;
1524 
1525  errorCode = iError;
1526  return m_triggerMaskSet;
1527 
1528  } break;
1529  }
1530 
1531  errorCode = iError;
1532  return m_triggerMaskSet;
1533 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:427
std::vector< unsigned int > m_triggerMaskSet
Definition: L1GtUtils.h:422
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
Definition: L1GtUtils.h:379
const std::vector< unsigned int > * m_triggerMaskTechTrig
Definition: L1GtUtils.h:380
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:1637
unsigned int m_physicsDaqPartition
index of physics DAQ partition
Definition: L1GtUtils.h:420
const std::vector< unsigned int > * m_triggerMaskTechTrigLite
Definition: L1GtUtils.h:405
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:410
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
Definition: L1GtUtils.h:404
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 1722 of file L1GtUtils.cc.

References L1TBPTX_cfi::bitNumber, LogDebug, and triggerCategory().

Referenced by l1Results().

1726  {
1727  bool trigRes = false;
1728  errorCode = 0;
1729 
1730  if (bitNumber < (static_cast<int>(decWord.size()))) {
1731  trigRes = decWord[bitNumber];
1732  } else {
1733  errorCode = 3000;
1734  LogDebug("L1GtUtils") << "\nError: bit number " << bitNumber << " retrieved for " << triggerCategory(trigCategory)
1735  << "\n " << nameAlgoTechTrig
1736  << "\ngreater than size of L1 GT decision word: " << decWord.size()
1737  << "\nError: Inconsistent L1 trigger configuration!" << std::endl;
1738  }
1739 
1740  return trigRes;
1741 }
#define LogDebug(id)
const std::string triggerCategory(const TriggerCategory &) const
public methods
Definition: L1GtUtils.cc:98

Member Data Documentation

const std::string L1GtUtils::EmptyString = ""
staticprivate
const int L1GtUtils::L1GtNotValidError = 99999
staticprivate
const AlgorithmMap* L1GtUtils::m_algorithmAliasMap
private
const L1GtTriggerMenuLite::L1TriggerMap* L1GtUtils::m_algorithmAliasMapLite
private
const AlgorithmMap* L1GtUtils::m_algorithmMap
private

Definition at line 389 of file L1GtUtils.h.

Referenced by l1AlgoTechTrigBitNumber(), and retrieveL1EventSetup().

const L1GtTriggerMenuLite::L1TriggerMap* L1GtUtils::m_algorithmMapLite
private
bool L1GtUtils::m_beginRunCache
private

flag for call of getL1GtRunCache in beginRun

Definition at line 413 of file L1GtUtils.h.

Referenced by getL1GtRunCache().

bool L1GtUtils::m_l1EventSetupValid
private

Definition at line 393 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 387 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 357 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtPfAlgoCacheID
private

Definition at line 358 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtPrescaleFactors* L1GtUtils::m_l1GtPfTech
private

Definition at line 360 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtPfTechCacheID
private

Definition at line 361 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtStableParameters* L1GtUtils::m_l1GtStablePar
private

event setup cached stuff

stable parameters

Definition at line 347 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtStableParCacheID
private

Definition at line 348 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtTriggerMask* L1GtUtils::m_l1GtTmAlgo
private

trigger masks & veto masks

Definition at line 367 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtTmAlgoCacheID
private

Definition at line 368 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtTriggerMask* L1GtUtils::m_l1GtTmTech
private

Definition at line 370 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtTmTechCacheID
private

Definition at line 371 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtTriggerMask* L1GtUtils::m_l1GtTmVetoAlgo
private

Definition at line 373 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtTmVetoAlgoCacheID
private

Definition at line 374 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtTriggerMask* L1GtUtils::m_l1GtTmVetoTech
private

Definition at line 376 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtTmVetoTechCacheID
private

Definition at line 377 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

std::unique_ptr<L1GtUtilsHelper> L1GtUtils::m_l1GtUtilsHelper
private
unsigned int L1GtUtils::m_numberAlgorithmTriggers
private

number of algorithm triggers

Definition at line 351 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned int L1GtUtils::m_numberTechnicalTriggers
private

number of technical triggers

Definition at line 354 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned int L1GtUtils::m_physicsDaqPartition
private

index of physics DAQ partition

Definition at line 420 of file L1GtUtils.h.

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

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

Definition at line 363 of file L1GtUtils.h.

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

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

Definition at line 407 of file L1GtUtils.h.

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

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

Definition at line 423 of file L1GtUtils.h.

Referenced by prescaleFactorSet(), and retrieveL1EventSetup().

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

Definition at line 364 of file L1GtUtils.h.

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

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

Definition at line 408 of file L1GtUtils.h.

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

bool L1GtUtils::m_retrieveL1EventSetup
private

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

Definition at line 426 of file L1GtUtils.h.

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

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

run cache ID

Definition at line 416 of file L1GtUtils.h.

Referenced by getL1GtRunCache().

const AlgorithmMap* L1GtUtils::m_technicalTriggerMap
private
const L1GtTriggerMenuLite::L1TriggerMap* L1GtUtils::m_technicalTriggerMapLite
private
const std::vector<unsigned int>* L1GtUtils::m_triggerMaskAlgoTrig
private

Definition at line 379 of file L1GtUtils.h.

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

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

Definition at line 404 of file L1GtUtils.h.

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

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

Definition at line 422 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup(), and triggerMaskSet().

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

Definition at line 380 of file L1GtUtils.h.

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

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

Definition at line 405 of file L1GtUtils.h.

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

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

Definition at line 382 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

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

Definition at line 383 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().