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 111 of file L1GtUtils.h.

Constructor & Destructor Documentation

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

Definition at line 81 of file L1GtUtils.cc.

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

Definition at line 86 of file L1GtUtils.cc.

References m_l1GtUtilsHelper.

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

Definition at line 473 of file L1GtUtils.h.

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

Definition at line 480 of file L1GtUtils.h.

References m_l1GtUtilsHelper.

483  :
484  L1GtUtils() {
486  iC,
488  module));
489 }
std::unique_ptr< L1GtUtilsHelper > m_l1GtUtilsHelper
Definition: L1GtUtils.h:469
static const bool useL1GtTriggerMenuLite(true)
Definition: vlib.h:208
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 
)
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 503 of file L1GtUtils.h.

References m_l1GtUtilsHelper.

509  :
510  L1GtUtils() {
512  iC,
514  module,
518 }
std::unique_ptr< L1GtUtilsHelper > m_l1GtUtilsHelper
Definition: L1GtUtils.h:469
static const bool useL1GtTriggerMenuLite(true)
Definition: vlib.h:208
L1GtUtils::~L1GtUtils ( )
virtual

destructor

Definition at line 94 of file L1GtUtils.cc.

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

Definition at line 48 of file L1GtUtils.cc.

48  :
49 
51 
53 
55 
57 
59 
60  m_l1GtMenuCacheID(0ULL),
61 
62  m_l1EventSetupValid(false),
63 
64  m_l1GtMenuLiteValid(false),
65 
66  m_beginRunCache(false),
67 
68  m_runIDCache(0),
69 
71 
73 
75 
76  {
77 
78  // empty
79 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:467
edm::RunID m_runIDCache
run cache ID
Definition: L1GtUtils.h:455
unsigned long long m_l1GtMenuCacheID
Definition: L1GtUtils.h:425
unsigned long long m_l1GtPfAlgoCacheID
Definition: L1GtUtils.h:396
unsigned long long m_l1GtTmVetoTechCacheID
Definition: L1GtUtils.h:415
unsigned long long m_l1GtTmTechCacheID
Definition: L1GtUtils.h:409
unsigned long long m_l1GtTmAlgoCacheID
Definition: L1GtUtils.h:406
unsigned int m_numberTechnicalTriggers
number of technical triggers
Definition: L1GtUtils.h:392
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:466
unsigned int m_physicsDaqPartition
index of physics DAQ partition
Definition: L1GtUtils.h:460
unsigned int m_numberAlgorithmTriggers
number of algorithm triggers
Definition: L1GtUtils.h:389
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:449
bool m_beginRunCache
flag for call of getL1GtRunCache in beginRun
Definition: L1GtUtils.h:452
unsigned long long m_l1GtPfTechCacheID
Definition: L1GtUtils.h:399
bool m_l1EventSetupValid
Definition: L1GtUtils.h:431
unsigned long long m_l1GtTmVetoAlgoCacheID
Definition: L1GtUtils.h:412
unsigned long long m_l1GtStableParCacheID
Definition: L1GtUtils.h:386

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 1948 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().

1948  {
1949 
1951  if (!m_retrieveL1EventSetup) {
1952  LogDebug("L1GtUtils")
1953  << "\nRetrieve L1 trigger configuration from L1GtTriggerMenuLite only.\n"
1954  << std::endl;
1955  l1ConfCode = 0;
1956  } else {
1957  LogDebug("L1GtUtils")
1958  << "\nFall through: retrieve L1 trigger configuration from L1GtTriggerMenuLite."
1959  << "\nIf L1GtTriggerMenuLite not valid, try to retrieve from event setup.\n"
1960  << std::endl;
1961  l1ConfCode = 100000;
1962  }
1963 
1964  if (m_l1GtMenuLiteValid) {
1965  LogDebug("L1GtUtils")
1966  << "\nRetrieve L1 trigger configuration from L1GtTriggerMenuLite, valid product.\n"
1967  << std::endl;
1968  l1ConfCode = l1ConfCode + 10000;
1969  errorCode = 0;
1970 
1971  return true;
1972 
1973  } else if (m_retrieveL1EventSetup) {
1974  if (m_l1EventSetupValid) {
1975  LogDebug("L1GtUtils")
1976  << "\nFall through: retrieve L1 trigger configuration from event setup."
1977  << "\nFirst option was L1GtTriggerMenuLite - but product is not valid.\n"
1978  << std::endl;
1979  l1ConfCode = l1ConfCode + 20000;
1980  errorCode = 0;
1981 
1982  return true;
1983 
1984  } else {
1985  LogDebug("L1GtUtils")
1986  << "\nFall through: L1GtTriggerMenuLite not valid, event setup not valid.\n"
1987  << std::endl;
1988  l1ConfCode = l1ConfCode + L1GtNotValidError;
1989  errorCode = l1ConfCode;
1990 
1991  return false;
1992 
1993 
1994  }
1995 
1996  } else {
1997  LogDebug("L1GtUtils")
1998  << "\nError: L1 trigger configuration requested from L1GtTriggerMenuLite only"
1999  << "\nbut L1GtTriggerMenuLite is not valid.\n" << std::endl;
2000  l1ConfCode = l1ConfCode + L1GtNotValidError;
2001  errorCode = l1ConfCode;
2002 
2003  return false;
2004 
2005  }
2006  } else if (m_retrieveL1EventSetup) {
2007 
2008  LogDebug("L1GtUtils")
2009  << "\nRetrieve L1 trigger configuration from event setup."
2010  << "\nL1GtTriggerMenuLite product was not requested.\n"
2011  << std::endl;
2012  l1ConfCode = 200000;
2013 
2014  if (m_l1EventSetupValid) {
2015  LogDebug("L1GtUtils")
2016  << "\nRetrieve L1 trigger configuration from event setup only."
2017  << "\nValid L1 trigger event setup.\n"
2018  << std::endl;
2019  l1ConfCode = l1ConfCode + 10000;
2020  errorCode = 0;
2021 
2022  return true;
2023 
2024  } else {
2025  LogDebug("L1GtUtils")
2026  << "\nRetrieve L1 trigger configuration from event setup only."
2027  << "\nNo valid L1 trigger event setup.\n"
2028  << std::endl;
2029  l1ConfCode = l1ConfCode + L1GtNotValidError;
2030  errorCode = l1ConfCode;
2031 
2032  return false;
2033 
2034 
2035  }
2036 
2037  } else {
2038  LogDebug("L1GtUtils")
2039  << "\nError: no L1 trigger configuration requested to be retrieved."
2040  << "\nMust call before getL1GtRunCache in beginRun and analyze.\n"
2041  << std::endl;
2042  l1ConfCode = 300000;
2043  errorCode = l1ConfCode;
2044 
2045  return false;
2046 
2047  }
2048 }
#define LogDebug(id)
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:467
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:466
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:449
static const int L1GtNotValidError
Definition: L1GtUtils.h:369
bool m_l1EventSetupValid
Definition: L1GtUtils.h:431
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 1208 of file L1GtUtils.cc.

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

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

1209  {
1210 
1211  // initial values
1212  bool decisionBeforeMask = false;
1213  bool decisionAfterMask = false;
1214  int prescaleFactor = -1;
1215  int triggerMask = -1;
1216 
1217  errorCode = l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1218  decisionAfterMask, prescaleFactor, triggerMask);
1219 
1220  return decisionAfterMask;
1221 }
const int l1Results(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:713
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:1238
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:1178
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:1193
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:1223
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 1193 of file L1GtUtils.cc.

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

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

1194  {
1195 
1196  // initial values
1197  bool decisionBeforeMask = false;
1198  bool decisionAfterMask = false;
1199  int prescaleFactor = -1;
1200  int triggerMask = -1;
1201 
1202  errorCode = l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1203  decisionAfterMask, prescaleFactor, triggerMask);
1204 
1205  return decisionAfterMask;
1206 }
const int l1Results(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:713
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:1238
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:1178
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:1193
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:1223
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 1178 of file L1GtUtils.cc.

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

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

1179  {
1180 
1181  // initial values
1182  bool decisionBeforeMask = false;
1183  bool decisionAfterMask = false;
1184  int prescaleFactor = -1;
1185  int triggerMask = -1;
1186 
1187  errorCode = l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1188  decisionAfterMask, prescaleFactor, triggerMask);
1189 
1190  return decisionBeforeMask;
1191 }
const int l1Results(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:713
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:1238
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:1178
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:1193
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:1223
static void L1GtUtils::fillDescription ( edm::ParameterSetDescription desc)
inlinestatic

Definition at line 105 of file L1GtUtils.h.

References L1GtUtilsHelper::fillDescription().

105  {
107  }
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 319 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().

321  {
322 
323  // first call will turn this to true: the quantities which can be cached in
324  // beginRun will not be cached then in analyze
325  m_beginRunCache = true;
326 
327  // if requested, retrieve and cache L1 event setup
328  // keep the caching based on cacheIdentifier() for each record
329  if (useL1EventSetup) {
330  retrieveL1EventSetup(evSetup);
331  }
332 
333  // cached per run
334 
335  // if requested, retrieve and cache the L1GtTriggerMenuLite
336  // L1GtTriggerMenuLite is defined per run and produced in prompt reco by L1Reco
337  // and put in the Run section
340  }
341 }
void retrieveL1EventSetup(const edm::EventSetup &)
retrieve all the relevant L1 trigger event setup records and cache them to improve the speed ...
Definition: L1GtUtils.cc:121
static const bool useL1GtTriggerMenuLite(true)
bool m_beginRunCache
flag for call of getL1GtRunCache in beginRun
Definition: L1GtUtils.h:452
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:279
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 343 of file L1GtUtils.cc.

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

345  {
346 
347  // if there was no retrieval and caching in beginRun, do it here
348  if (!m_beginRunCache) {
349 
350  // if requested, retrieve and cache L1 event setup
351  // keep the caching based on cacheIdentifier() for each record
352  if (useL1EventSetup) {
353  retrieveL1EventSetup(evSetup);
354  }
355  }
356 
357  // cached per run
358 
359  const edm::Run& iRun = iEvent.getRun();
360  edm::RunID runID = iRun.runAuxiliary().id();
361 
362  if (runID != m_runIDCache) {
363 
364  if (!m_beginRunCache) {
365  // if requested, retrieve and cache the L1GtTriggerMenuLite
366  // L1GtTriggerMenuLite is defined per run and produced in prompt reco by L1Reco
367  // and put in the Run section
370  }
371  }
372  m_runIDCache = runID;
373  }
374 }
edm::RunID m_runIDCache
run cache ID
Definition: L1GtUtils.h:455
Run const & getRun() const
Definition: Event.cc:66
RunID const & id() const
Definition: RunAuxiliary.h:37
void retrieveL1EventSetup(const edm::EventSetup &)
retrieve all the relevant L1 trigger event setup records and cache them to improve the speed ...
Definition: L1GtUtils.cc:121
static const bool useL1GtTriggerMenuLite(true)
RunAuxiliary const & runAuxiliary() const
Definition: Run.h:59
bool m_beginRunCache
flag for call of getL1GtRunCache in beginRun
Definition: L1GtUtils.h:452
static const bool useL1EventSetup(true)
Definition: Run.h:42
void retrieveL1GtTriggerMenuLite(const edm::Run &)
retrieve L1GtTriggerMenuLite (per run product) and cache it to improve the speed
Definition: L1GtUtils.cc:279
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 376 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().

378  {
379 
380  trigCategory = AlgorithmTrigger;
381  bitNumber = -1;
382 
384  if (m_l1GtMenuLiteValid) {
385 
386  // test if the name is an algorithm alias
387  for (L1GtTriggerMenuLite::CItL1Trig itTrig =
388  m_algorithmAliasMapLite->begin(); itTrig
389  != m_algorithmAliasMapLite->end(); itTrig++) {
390 
391  if (itTrig->second == nameAlgoTechTrig) {
392 
393  trigCategory = AlgorithmTrigger;
394  bitNumber = itTrig->first;
395 
396  return true;
397  }
398  }
399 
400  // test if the name is an algorithm name
401  for (L1GtTriggerMenuLite::CItL1Trig itTrig =
402  m_algorithmMapLite->begin(); itTrig
403  != m_algorithmMapLite->end(); itTrig++) {
404 
405  if (itTrig->second == nameAlgoTechTrig) {
406 
407  trigCategory = AlgorithmTrigger;
408  bitNumber = itTrig->first;
409 
410  return true;
411  }
412  }
413 
414  // test if the name is a technical trigger
415  for (L1GtTriggerMenuLite::CItL1Trig itTrig =
416  m_technicalTriggerMapLite->begin(); itTrig
417  != m_technicalTriggerMapLite->end(); itTrig++) {
418 
419  if (itTrig->second == nameAlgoTechTrig) {
420 
421  trigCategory = TechnicalTrigger;
422  bitNumber = itTrig->first;
423 
424  return true;
425  }
426  }
427 
428  } else if (m_retrieveL1EventSetup) {
429 
430  // test if the name is an algorithm alias
431  CItAlgo itAlgo = m_algorithmAliasMap->find(nameAlgoTechTrig);
432  if (itAlgo != m_algorithmAliasMap->end()) {
433  trigCategory = AlgorithmTrigger;
434  bitNumber = (itAlgo->second).algoBitNumber();
435 
436  return true;
437  }
438 
439  // test if the name is an algorithm name
440  itAlgo = m_algorithmMap->find(nameAlgoTechTrig);
441  if (itAlgo != m_algorithmMap->end()) {
442  trigCategory = AlgorithmTrigger;
443  bitNumber = (itAlgo->second).algoBitNumber();
444 
445  return true;
446  }
447 
448  // test if the name is a technical trigger
449  itAlgo = m_technicalTriggerMap->find(nameAlgoTechTrig);
450  if (itAlgo != m_technicalTriggerMap->end()) {
451  trigCategory = TechnicalTrigger;
452  bitNumber = (itAlgo->second).algoBitNumber();
453 
454  return true;
455  }
456 
457  } else {
458  // only L1GtTriggerMenuLite requested, but it is not valid
459  return false;
460 
461  }
462  } else if (m_retrieveL1EventSetup) {
463 
464  // test if the name is an algorithm alias
465  CItAlgo itAlgo = m_algorithmAliasMap->find(nameAlgoTechTrig);
466  if (itAlgo != m_algorithmAliasMap->end()) {
467  trigCategory = AlgorithmTrigger;
468  bitNumber = (itAlgo->second).algoBitNumber();
469 
470  return true;
471  }
472 
473  // test if the name is an algorithm name
474  itAlgo = m_algorithmMap->find(nameAlgoTechTrig);
475  if (itAlgo != m_algorithmMap->end()) {
476  trigCategory = AlgorithmTrigger;
477  bitNumber = (itAlgo->second).algoBitNumber();
478 
479  return true;
480  }
481 
482  // test if the name is a technical trigger
483  itAlgo = m_technicalTriggerMap->find(nameAlgoTechTrig);
484  if (itAlgo != m_technicalTriggerMap->end()) {
485  trigCategory = TechnicalTrigger;
486  bitNumber = (itAlgo->second).algoBitNumber();
487 
488  return true;
489  }
490 
491  } else {
492  // L1 trigger configuration not retrieved
493  return false;
494 
495  }
496 
497  // all possibilities already tested, so it should not arrive here
498  return false;
499 
500 
501 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:467
const AlgorithmMap * m_algorithmMap
Definition: L1GtUtils.h:427
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmAliasMapLite
Definition: L1GtUtils.h:440
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmMapLite
Definition: L1GtUtils.h:439
const AlgorithmMap * m_algorithmAliasMap
Definition: L1GtUtils.h:428
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:466
L1TriggerMap::const_iterator CItL1Trig
iterators through map containing the physics algorithms or the technical triggers ...
const AlgorithmMap * m_technicalTriggerMap
Definition: L1GtUtils.h:429
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:449
const L1GtTriggerMenuLite::L1TriggerMap * m_technicalTriggerMapLite
Definition: L1GtUtils.h:441
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 713 of file L1GtUtils.cc.

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

715  {
716 
717  // initial values for returned results
718  decisionBeforeMask = false;
719  decisionAfterMask = false;
720  prescaleFactor = -1;
721  triggerMask = -1;
722 
723  // initialize error code and L1 configuration code
724  int iError = 0;
725  int l1ConfCode = 0;
726 
727  // check if L1 configuration is available
728 
729  if (!availableL1Configuration(iError, l1ConfCode)) {
730  return iError;
731  }
732 
733  // at this point, a valid L1 configuration is available, so the if/else if/else
734  // can be simplified
735 
736  // if the given name is not an algorithm trigger alias, an algorithm trigger name
737  // or a technical trigger in the current menu, return with error code 1
738 
739  TriggerCategory trigCategory = AlgorithmTrigger;
740  int bitNumber = -1;
741 
742 
743  if (!l1AlgoTechTrigBitNumber(nameAlgoTechTrig, trigCategory, bitNumber)) {
744 
745  iError = l1ConfCode + 1;
746 
748  if (m_l1GtMenuLiteValid) {
749 
750  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n "
751  << nameAlgoTechTrig
752  << "\not found in the trigger menu \n "
754  << "\nretrieved from L1GtTriggerMenuLite" << std::endl;
755 
756  } else {
757 
758  // fall through: L1 trigger configuration from event setup
759  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n "
760  << nameAlgoTechTrig
761  << "\not found in the trigger menu \n "
763  << "\nretrieved from Event Setup" << std::endl;
764 
765  }
766 
767  } else {
768  // L1 trigger configuration from event setup only
769  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n "
770  << nameAlgoTechTrig
771  << "\not found in the trigger menu \n "
773  << "\nretrieved from Event Setup" << std::endl;
774 
775  }
776 
777  return iError;
778 
779  }
780 
781  // check here if a positive bit number was retrieved
782  // exit in case of negative bit number, before retrieving L1 GT products, saving time
783 
784  if (bitNumber < 0) {
785 
786  iError = l1ConfCode + 2;
787 
789  if (m_l1GtMenuLiteValid) {
790  LogDebug("L1GtUtils") << "\nNegative bit number for "
791  << triggerCategory(trigCategory) << "\n "
792  << nameAlgoTechTrig << "\nfrom menu \n "
794  << "\nretrieved from L1GtTriggerMenuLite" << std::endl;
795 
796  } else {
797  // fall through: L1 trigger configuration from event setup
798  LogDebug("L1GtUtils") << "\nNegative bit number for "
799  << triggerCategory(trigCategory) << "\n "
800  << nameAlgoTechTrig << "\nfrom menu \n "
802  << "\nretrieved from Event Setup" << std::endl;
803 
804  }
805 
806  } else {
807  // L1 trigger configuration from event setup only
808  LogDebug("L1GtUtils") << "\nNegative bit number for "
809  << triggerCategory(trigCategory) << "\n "
810  << nameAlgoTechTrig << "\nfrom menu \n "
812  << "\nretrieved from Event Setup" << std::endl;
813 
814  }
815 
816  return iError;
817  }
818 
819 
820  // retrieve L1GlobalTriggerRecord and 1GlobalTriggerReadoutRecord product
821  // intermediate error code for the records
822  // the module returns an error code only if both the lite and the readout record are missing
823 
824  int iErrorRecord = 0;
825 
826  bool validRecord = false;
827  bool gtReadoutRecordValid = false;
828 
830  if( !m_l1GtUtilsHelper->l1GtRecordToken().isUninitialized() ) {
831  iEvent.getByToken(m_l1GtUtilsHelper->l1GtRecordToken(), gtRecord);
832  }
833  if (gtRecord.isValid()) {
834 
835  validRecord = true;
836 
837  } else {
838 
839  iErrorRecord = 10;
840  LogDebug("L1GtUtils") << "\nL1GlobalTriggerRecord with \n "
841  << m_l1GtUtilsHelper->l1GtRecordInputTag() << "\nnot found in the event."
842  << std::endl;
843  }
844 
846  if( !m_l1GtUtilsHelper->l1GtReadoutRecordToken().isUninitialized() ) {
847  iEvent.getByToken(m_l1GtUtilsHelper->l1GtReadoutRecordToken(), gtReadoutRecord);
848  }
849  if (gtReadoutRecord.isValid()) {
850 
851  gtReadoutRecordValid = true;
852  validRecord = true;
853 
854  } else {
855 
856  iErrorRecord = iErrorRecord + 100;
857  LogDebug("L1GtUtils") << "\nL1GlobalTriggerReadoutRecord with \n "
858  << m_l1GtUtilsHelper->l1GtReadoutRecordInputTag() << "\nnot found in the event."
859  << std::endl;
860 
861  }
862 
863  // get the prescale factor index from
864  // L1GlobalTriggerReadoutRecord if valid
865  // if not, from L1GlobalTriggerRecord if valid
866  // else return an error
867 
868 
869  int pfIndexTechTrig = -1;
870  int pfIndexAlgoTrig = -1;
871 
872  if (validRecord) {
873  if (gtReadoutRecordValid) {
874 
875  pfIndexTechTrig
876  = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexTech();
877  pfIndexAlgoTrig
878  = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexAlgo();
879 
880  } else {
881 
882  pfIndexTechTrig
883  = static_cast<int> (gtRecord->gtPrescaleFactorIndexTech());
884  pfIndexAlgoTrig
885  = static_cast<int> (gtRecord->gtPrescaleFactorIndexAlgo());
886 
887  }
888 
889  } else {
890 
891  LogDebug("L1GtUtils") << "\nError: "
892  << "\nNo valid L1GlobalTriggerRecord with \n "
893  << m_l1GtUtilsHelper->l1GtRecordInputTag() << "\nfound in the event."
894  << "\nNo valid L1GlobalTriggerReadoutRecord with \n "
895  << m_l1GtUtilsHelper->l1GtReadoutRecordInputTag() << "\nfound in the event."
896  << std::endl;
897 
898  iError = l1ConfCode + iErrorRecord;
899  return iError;
900 
901  }
902 
903  // depending on trigger category (algorithm trigger or technical trigger)
904  // get the correct quantities
905 
906  // number of sets of prescale factors
907  // index of prescale factor set retrieved from data
908  // pointer to the actual prescale factor set
909  // pointer to the set of trigger masks
910 
911  size_t pfSetsSize = 0;
912  int pfIndex = -1;
913  const std::vector<int>* prescaleFactorsSubset = 0;
914  const std::vector<unsigned int>* triggerMasksSet = 0;
915 
916  switch (trigCategory) {
917  case AlgorithmTrigger: {
919  if (m_l1GtMenuLiteValid) {
920  pfSetsSize = m_prescaleFactorsAlgoTrigLite->size();
921  triggerMasksSet = m_triggerMaskAlgoTrigLite;
922 
923  } else {
924  // fall through: L1 trigger configuration from event setup
925  pfSetsSize = m_prescaleFactorsAlgoTrig->size();
926  triggerMasksSet = m_triggerMaskAlgoTrig;
927 
928  }
929 
930  } else {
931  // L1 trigger configuration from event setup only
932  pfSetsSize = m_prescaleFactorsAlgoTrig->size();
933  triggerMasksSet = m_triggerMaskAlgoTrig;
934 
935  }
936 
937  pfIndex = pfIndexAlgoTrig;
938 
939  }
940  break;
941  case TechnicalTrigger: {
943  if (m_l1GtMenuLiteValid) {
944  pfSetsSize = m_prescaleFactorsTechTrigLite->size();
945  triggerMasksSet = m_triggerMaskTechTrigLite;
946 
947  } else {
948  // fall through: L1 trigger configuration from event setup
949  pfSetsSize = m_prescaleFactorsTechTrig->size();
950  triggerMasksSet = m_triggerMaskTechTrig;
951 
952  }
953 
954  } else {
955  // L1 trigger configuration from event setup only
956  pfSetsSize = m_prescaleFactorsTechTrig->size();
957  triggerMasksSet = m_triggerMaskTechTrig;
958 
959  }
960 
961  pfIndex = pfIndexTechTrig;
962 
963  }
964  break;
965  default: {
966  // should not be the case
967  iError = l1ConfCode + iErrorRecord + 3;
968  return iError;
969 
970  }
971  break;
972  }
973 
974 
975  // test prescale factor set index correctness, then retrieve the actual set of prescale factors
976 
977  if (pfIndex < 0) {
978 
979  iError = l1ConfCode + iErrorRecord + 1000;
980  LogDebug("L1GtUtils")
981  << "\nError: index of prescale factor set retrieved from the data \n"
982  << "less than zero."
983  << "\n Value of index retrieved from data = " << pfIndex
984  << std::endl;
985 
986  return iError;
987 
988  } else if (pfIndex >= (static_cast<int>(pfSetsSize))) {
989  iError = l1ConfCode + iErrorRecord + 2000;
990  LogDebug("L1GtUtils")
991  << "\nError: index of prescale factor set retrieved from the data \n"
992  << "greater than the size of the vector of prescale factor sets."
993  << "\n Value of index retrieved from data = " << pfIndex
994  << "\n Vector size = " << pfSetsSize << std::endl;
995 
996  return iError;
997 
998  } else {
999  switch (trigCategory) {
1000  case AlgorithmTrigger: {
1002  if (m_l1GtMenuLiteValid) {
1003  prescaleFactorsSubset
1004  = &((*m_prescaleFactorsAlgoTrigLite).at(pfIndex));
1005 
1006  } else {
1007  // fall through: L1 trigger configuration from event setup
1008  prescaleFactorsSubset
1009  = &((*m_prescaleFactorsAlgoTrig).at(pfIndex));
1010 
1011  }
1012 
1013  } else {
1014  // L1 trigger configuration from event setup only
1015  prescaleFactorsSubset
1016  = &((*m_prescaleFactorsAlgoTrig).at(pfIndex));
1017 
1018  }
1019 
1020  }
1021  break;
1022  case TechnicalTrigger: {
1024  if (m_l1GtMenuLiteValid) {
1025  prescaleFactorsSubset
1026  = &((*m_prescaleFactorsTechTrigLite).at(pfIndex));
1027 
1028  } else {
1029  // fall through: L1 trigger configuration from event setup
1030  prescaleFactorsSubset
1031  = &((*m_prescaleFactorsTechTrig).at(pfIndex));
1032 
1033  }
1034 
1035  } else {
1036  // L1 trigger configuration from event setup only
1037  prescaleFactorsSubset
1038  = &((*m_prescaleFactorsTechTrig).at(pfIndex));
1039 
1040  }
1041 
1042  }
1043  break;
1044  default: {
1045  // do nothing - it was tested before, with return
1046 
1047  }
1048  break;
1049  }
1050 
1051  }
1052 
1053 
1054  // algorithm result before applying the trigger masks
1055  // the bit number is positive (tested previously)
1056 
1057  switch (trigCategory) {
1058  case AlgorithmTrigger: {
1059  if (gtReadoutRecordValid) {
1060  const DecisionWord& decWord = gtReadoutRecord->decisionWord();
1061  decisionBeforeMask = trigResult(decWord, bitNumber,
1062  nameAlgoTechTrig, trigCategory, iError);
1063  if (iError) {
1064  return (iError + l1ConfCode + iErrorRecord);
1065  }
1066 
1067  } else {
1068 
1069  const DecisionWord& decWord =
1070  gtRecord->decisionWordBeforeMask();
1071  decisionBeforeMask = trigResult(decWord, bitNumber,
1072  nameAlgoTechTrig, trigCategory, iError);
1073  if (iError) {
1074  return (iError + l1ConfCode + iErrorRecord);
1075  }
1076 
1077  }
1078 
1079  }
1080  break;
1081  case TechnicalTrigger: {
1082  if (gtReadoutRecordValid) {
1083  const DecisionWord& decWord =
1084  gtReadoutRecord->technicalTriggerWord();
1085  decisionBeforeMask = trigResult(decWord, bitNumber,
1086  nameAlgoTechTrig, trigCategory, iError);
1087  if (iError) {
1088  return (iError + l1ConfCode + iErrorRecord);
1089  }
1090 
1091  } else {
1092 
1093  const DecisionWord& decWord =
1094  gtRecord->technicalTriggerWordBeforeMask();
1095  decisionBeforeMask = trigResult(decWord, bitNumber,
1096  nameAlgoTechTrig, trigCategory, iError);
1097  if (iError) {
1098  return (iError + l1ConfCode + iErrorRecord);
1099  }
1100 
1101  }
1102 
1103  }
1104  break;
1105  default: {
1106  // do nothing - it was tested before, with return
1107 
1108  }
1109  break;
1110  }
1111 
1112  // prescale factor
1113  // the bit number is positive (tested previously)
1114 
1115  if (bitNumber < (static_cast<int> (prescaleFactorsSubset->size()))) {
1116  prescaleFactor = (*prescaleFactorsSubset)[bitNumber];
1117  } else {
1118  iError = l1ConfCode + iErrorRecord + 4000;
1119  LogDebug("L1GtUtils") << "\nError: bit number " << bitNumber
1120  << " retrieved for " << triggerCategory(trigCategory) << "\n "
1121  << nameAlgoTechTrig
1122  << "\ngreater than size of actual L1 GT prescale factor set: "
1123  << prescaleFactorsSubset->size()
1124  << "\nError: Inconsistent L1 trigger configuration!"
1125  << std::endl;
1126 
1127  return iError;
1128  }
1129 
1130  // trigger mask and trigger result after applying the trigger masks
1131 
1132  if (bitNumber < (static_cast<int> ((*triggerMasksSet).size()))) {
1133 
1135  if (m_l1GtMenuLiteValid) {
1136  triggerMask = (*triggerMasksSet)[bitNumber];
1137 
1138  } else {
1139  // fall through: L1 trigger configuration from event setup
1140  // masks in event setup are for all partitions
1141  triggerMask = ((*triggerMasksSet)[bitNumber]) & (1
1143 
1144  }
1145 
1146  } else {
1147  // L1 trigger configuration from event setup only
1148  // masks in event setup are for all partitions
1149  triggerMask = ((*triggerMasksSet)[bitNumber]) & (1
1151 
1152  }
1153 
1154 
1155  } else {
1156  iError = l1ConfCode + iErrorRecord + 5000;
1157  LogDebug("L1GtUtils") << "\nError: bit number " << bitNumber
1158  << " retrieved for " << triggerCategory(trigCategory) << "\n "
1159  << nameAlgoTechTrig
1160  << "\ngreater than size of L1 GT trigger mask set: "
1161  << (*triggerMasksSet).size()
1162  << "\nError: Inconsistent L1 trigger configuration!"
1163  << std::endl;
1164 
1165  return iError;
1166 
1167  }
1168 
1170 
1171  if (triggerMask) {
1172  decisionAfterMask = false;
1173  }
1174 
1175  return iError;
1176 }
#define LogDebug(id)
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:467
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
Definition: L1GtUtils.h:417
const TechnicalTriggerWord & technicalTriggerWord(int bxInEventValue) const
const std::vector< unsigned int > * m_triggerMaskTechTrig
Definition: L1GtUtils.h:418
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
const bool l1AlgoTechTrigBitNumber(const std::string &nameAlgoTechTrig, TriggerCategory &trigCategory, int &bitNumber) const
Definition: L1GtUtils.cc:376
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:1948
const DecisionWord decisionWordBeforeMask() const
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrigLite
Definition: L1GtUtils.h:446
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
Definition: L1GtUtils.h:402
const std::string & gtTriggerMenuImplementation() const
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
Definition: L1GtUtils.h:401
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrigLite
Definition: L1GtUtils.h:447
std::vector< bool > DecisionWord
typedefs
const std::string triggerCategory(const TriggerCategory &) const
public methods
Definition: L1GtUtils.cc:100
const unsigned int gtPrescaleFactorIndexAlgo() const
bool isValid() const
Definition: HandleBase.h:74
unsigned int m_physicsDaqPartition
index of physics DAQ partition
Definition: L1GtUtils.h:460
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:1238
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:437
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:1178
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:469
const std::vector< unsigned int > * m_triggerMaskTechTrigLite
Definition: L1GtUtils.h:444
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:449
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
Definition: L1GtUtils.h:443
const bool trigResult(const DecisionWord &decWord, const int bitNumber, const std::string &nameAlgoTechTrig, const TriggerCategory &trigCategory, int &errorCode) const
Definition: L1GtUtils.cc:2052
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:424
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:1193
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:1223
const std::string & L1GtUtils::l1TriggerMenu ( ) const

return the L1 trigger menu name

Definition at line 1833 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().

1833  {
1834 
1836  if (m_l1GtMenuLiteValid) {
1838 
1839  } else if (m_retrieveL1EventSetup) {
1840  return m_l1GtMenu->gtTriggerMenuName();
1841 
1842  } else {
1843  // only L1GtTriggerMenuLite requested, but it is not valid
1844  return EmptyString;
1845 
1846  }
1847  } else if (m_retrieveL1EventSetup) {
1848  return m_l1GtMenu->gtTriggerMenuName();
1849 
1850  } else {
1851  // L1 trigger configuration not retrieved
1852  return EmptyString;
1853 
1854  }
1855 
1856 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:467
const std::string & gtTriggerMenuName() const
const std::string & gtTriggerMenuName() const
static const std::string EmptyString
Definition: L1GtUtils.h:368
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:466
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:437
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:449
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:424
const std::string & L1GtUtils::l1TriggerMenuImplementation ( ) const

return the L1 trigger menu implementation

Definition at line 1858 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().

1858  {
1859 
1861  if (m_l1GtMenuLiteValid) {
1863 
1864  } else if (m_retrieveL1EventSetup) {
1866 
1867  } else {
1868  // only L1GtTriggerMenuLite requested, but it is not valid
1869  return EmptyString;
1870 
1871  }
1872  } else if (m_retrieveL1EventSetup) {
1874 
1875  } else {
1876  // L1 trigger configuration not retrieved
1877  return EmptyString;
1878 
1879  }
1880 
1881 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:467
const std::string & gtTriggerMenuImplementation() const
static const std::string EmptyString
Definition: L1GtUtils.h:368
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:466
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:437
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:449
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:424
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 503 of file L1GtUtils.cc.

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

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

505  {
506 
507  aliasL1Trigger.clear();
508  nameL1Trigger.clear();
509 
511  if (m_l1GtMenuLiteValid) {
512 
513  // for an algorithm trigger
514  if (trigCategory == AlgorithmTrigger) {
515 
516  bool trigAliasFound = false;
517  bool trigNameFound = false;
518 
519  for (L1GtTriggerMenuLite::CItL1Trig itTrig =
520  m_algorithmAliasMapLite->begin();
521  itTrig != m_algorithmAliasMapLite->end(); itTrig++) {
522 
523  if (static_cast<int>(itTrig->first) == bitNumber) {
524  aliasL1Trigger = itTrig->second;
525  trigAliasFound = true;
526  break;
527  }
528  }
529 
530  for (L1GtTriggerMenuLite::CItL1Trig itTrig =
531  m_algorithmMapLite->begin();
532  itTrig != m_algorithmMapLite->end(); itTrig++) {
533 
534  if (static_cast<int>(itTrig->first) == bitNumber) {
535  nameL1Trigger = itTrig->second;
536  trigNameFound = true;
537  break;
538  }
539  }
540 
541  if (!(trigAliasFound && trigNameFound)) {
542  return false;
543  }
544 
545  return true;
546 
547  } else if (trigCategory == TechnicalTrigger) {
548 
549  // for a technical trigger
550 
551  bool trigNameFound = false;
552 
553  for (L1GtTriggerMenuLite::CItL1Trig itTrig =
554  m_technicalTriggerMapLite->begin();
555  itTrig != m_technicalTriggerMapLite->end(); itTrig++) {
556 
557  if (static_cast<int>(itTrig->first) == bitNumber) {
558  nameL1Trigger = itTrig->second;
559 
560  // technically, no alias is defined for technical triggers
561  // users use mainly aliases, so just return the name here
562  aliasL1Trigger = itTrig->second;
563 
564  trigNameFound = true;
565  break;
566  }
567  }
568 
569  if (!(trigNameFound)) {
570  return false;
571  }
572 
573  return true;
574 
575  } else {
576 
577  // non-existing trigger category...
578  return false;
579  }
580 
581  } else if (m_retrieveL1EventSetup) {
582 
583  // for an algorithm trigger
584  if (trigCategory == AlgorithmTrigger) {
585 
586  bool trigAliasFound = false;
587 
588  for (CItAlgo itTrig = m_algorithmAliasMap->begin();
589  itTrig != m_algorithmAliasMap->end(); itTrig++) {
590 
591  if ((itTrig->second).algoBitNumber() == bitNumber) {
592  aliasL1Trigger = itTrig->first;
593  // get the name here, avoiding a loop on m_algorithmMap
594  nameL1Trigger = (itTrig->second).algoName();
595 
596  trigAliasFound = true;
597  break;
598  }
599  }
600 
601  if (!(trigAliasFound)) {
602  return false;
603  }
604 
605  return true;
606 
607  } else if (trigCategory == TechnicalTrigger) {
608 
609  // for a technical trigger
610 
611  bool trigNameFound = false;
612 
613  for (CItAlgo itTrig = m_technicalTriggerMap->begin();
614  itTrig != m_technicalTriggerMap->end(); itTrig++) {
615 
616  if ((itTrig->second).algoBitNumber() == bitNumber) {
617  nameL1Trigger = (itTrig->second).algoName();
618  // technically, no alias is defined for technical triggers
619  // users use mainly aliases, so just return the name here
620  aliasL1Trigger = nameL1Trigger;
621 
622  trigNameFound = true;
623  break;
624  }
625  }
626 
627  if (!(trigNameFound)) {
628  return false;
629  }
630 
631  return true;
632 
633  } else {
634 
635  // non-existing trigger category...
636  return false;
637  }
638 
639  } else {
640  // only L1GtTriggerMenuLite requested, but it is not valid
641  return false;
642 
643  }
644  } else if (m_retrieveL1EventSetup) {
645 
646  // for an algorithm trigger
647  if (trigCategory == AlgorithmTrigger) {
648 
649  bool trigAliasFound = false;
650 
651  for (CItAlgo itTrig = m_algorithmAliasMap->begin();
652  itTrig != m_algorithmAliasMap->end(); itTrig++) {
653 
654  if ((itTrig->second).algoBitNumber() == bitNumber) {
655  aliasL1Trigger = itTrig->first;
656  // get the name here, avoiding a loop on m_algorithmMap
657  nameL1Trigger = (itTrig->second).algoName();
658 
659  trigAliasFound = true;
660  break;
661  }
662  }
663 
664  if (!(trigAliasFound)) {
665  return false;
666  }
667 
668  return true;
669 
670  } else if (trigCategory == TechnicalTrigger) {
671 
672  // for a technical trigger
673 
674  bool trigNameFound = false;
675 
676  for (CItAlgo itTrig = m_technicalTriggerMap->begin();
677  itTrig != m_technicalTriggerMap->end(); itTrig++) {
678 
679  if ((itTrig->second).algoBitNumber() == bitNumber) {
680  nameL1Trigger = (itTrig->second).algoName();
681  // technically, no alias is defined for technical triggers
682  // users use mainly aliases, so just return the name here
683  aliasL1Trigger = itTrig->first;
684 
685  trigNameFound = true;
686  break;
687  }
688  }
689 
690  if (!(trigNameFound)) {
691  return false;
692  }
693 
694  return true;
695 
696  } else {
697 
698  // non-existing trigger category...
699  return false;
700  }
701 
702  } else {
703  // L1 trigger configuration not retrieved
704  return false;
705 
706  }
707 
708  // all possibilities already tested, so it should not arrive here
709  return false;
710 
711 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:467
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmAliasMapLite
Definition: L1GtUtils.h:440
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmMapLite
Definition: L1GtUtils.h:439
const AlgorithmMap * m_algorithmAliasMap
Definition: L1GtUtils.h:428
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:466
L1TriggerMap::const_iterator CItL1Trig
iterators through map containing the physics algorithms or the technical triggers ...
const AlgorithmMap * m_technicalTriggerMap
Definition: L1GtUtils.h:429
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:449
const L1GtTriggerMenuLite::L1TriggerMap * m_technicalTriggerMapLite
Definition: L1GtUtils.h:441
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 1223 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().

1224  {
1225 
1226  // initial values
1227  bool decisionBeforeMask = false;
1228  bool decisionAfterMask = false;
1229  int prescaleFactor = -1;
1230  int triggerMask = -1;
1231 
1232  errorCode = l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1233  decisionAfterMask, prescaleFactor, triggerMask);
1234 
1235  return prescaleFactor;
1236 }
const int l1Results(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:713
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:1238
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:1178
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:1193
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:1223
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 1662 of file L1GtUtils.cc.

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

Referenced by L1GtAnalyzer::analyzeL1GtUtilsCore().

1663  {
1664 
1665  // clear the vector before filling it
1666  m_prescaleFactorSet.clear();
1667 
1668  // initialize error code
1669  int iError = 0;
1670 
1671  const int pfIndex = prescaleFactorSetIndex(iEvent, trigCategory, iError);
1672 
1673  if (iError == 0) {
1674 
1675  switch (trigCategory) {
1676  case AlgorithmTrigger: {
1678  if (m_l1GtMenuLiteValid) {
1680  = (*m_prescaleFactorsAlgoTrigLite).at(pfIndex);
1681 
1682  } else {
1683  // fall through: L1 trigger configuration from event setup
1684  m_prescaleFactorSet = (*m_prescaleFactorsAlgoTrig).at(
1685  pfIndex);
1686 
1687  }
1688 
1689  } else {
1690  // L1 trigger configuration from event setup only
1691  m_prescaleFactorSet = (*m_prescaleFactorsAlgoTrig).at(
1692  pfIndex);
1693 
1694  }
1695 
1696  }
1697  break;
1698  case TechnicalTrigger: {
1700  if (m_l1GtMenuLiteValid) {
1702  = (*m_prescaleFactorsTechTrigLite).at(pfIndex);
1703 
1704  } else {
1705  // fall through: L1 trigger configuration from event setup
1706  m_prescaleFactorSet = (*m_prescaleFactorsTechTrig).at(
1707  pfIndex);
1708 
1709  }
1710 
1711  } else {
1712  // L1 trigger configuration from event setup only
1713  m_prescaleFactorSet = (*m_prescaleFactorsTechTrig).at(
1714  pfIndex);
1715 
1716  }
1717 
1718  }
1719  break;
1720  default: {
1721  // do nothing - it was tested before, with return
1722 
1723  }
1724  break;
1725  }
1726 
1727  }
1728 
1729  errorCode = iError;
1730  return m_prescaleFactorSet;
1731 
1732 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:467
const int prescaleFactorSetIndex(const edm::Event &iEvent, const TriggerCategory &trigCategory, int &errorCode) const
Definition: L1GtUtils.cc:1458
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:449
std::vector< int > m_prescaleFactorSet
Definition: L1GtUtils.h:463
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 1458 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().

1459  {
1460 
1461  // initialize the index to a negative value
1462  int pfIndex = -1;
1463 
1464  // initialize error code and L1 configuration code
1465  int iError = 0;
1466  int l1ConfCode = 0;
1467 
1468  // check if L1 configuration is available
1469 
1470  if (!availableL1Configuration(iError, l1ConfCode)) {
1471  errorCode = iError;
1472  return pfIndex;
1473  }
1474 
1475  // at this point, a valid L1 configuration is available, so the if/else if/else
1476  // can be simplified
1477 
1478  // retrieve L1GlobalTriggerRecord and 1GlobalTriggerReadoutRecord product
1479  // intermediate error code for the records
1480  // the module returns an error code only if both the lite and the readout record are missing
1481 
1482  int iErrorRecord = 0;
1483 
1484  bool validRecord = false;
1485  bool gtReadoutRecordValid = false;
1486 
1488  if( !m_l1GtUtilsHelper->l1GtRecordToken().isUninitialized() ) {
1489  iEvent.getByToken(m_l1GtUtilsHelper->l1GtRecordToken(), gtRecord);
1490  }
1491  if (gtRecord.isValid()) {
1492 
1493  validRecord = true;
1494 
1495  } else {
1496 
1497  iErrorRecord = 10;
1498  LogDebug("L1GtUtils") << "\nL1GlobalTriggerRecord with \n "
1499  << m_l1GtUtilsHelper->l1GtRecordInputTag() << "\nnot found in the event."
1500  << std::endl;
1501  }
1502 
1504  if( !m_l1GtUtilsHelper->l1GtReadoutRecordToken().isUninitialized() ) {
1505  iEvent.getByToken(m_l1GtUtilsHelper->l1GtReadoutRecordToken(), gtReadoutRecord);
1506  }
1507  if (gtReadoutRecord.isValid()) {
1508 
1509  gtReadoutRecordValid = true;
1510  validRecord = true;
1511 
1512  } else {
1513 
1514  iErrorRecord = iErrorRecord + 100;
1515  LogDebug("L1GtUtils") << "\nL1GlobalTriggerReadoutRecord with \n "
1516  << m_l1GtUtilsHelper->l1GtReadoutRecordInputTag() << "\nnot found in the event."
1517  << std::endl;
1518 
1519  }
1520 
1521  // get the prescale factor index from
1522  // L1GlobalTriggerReadoutRecord if valid
1523  // if not, from L1GlobalTriggerRecord if valid
1524  // else return an error
1525 
1526 
1527  int pfIndexTechTrig = -1;
1528  int pfIndexAlgoTrig = -1;
1529 
1530  if (validRecord) {
1531  if (gtReadoutRecordValid) {
1532 
1533  pfIndexTechTrig
1534  = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexTech();
1535  pfIndexAlgoTrig
1536  = (gtReadoutRecord->gtFdlWord()).gtPrescaleFactorIndexAlgo();
1537 
1538  } else {
1539 
1540  pfIndexTechTrig
1541  = static_cast<int> (gtRecord->gtPrescaleFactorIndexTech());
1542  pfIndexAlgoTrig
1543  = static_cast<int> (gtRecord->gtPrescaleFactorIndexAlgo());
1544 
1545  }
1546 
1547  } else {
1548 
1549  LogDebug("L1GtUtils") << "\nError: "
1550  << "\nNo valid L1GlobalTriggerRecord with \n "
1551  << m_l1GtUtilsHelper->l1GtRecordInputTag() << "\nfound in the event."
1552  << "\nNo valid L1GlobalTriggerReadoutRecord with \n "
1553  << m_l1GtUtilsHelper->l1GtReadoutRecordInputTag() << "\nfound in the event."
1554  << std::endl;
1555 
1556  iError = l1ConfCode + iErrorRecord;
1557 
1558  errorCode = iError;
1559  return pfIndex;
1560 
1561  }
1562 
1563  // depending on trigger category (algorithm trigger or technical trigger)
1564  // get the correct quantities
1565 
1566  // number of sets of prescale factors
1567  // index of prescale factor set retrieved from data
1568  // pointer to the actual prescale factor set
1569  // pointer to the set of trigger masks
1570 
1571  size_t pfSetsSize = 0;
1572 
1573  switch (trigCategory) {
1574  case AlgorithmTrigger: {
1576  if (m_l1GtMenuLiteValid) {
1577  pfSetsSize = m_prescaleFactorsAlgoTrigLite->size();
1578 
1579  } else {
1580  // fall through: L1 trigger configuration from event setup
1581  pfSetsSize = m_prescaleFactorsAlgoTrig->size();
1582 
1583  }
1584 
1585  } else {
1586  // L1 trigger configuration from event setup only
1587  pfSetsSize = m_prescaleFactorsAlgoTrig->size();
1588 
1589  }
1590 
1591  pfIndex = pfIndexAlgoTrig;
1592 
1593  }
1594  break;
1595  case TechnicalTrigger: {
1597  if (m_l1GtMenuLiteValid) {
1598  pfSetsSize = m_prescaleFactorsTechTrigLite->size();
1599 
1600  } else {
1601  // fall through: L1 trigger configuration from event setup
1602  pfSetsSize = m_prescaleFactorsTechTrig->size();
1603 
1604  }
1605 
1606  } else {
1607  // L1 trigger configuration from event setup only
1608  pfSetsSize = m_prescaleFactorsTechTrig->size();
1609 
1610  }
1611 
1612  pfIndex = pfIndexTechTrig;
1613 
1614  }
1615  break;
1616  default: {
1617  // should not be the case
1618  iError = l1ConfCode + iErrorRecord + 3;
1619  return iError;
1620 
1621  }
1622  break;
1623  }
1624 
1625 
1626  // test prescale factor set index correctness, then retrieve the actual set of prescale factors
1627 
1628  if (pfIndex < 0) {
1629 
1630  iError = l1ConfCode + iErrorRecord + 1000;
1631  LogDebug("L1GtUtils")
1632  << "\nError: index of prescale factor set retrieved from the data \n"
1633  << "less than zero."
1634  << "\n Value of index retrieved from data = " << pfIndex
1635  << std::endl;
1636 
1637  errorCode = iError;
1638  return pfIndex;
1639 
1640  } else if (pfIndex >= (static_cast<int>(pfSetsSize))) {
1641  iError = l1ConfCode + iErrorRecord + 2000;
1642  LogDebug("L1GtUtils")
1643  << "\nError: index of prescale factor set retrieved from the data \n"
1644  << "greater than the size of the vector of prescale factor sets."
1645  << "\n Value of index retrieved from data = " << pfIndex
1646  << "\n Vector size = " << pfSetsSize << std::endl;
1647 
1648  errorCode = iError;
1649  return pfIndex;
1650 
1651  } else {
1652 
1653  errorCode = iError;
1654  return pfIndex;
1655  }
1656 
1657  errorCode = iError;
1658  return pfIndex;
1659 
1660 }
#define LogDebug(id)
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:467
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:1948
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrigLite
Definition: L1GtUtils.h:446
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
Definition: L1GtUtils.h:402
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
Definition: L1GtUtils.h:401
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrigLite
Definition: L1GtUtils.h:447
const unsigned int gtPrescaleFactorIndexAlgo() const
bool isValid() const
Definition: HandleBase.h:74
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:469
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:449
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 1911 of file L1GtUtils.cc.

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

1911  {
1912 
1913  // initialize error code and return value
1914  int iError = 0;
1915  int l1ConfCode = 0;
1916 
1917  // check if L1 configuration is available
1918 
1919  if (!availableL1Configuration(iError, l1ConfCode)) {
1920  errorCode = iError;
1921  return 0;
1922  }
1923 
1925  if (m_l1GtMenuLiteValid) {
1926 
1927  errorCode = iError;
1928  return m_l1GtMenuLite;
1929 
1930  } else {
1931  iError = l1ConfCode;
1932 
1933  errorCode = iError;
1934  return 0;
1935  }
1936  } else {
1937  iError = l1ConfCode;
1938 
1939  errorCode = iError;
1940  return 0;
1941  }
1942 
1943  errorCode = iError;
1944  return m_l1GtMenuLite;
1945 
1946 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:467
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:1948
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:437
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:449
const L1GtTriggerMenu * L1GtUtils::ptrL1TriggerMenuEventSetup ( int &  errorCode)

return a pointer to the L1 trigger menu from event setup

Definition at line 1883 of file L1GtUtils.cc.

References availableL1Configuration(), m_l1GtMenu, and m_retrieveL1EventSetup.

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

1883  {
1884 
1885  // initialize error code and return value
1886  int iError = 0;
1887  int l1ConfCode = 0;
1888 
1889  // check if L1 configuration is available
1890 
1891  if (!availableL1Configuration(iError, l1ConfCode)) {
1892  errorCode = iError;
1893  return 0;
1894  }
1895 
1896  if (m_retrieveL1EventSetup) {
1897  errorCode = iError;
1898  return m_l1GtMenu;
1899  } else {
1900  iError = l1ConfCode;
1901 
1902  errorCode = iError;
1903  return 0;
1904 
1905  }
1906 
1907  errorCode = iError;
1908  return m_l1GtMenu;
1909 }
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:1948
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:466
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:424
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 121 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, hpstanc_transforms::max, and edm::ESHandle< T >::product().

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

121  {
122 
123  //
124  m_retrieveL1EventSetup = true;
125 
126  m_l1EventSetupValid = true;
127  // FIXME test for each record if valid; if not set m_l1EventSetupValid = false;
128 
129  // get / update the stable parameters from the EventSetup
130  // local cache & check on cacheIdentifier
131 
132  unsigned long long l1GtStableParCacheID =
133  evSetup.get<L1GtStableParametersRcd>().cacheIdentifier();
134 
135  if (m_l1GtStableParCacheID != l1GtStableParCacheID) {
136 
138  evSetup.get<L1GtStableParametersRcd>().get(l1GtStablePar);
139  m_l1GtStablePar = l1GtStablePar.product();
140 
141  // number of algorithm triggers
143 
144  // number of technical triggers
147 
148  int maxNumberTrigger = std::max(m_numberAlgorithmTriggers,
150 
151  m_triggerMaskSet.reserve(maxNumberTrigger);
152  m_prescaleFactorSet.reserve(maxNumberTrigger);
153 
154  //
155  m_l1GtStableParCacheID = l1GtStableParCacheID;
156 
157  }
158 
159  // get / update the prescale factors from the EventSetup
160  // local cache & check on cacheIdentifier
161 
162  unsigned long long l1GtPfAlgoCacheID =
163  evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().cacheIdentifier();
164 
165  if (m_l1GtPfAlgoCacheID != l1GtPfAlgoCacheID) {
166 
168  evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().get(l1GtPfAlgo);
169  m_l1GtPfAlgo = l1GtPfAlgo.product();
170 
172 
173  m_l1GtPfAlgoCacheID = l1GtPfAlgoCacheID;
174 
175  }
176 
177  unsigned long long l1GtPfTechCacheID = evSetup.get<
178  L1GtPrescaleFactorsTechTrigRcd>().cacheIdentifier();
179 
180  if (m_l1GtPfTechCacheID != l1GtPfTechCacheID) {
181 
183  evSetup.get<L1GtPrescaleFactorsTechTrigRcd>().get(l1GtPfTech);
184  m_l1GtPfTech = l1GtPfTech.product();
185 
187 
188  m_l1GtPfTechCacheID = l1GtPfTechCacheID;
189 
190  }
191 
192  // get / update the trigger mask from the EventSetup
193  // local cache & check on cacheIdentifier
194 
195  unsigned long long l1GtTmAlgoCacheID =
196  evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().cacheIdentifier();
197 
198  if (m_l1GtTmAlgoCacheID != l1GtTmAlgoCacheID) {
199 
201  evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().get(l1GtTmAlgo);
202  m_l1GtTmAlgo = l1GtTmAlgo.product();
203 
205 
206  m_l1GtTmAlgoCacheID = l1GtTmAlgoCacheID;
207 
208  }
209 
210  unsigned long long l1GtTmTechCacheID =
211  evSetup.get<L1GtTriggerMaskTechTrigRcd>().cacheIdentifier();
212 
213  if (m_l1GtTmTechCacheID != l1GtTmTechCacheID) {
214 
216  evSetup.get<L1GtTriggerMaskTechTrigRcd>().get(l1GtTmTech);
217  m_l1GtTmTech = l1GtTmTech.product();
218 
220 
221  m_l1GtTmTechCacheID = l1GtTmTechCacheID;
222 
223  }
224 
225  unsigned long long l1GtTmVetoAlgoCacheID =
226  evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd>().cacheIdentifier();
227 
228  if (m_l1GtTmVetoAlgoCacheID != l1GtTmVetoAlgoCacheID) {
229 
230  edm::ESHandle<L1GtTriggerMask> l1GtTmVetoAlgo;
231  evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd>().get(l1GtTmVetoAlgo);
232  m_l1GtTmVetoAlgo = l1GtTmVetoAlgo.product();
233 
235 
236  m_l1GtTmVetoAlgoCacheID = l1GtTmVetoAlgoCacheID;
237 
238  }
239 
240  unsigned long long l1GtTmVetoTechCacheID =
241  evSetup.get<L1GtTriggerMaskVetoTechTrigRcd>().cacheIdentifier();
242 
243  if (m_l1GtTmVetoTechCacheID != l1GtTmVetoTechCacheID) {
244 
245  edm::ESHandle<L1GtTriggerMask> l1GtTmVetoTech;
246  evSetup.get<L1GtTriggerMaskVetoTechTrigRcd>().get(l1GtTmVetoTech);
247  m_l1GtTmVetoTech = l1GtTmVetoTech.product();
248 
250 
251  m_l1GtTmVetoTechCacheID = l1GtTmVetoTechCacheID;
252 
253  }
254 
255  // get / update the trigger menu from the EventSetup
256  // local cache & check on cacheIdentifier
257 
258  unsigned long long l1GtMenuCacheID =
259  evSetup.get<L1GtTriggerMenuRcd>().cacheIdentifier();
260 
261  if (m_l1GtMenuCacheID != l1GtMenuCacheID) {
262 
264  evSetup.get<L1GtTriggerMenuRcd>().get(l1GtMenu);
265  m_l1GtMenu = l1GtMenu.product();
266 
269 
271 
272  m_l1GtMenuCacheID = l1GtMenuCacheID;
273 
274  }
275 
276 }
std::vector< unsigned int > m_triggerMaskSet
Definition: L1GtUtils.h:462
unsigned long long m_l1GtMenuCacheID
Definition: L1GtUtils.h:425
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
Definition: L1GtUtils.h:417
const std::vector< unsigned int > * m_triggerMaskTechTrig
Definition: L1GtUtils.h:418
const L1GtTriggerMask * m_l1GtTmVetoTech
Definition: L1GtUtils.h:414
const L1GtTriggerMask * m_l1GtTmAlgo
trigger masks & veto masks
Definition: L1GtUtils.h:405
const AlgorithmMap * m_algorithmMap
Definition: L1GtUtils.h:427
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
Definition: L1GtUtils.h:402
const L1GtStableParameters * m_l1GtStablePar
event setup cached stuff
Definition: L1GtUtils.h:385
unsigned long long m_l1GtPfAlgoCacheID
Definition: L1GtUtils.h:396
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
Definition: L1GtUtils.h:401
unsigned int gtNumberTechnicalTriggers() const
get / set the number of technical triggers
unsigned long long m_l1GtTmVetoTechCacheID
Definition: L1GtUtils.h:415
unsigned int gtNumberPhysTriggers() const
get / set the number of physics trigger algorithms
const AlgorithmMap * m_algorithmAliasMap
Definition: L1GtUtils.h:428
unsigned long long m_l1GtTmTechCacheID
Definition: L1GtUtils.h:409
const std::vector< unsigned int > & gtTriggerMask() const
get the trigger mask
const L1GtTriggerMask * m_l1GtTmVetoAlgo
Definition: L1GtUtils.h:411
const L1GtPrescaleFactors * m_l1GtPfAlgo
prescale factors
Definition: L1GtUtils.h:395
unsigned long long m_l1GtTmAlgoCacheID
Definition: L1GtUtils.h:406
unsigned int m_numberTechnicalTriggers
number of technical triggers
Definition: L1GtUtils.h:392
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
Definition: L1GtUtils.h:466
unsigned int m_numberAlgorithmTriggers
number of algorithm triggers
Definition: L1GtUtils.h:389
const L1GtTriggerMask * m_l1GtTmTech
Definition: L1GtUtils.h:408
const std::vector< std::vector< int > > & gtPrescaleFactors() const
get the prescale factors by reference
const L1GtPrescaleFactors * m_l1GtPfTech
Definition: L1GtUtils.h:398
const AlgorithmMap * m_technicalTriggerMap
Definition: L1GtUtils.h:429
const T & get() const
Definition: EventSetup.h:55
const std::vector< unsigned int > * m_triggerMaskVetoAlgoTrig
Definition: L1GtUtils.h:420
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:424
unsigned long long m_l1GtPfTechCacheID
Definition: L1GtUtils.h:399
const AlgorithmMap & gtTechnicalTriggerMap() const
get / set the technical trigger map
bool m_l1EventSetupValid
Definition: L1GtUtils.h:431
unsigned long long m_l1GtTmVetoAlgoCacheID
Definition: L1GtUtils.h:412
std::vector< int > m_prescaleFactorSet
Definition: L1GtUtils.h:463
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:386
const std::vector< unsigned int > * m_triggerMaskVetoTechTrig
Definition: L1GtUtils.h:421
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 279 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().

279  {
280 
282 
283  // get L1GtTriggerMenuLite
285  if( !m_l1GtUtilsHelper->l1GtTriggerMenuLiteToken().isUninitialized() ) {
286  iRun.getByToken(m_l1GtUtilsHelper->l1GtTriggerMenuLiteToken(), l1GtMenuLite);
287  }
288 
289  if (!l1GtMenuLite.isValid()) {
290 
291  LogDebug("L1GtUtils") << "\nL1GtTriggerMenuLite with \n "
292  << m_l1GtUtilsHelper->l1GtTriggerMenuLiteInputTag()
293  << "\nrequested, but not found in the run."
294  << std::endl;
295 
296  m_l1GtMenuLiteValid = false;
297  } else {
298  m_l1GtMenuLite = l1GtMenuLite.product();
299  m_l1GtMenuLiteValid = true;
300 
301  LogDebug("L1GtUtils") << "\nL1GtTriggerMenuLite with \n "
302  << m_l1GtUtilsHelper->l1GtTriggerMenuLiteInputTag() << "\nretrieved for run "
303  << iRun.runAuxiliary().run() << std::endl;
304 
308 
311 
316  }
317 }
#define LogDebug(id)
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:467
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:446
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmAliasMapLite
Definition: L1GtUtils.h:440
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmMapLite
Definition: L1GtUtils.h:439
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrigLite
Definition: L1GtUtils.h:447
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Run.h:240
const std::vector< unsigned int > & gtTriggerMaskTechTrig() const
get the trigger mask for technical triggers
const L1TriggerMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
const std::vector< std::vector< int > > & gtPrescaleFactorsTechTrig() const
bool isValid() const
Definition: HandleBase.h:74
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:437
T const * product() const
Definition: Handle.h:81
std::unique_ptr< L1GtUtilsHelper > m_l1GtUtilsHelper
Definition: L1GtUtils.h:469
const std::vector< unsigned int > * m_triggerMaskTechTrigLite
Definition: L1GtUtils.h:444
RunAuxiliary const & runAuxiliary() const
Definition: Run.h:59
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:449
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
Definition: L1GtUtils.h:443
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:441
RunNumber_t run() const
Definition: RunAuxiliary.h:41
const std::string L1GtUtils::triggerCategory ( const TriggerCategory trigCategory) const

public methods

Definition at line 100 of file L1GtUtils.cc.

References AlgorithmTrigger, EmptyString, and TechnicalTrigger.

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

101  {
102 
103  switch (trigCategory) {
104  case AlgorithmTrigger: {
105  return "Algorithm Trigger";
106  }
107  break;
108  case TechnicalTrigger: {
109  return "Technical Trigger";
110  }
111 
112  break;
113  default: {
114  return EmptyString;
115  }
116  break;
117  }
118 }
static const std::string EmptyString
Definition: L1GtUtils.h:368
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 1238 of file L1GtUtils.cc.

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

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

1239  {
1240 
1241  // initial values
1242  bool decisionBeforeMask = false;
1243  bool decisionAfterMask = false;
1244  int prescaleFactor = -1;
1245  int triggerMask = -1;
1246 
1247  errorCode = l1Results(iEvent, nameAlgoTechTrig, decisionBeforeMask,
1248  decisionAfterMask, prescaleFactor, triggerMask);
1249 
1250  return triggerMask;
1251 }
const int l1Results(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
Definition: L1GtUtils.cc:713
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:1238
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:1178
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:1193
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:1223
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 1253 of file L1GtUtils.cc.

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

1254  {
1255 
1256  // initial values for returned results
1257  int triggerMaskValue = -1;
1258 
1259  // initialize error code and L1 configuration code
1260  int iError = 0;
1261  int l1ConfCode = 0;
1262 
1263  // check if L1 configuration is available
1264 
1265  if (!availableL1Configuration(iError, l1ConfCode)) {
1266  errorCode = iError;
1267  return triggerMaskValue;
1268  }
1269 
1270  // at this point, a valid L1 configuration is available, so the if/else if/else
1271  // can be simplified
1272 
1273  // if the given name is not an algorithm trigger alias, an algorithm trigger name
1274  // or a technical trigger in the current menu, return with error code 1
1275 
1276  TriggerCategory trigCategory = AlgorithmTrigger;
1277  int bitNumber = -1;
1278 
1279  if (!l1AlgoTechTrigBitNumber(nameAlgoTechTrig, trigCategory, bitNumber)) {
1280 
1281  iError = l1ConfCode + 1;
1282 
1284  if (m_l1GtMenuLiteValid) {
1285 
1286  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n "
1287  << nameAlgoTechTrig
1288  << "\not found in the trigger menu \n "
1290  << "\nretrieved from L1GtTriggerMenuLite" << std::endl;
1291 
1292  } else {
1293 
1294  // fall through: L1 trigger configuration from event setup
1295  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n "
1296  << nameAlgoTechTrig
1297  << "\not found in the trigger menu \n "
1299  << "\nretrieved from Event Setup" << std::endl;
1300 
1301  }
1302 
1303  } else {
1304  // L1 trigger configuration from event setup only
1305  LogDebug("L1GtUtils") << "\nAlgorithm/technical trigger \n "
1306  << nameAlgoTechTrig
1307  << "\not found in the trigger menu \n "
1309  << "\nretrieved from Event Setup" << std::endl;
1310 
1311  }
1312 
1313  errorCode = iError;
1314  return triggerMaskValue;
1315 
1316  }
1317 
1318  // check here if a positive bit number was retrieved
1319  // exit in case of negative bit number, before retrieving L1 GT products, saving time
1320 
1321  if (bitNumber < 0) {
1322 
1323  iError = l1ConfCode + 2;
1324 
1326  if (m_l1GtMenuLiteValid) {
1327  LogDebug("L1GtUtils") << "\nNegative bit number for "
1328  << triggerCategory(trigCategory) << "\n "
1329  << nameAlgoTechTrig << "\nfrom menu \n "
1331  << "\nretrieved from L1GtTriggerMenuLite" << std::endl;
1332 
1333  } else {
1334  // fall through: L1 trigger configuration from event setup
1335  LogDebug("L1GtUtils") << "\nNegative bit number for "
1336  << triggerCategory(trigCategory) << "\n "
1337  << nameAlgoTechTrig << "\nfrom menu \n "
1339  << "\nretrieved from Event Setup" << std::endl;
1340 
1341  }
1342 
1343  } else {
1344  // L1 trigger configuration from event setup only
1345  LogDebug("L1GtUtils") << "\nNegative bit number for "
1346  << triggerCategory(trigCategory) << "\n "
1347  << nameAlgoTechTrig << "\nfrom menu \n "
1349  << "\nretrieved from Event Setup" << std::endl;
1350 
1351  }
1352 
1353  errorCode = iError;
1354  return triggerMaskValue;
1355  }
1356 
1357  // depending on trigger category (algorithm trigger or technical trigger)
1358  // get the correct quantities
1359 
1360  // pointer to the set of trigger masks
1361 
1362  const std::vector<unsigned int>* triggerMasksSet = 0;
1363 
1364  switch (trigCategory) {
1365  case AlgorithmTrigger: {
1367  if (m_l1GtMenuLiteValid) {
1368  triggerMasksSet = m_triggerMaskAlgoTrigLite;
1369 
1370  } else {
1371  // fall through: L1 trigger configuration from event setup
1372  triggerMasksSet = m_triggerMaskAlgoTrig;
1373 
1374  }
1375 
1376  } else {
1377  // L1 trigger configuration from event setup only
1378  triggerMasksSet = m_triggerMaskAlgoTrig;
1379 
1380  }
1381 
1382  }
1383  break;
1384  case TechnicalTrigger: {
1386  if (m_l1GtMenuLiteValid) {
1387  triggerMasksSet = m_triggerMaskTechTrigLite;
1388 
1389  } else {
1390  // fall through: L1 trigger configuration from event setup
1391  triggerMasksSet = m_triggerMaskTechTrig;
1392 
1393  }
1394 
1395  } else {
1396  // L1 trigger configuration from event setup only
1397  triggerMasksSet = m_triggerMaskTechTrig;
1398 
1399  }
1400 
1401  }
1402  break;
1403  default: {
1404  // should not be the case
1405  iError = l1ConfCode + 3;
1406 
1407  errorCode = iError;
1408  return triggerMaskValue;
1409 
1410  }
1411  break;
1412  }
1413 
1414  // trigger mask
1415 
1416  if (bitNumber < (static_cast<int> ((*triggerMasksSet).size()))) {
1417 
1419  if (m_l1GtMenuLiteValid) {
1420  triggerMaskValue = (*triggerMasksSet)[bitNumber];
1421 
1422  } else {
1423  // fall through: L1 trigger configuration from event setup
1424  // masks in event setup are for all partitions
1425  triggerMaskValue = ((*triggerMasksSet)[bitNumber]) & (1
1427 
1428  }
1429 
1430  } else {
1431  // L1 trigger configuration from event setup only
1432  // masks in event setup are for all partitions
1433  triggerMaskValue = ((*triggerMasksSet)[bitNumber]) & (1
1435 
1436  }
1437 
1438  } else {
1439  iError = l1ConfCode + 5000;
1440  LogDebug("L1GtUtils") << "\nError: bit number " << bitNumber
1441  << " retrieved for " << triggerCategory(trigCategory) << "\n "
1442  << nameAlgoTechTrig
1443  << "\ngreater than size of L1 GT trigger mask set: "
1444  << (*triggerMasksSet).size()
1445  << "\nError: Inconsistent L1 trigger configuration!"
1446  << std::endl;
1447 
1448  errorCode = iError;
1449  return triggerMaskValue;
1450 
1451  }
1452 
1453  errorCode = iError;
1454  return triggerMaskValue;
1455 
1456 }
#define LogDebug(id)
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:467
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
Definition: L1GtUtils.h:417
const std::vector< unsigned int > * m_triggerMaskTechTrig
Definition: L1GtUtils.h:418
const bool l1AlgoTechTrigBitNumber(const std::string &nameAlgoTechTrig, TriggerCategory &trigCategory, int &bitNumber) const
Definition: L1GtUtils.cc:376
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:1948
const std::string & gtTriggerMenuImplementation() const
const std::string triggerCategory(const TriggerCategory &) const
public methods
Definition: L1GtUtils.cc:100
unsigned int m_physicsDaqPartition
index of physics DAQ partition
Definition: L1GtUtils.h:460
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
Definition: L1GtUtils.h:437
const std::vector< unsigned int > * m_triggerMaskTechTrigLite
Definition: L1GtUtils.h:444
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:449
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
Definition: L1GtUtils.h:443
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1GtUtils.h:424
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 1734 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().

1735  {
1736 
1737  // clear the vector before filling it
1738  m_triggerMaskSet.clear();
1739 
1740  // initialize error code and L1 configuration code
1741  int iError = 0;
1742  int l1ConfCode = 0;
1743 
1744  // check if L1 configuration is available
1745 
1746  if (!availableL1Configuration(iError, l1ConfCode)) {
1747  errorCode = iError;
1748  return m_triggerMaskSet;
1749  }
1750 
1751  // at this point, a valid L1 configuration is available, so the if/else if/else
1752  // can be simplified
1753 
1754 
1755  // depending on trigger category (algorithm trigger or technical trigger)
1756  // get the correct quantities
1757 
1758  // pointer to the set of trigger masks
1759 
1760  switch (trigCategory) {
1761  case AlgorithmTrigger: {
1763  // L1GtTriggerMenuLite has masks for physics partition only
1764  // avoid copy to m_triggerMaskSet, return directly m_triggerMaskAlgoTrigLite
1765  if (m_l1GtMenuLiteValid) {
1766  errorCode = iError;
1767  return (*m_triggerMaskAlgoTrigLite);
1768 
1769  } else {
1770  // fall through: L1 trigger configuration from event setup
1771  for (unsigned i = 0; i < m_triggerMaskAlgoTrig->size(); i++) {
1772  m_triggerMaskSet.push_back(
1773  ((*m_triggerMaskAlgoTrig)[i]) & (1
1774  << m_physicsDaqPartition));
1775  }
1776 
1777  }
1778 
1779  } else {
1780  // L1 trigger configuration from event setup only
1781  for (unsigned i = 0; i < m_triggerMaskAlgoTrig->size(); i++) {
1782  m_triggerMaskSet.push_back(((*m_triggerMaskAlgoTrig)[i])
1783  & (1 << m_physicsDaqPartition));
1784  }
1785 
1786  }
1787  }
1788  break;
1789  case TechnicalTrigger: {
1791  if (m_l1GtMenuLiteValid) {
1792  errorCode = iError;
1793  return (*m_triggerMaskTechTrigLite);
1794 
1795  } else {
1796  // fall through: L1 trigger configuration from event setup
1797  for (unsigned i = 0; i < m_triggerMaskTechTrig->size(); i++) {
1798  m_triggerMaskSet.push_back(
1799  ((*m_triggerMaskTechTrig)[i]) & (1
1800  << m_physicsDaqPartition));
1801  }
1802 
1803  }
1804 
1805  } else {
1806  // L1 trigger configuration from event setup only
1807  for (unsigned i = 0; i < m_triggerMaskTechTrig->size(); i++) {
1808  m_triggerMaskSet.push_back(((*m_triggerMaskTechTrig)[i])
1809  & (1 << m_physicsDaqPartition));
1810  }
1811 
1812  }
1813  }
1814  break;
1815  default: {
1816  // should not be the case
1817  iError = l1ConfCode + 3;
1818 
1819  errorCode = iError;
1820  return m_triggerMaskSet;
1821 
1822  }
1823  break;
1824  }
1825 
1826  errorCode = iError;
1827  return m_triggerMaskSet;
1828 
1829 }
bool m_retrieveL1GtTriggerMenuLite
Definition: L1GtUtils.h:467
std::vector< unsigned int > m_triggerMaskSet
Definition: L1GtUtils.h:462
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
Definition: L1GtUtils.h:417
const std::vector< unsigned int > * m_triggerMaskTechTrig
Definition: L1GtUtils.h:418
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:1948
unsigned int m_physicsDaqPartition
index of physics DAQ partition
Definition: L1GtUtils.h:460
const std::vector< unsigned int > * m_triggerMaskTechTrigLite
Definition: L1GtUtils.h:444
bool m_l1GtMenuLiteValid
Definition: L1GtUtils.h:449
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
Definition: L1GtUtils.h:443
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 2052 of file L1GtUtils.cc.

References LogDebug, and triggerCategory().

Referenced by l1Results().

2054  {
2055 
2056  bool trigRes = false;
2057  errorCode = 0;
2058 
2059  if (bitNumber < (static_cast<int> (decWord.size()))) {
2060  trigRes = decWord[bitNumber];
2061  } else {
2062  errorCode = 3000;
2063  LogDebug("L1GtUtils") << "\nError: bit number " << bitNumber
2064  << " retrieved for " << triggerCategory(trigCategory) << "\n "
2065  << nameAlgoTechTrig
2066  << "\ngreater than size of L1 GT decision word: "
2067  << decWord.size()
2068  << "\nError: Inconsistent L1 trigger configuration!"
2069  << std::endl;
2070  }
2071 
2072  return trigRes;
2073 }
#define LogDebug(id)
const std::string triggerCategory(const TriggerCategory &) const
public methods
Definition: L1GtUtils.cc:100

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 427 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 452 of file L1GtUtils.h.

Referenced by getL1GtRunCache().

bool L1GtUtils::m_l1EventSetupValid
private

Definition at line 431 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 425 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 395 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtPfAlgoCacheID
private

Definition at line 396 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtPrescaleFactors* L1GtUtils::m_l1GtPfTech
private

Definition at line 398 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtPfTechCacheID
private

Definition at line 399 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtStableParameters* L1GtUtils::m_l1GtStablePar
private

event setup cached stuff

stable parameters

Definition at line 385 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtStableParCacheID
private

Definition at line 386 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtTriggerMask* L1GtUtils::m_l1GtTmAlgo
private

trigger masks & veto masks

Definition at line 405 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtTmAlgoCacheID
private

Definition at line 406 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtTriggerMask* L1GtUtils::m_l1GtTmTech
private

Definition at line 408 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtTmTechCacheID
private

Definition at line 409 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtTriggerMask* L1GtUtils::m_l1GtTmVetoAlgo
private

Definition at line 411 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtTmVetoAlgoCacheID
private

Definition at line 412 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

const L1GtTriggerMask* L1GtUtils::m_l1GtTmVetoTech
private

Definition at line 414 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned long long L1GtUtils::m_l1GtTmVetoTechCacheID
private

Definition at line 415 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 389 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned int L1GtUtils::m_numberTechnicalTriggers
private

number of technical triggers

Definition at line 392 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

unsigned int L1GtUtils::m_physicsDaqPartition
private

index of physics DAQ partition

Definition at line 460 of file L1GtUtils.h.

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

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

Definition at line 401 of file L1GtUtils.h.

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

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

Definition at line 446 of file L1GtUtils.h.

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

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

Definition at line 463 of file L1GtUtils.h.

Referenced by prescaleFactorSet(), and retrieveL1EventSetup().

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

Definition at line 402 of file L1GtUtils.h.

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

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

Definition at line 447 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 466 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 455 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 417 of file L1GtUtils.h.

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

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

Definition at line 443 of file L1GtUtils.h.

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

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

Definition at line 462 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup(), and triggerMaskSet().

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

Definition at line 418 of file L1GtUtils.h.

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

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

Definition at line 444 of file L1GtUtils.h.

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

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

Definition at line 420 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().

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

Definition at line 421 of file L1GtUtils.h.

Referenced by retrieveL1EventSetup().