1 #ifndef GlobalTriggerAnalyzer_L1GtUtils_h
2 #define GlobalTriggerAnalyzer_L1GtUtils_h
101 template <
typename T>
114 template <
typename T>
124 template <
typename T>
184 const std::vector<std::pair<std::string, int> >&
triggerMasks();
276 int& bitNumber)
const;
383 int& errorCode)
const;
496 template <
typename T>
502 :
L1GtUtils(pset, iC, useL1GtTriggerMenuLite, module, useEventSetupIn) {}
504 template <
typename T>
514 template <
typename T>
525 useL1GtTriggerMenuLite,
528 l1GtReadoutRecordInputTag,
529 l1GtTriggerMenuLiteInputTag,
532 template <
typename T>
547 l1GtReadoutRecordInputTag,
548 l1GtTriggerMenuLiteInputTag);
bool m_retrieveL1GtTriggerMenuLite
edm::RunID m_runIDCache
run cache ID
bool m_validLogicalExpression
true if the logical expression uses accepted L1GtLogicParser operators
const bool l1TriggerNameFromBit(const int &bitNumber, const TriggerCategory &trigCategory, std::string &aliasL1Trigger, std::string &nameL1Trigger) const
void l1Results(const edm::Event &iEvent)
void retrieveL1EventSetup(const edm::EventSetup &, bool isRun=true)
retrieve all the relevant L1 trigger event setup records and cache them to improve the speed ...
LogicalExpressionL1Results(const std::string &, L1GtUtils &)
constructor(s)
std::vector< std::pair< std::string, bool > > m_decisionsBeforeMask
std::vector< unsigned int > m_triggerMaskSet
unsigned long long m_l1GtMenuCacheID
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
const int logicalExpressionRunUpdate(const edm::Run &, const edm::EventSetup &, const std::string &)
std::vector< L1GtLogicParser::OperandToken > m_expL1Triggers
const L1GtTriggerMenuLite * ptrL1GtTriggerMenuLite(int &errorCode)
return a pointer to the L1GtTriggerMenuLite product
int m_l1ConfCode
code for L1 trigger configuration
const std::vector< unsigned int > * m_triggerMaskTechTrig
const L1GtTriggerMask * m_l1GtTmVetoTech
const bool l1AlgoTechTrigBitNumber(const std::string &nameAlgoTechTrig, TriggerCategory &trigCategory, int &bitNumber) const
const int prescaleFactorSetIndex(const edm::Event &iEvent, const TriggerCategory &trigCategory, int &errorCode) const
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrigLite
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > m_L1GtTriggerMenuRunToken
virtual ~L1GtUtils()
destructor
const L1GtTriggerMask * m_l1GtTmAlgo
trigger masks & veto masks
const AlgorithmMap * m_algorithmMap
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcd > m_L1GtTriggerMaskAlgoTrigRunToken
const std::vector< std::pair< std::string, int > > & prescaleFactors()
const bool decision(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
const L1GtStableParameters * m_l1GtStablePar
event setup cached stuff
unsigned long long m_l1GtPfAlgoCacheID
const std::vector< unsigned int > & triggerMaskSet(const TriggerCategory &trigCategory, int &errorCode)
const std::vector< std::pair< std::string, int > > & triggerMasks()
const std::string & l1TriggerMenu() const
return the L1 trigger menu name
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmAliasMapLite
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > m_L1GtTriggerMenuEventToken
const L1GtTriggerMenuLite::L1TriggerMap * m_algorithmMapLite
unsigned long long m_l1GtTmVetoTechCacheID
const std::vector< std::pair< std::string, bool > > & decisionsAfterMask()
std::vector< std::pair< std::string, int > > m_errorCodes
std::vector< std::pair< std::string, int > > m_triggerMasks
std::vector< std::pair< std::string, int > > m_prescaleFactors
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcd > m_L1GtPrescaleFactorsTechTrigRunToken
const std::vector< std::pair< std::string, bool > > & decisionsBeforeMask()
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcd > m_L1GtPrescaleFactorsAlgoTrigRunToken
const std::string & l1TriggerMenuImplementation() const
return the L1 trigger menu implementation
const AlgorithmMap * m_algorithmAliasMap
unsigned long long m_l1GtTmTechCacheID
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrigLite
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskTechTrigRcd > m_L1GtTriggerMaskTechTrigRunToken
const L1GtTriggerMask * m_l1GtTmVetoAlgo
std::vector< bool > DecisionWord
typedefs
static const std::string EmptyString
const std::string triggerCategory(const TriggerCategory &) const
public methods
edm::ESGetToken< L1GtStableParameters, L1GtStableParametersRcd > m_L1GtStableParametersEventToken
std::string m_logicalExpression
private members as input parameters
const L1GtPrescaleFactors * m_l1GtPfAlgo
prescale factors
unsigned long long m_l1GtTmAlgoCacheID
static void fillDescription(edm::ParameterSetDescription &desc)
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcd > m_L1GtTriggerMaskAlgoTrigEventToken
unsigned int m_numberTechnicalTriggers
number of technical triggers
std::vector< bool > m_expTriggerInMenu
const int l1Results(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, bool &decisionBeforeMask, bool &decisionAfterMask, int &prescaleFactor, int &triggerMask) const
const std::vector< L1GtLogicParser::OperandToken > & expL1Triggers()
list of triggers in the logical expression, trigger decisions, prescale factors and masks...
bool m_retrieveL1EventSetup
flags to check which method was used to retrieve L1 trigger configuration
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcd > m_L1GtPrescaleFactorsTechTrigEventToken
unsigned int m_physicsDaqPartition
index of physics DAQ partition
unsigned int m_numberAlgorithmTriggers
number of algorithm triggers
const int triggerMask(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
bool m_l1ResultsAlreadyCalled
set to true if the method l1Results was called once
const std::vector< int > & prescaleFactorSet(const edm::Event &iEvent, const TriggerCategory &trigCategory, int &errorCode)
bool m_expBitsTechTrigger
flag true, if the logical expression is built from technical trigger bits
std::vector< L1GtUtils::TriggerCategory > m_expTriggerCategory
trigger category for each L1 trigger in the logical expression
const L1GtTriggerMask * m_l1GtTmTech
const L1GtTriggerMenuLite * m_l1GtMenuLite
L1GtTriggerMenuLite cached stuff.
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
void reset(const std::vector< std::pair< std::string, bool > > &) const
reset for each L1 trigger the value from pair.second
size_t m_expL1TriggersSize
const L1GtPrescaleFactors * m_l1GtPfTech
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskVetoTechTrigRcd > m_L1GtTriggerMaskVetoTechTrigEventToken
const AlgorithmMap * m_technicalTriggerMap
static void fillDescription(edm::ParameterSetDescription &desc)
const std::vector< unsigned int > * m_triggerMaskVetoAlgoTrig
std::unique_ptr< L1GtUtilsHelper > m_l1GtUtilsHelper
const std::vector< unsigned int > * m_triggerMaskTechTrigLite
static const bool useL1GtTriggerMenuLite(true)
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskTechTrigRcd > m_L1GtTriggerMaskTechTrigEventToken
L1GtUtils(edm::ParameterSet const &pset, edm::ConsumesCollector &&iC, bool useL1GtTriggerMenuLite, UseEventSetupIn use=UseEventSetupIn::Run)
const std::vector< unsigned int > * m_triggerMaskAlgoTrigLite
bool m_beginRunCache
flag for call of getL1GtRunCache in beginRun
const bool trigResult(const DecisionWord &decWord, const int bitNumber, const std::string &nameAlgoTechTrig, const TriggerCategory &trigCategory, int &errorCode) const
void getL1GtRunCache(const edm::Run &, const edm::EventSetup &, const bool, const bool)
get all the run-constant quantities for L1 trigger and cache them
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskVetoAlgoTrigRcd > m_L1GtTriggerMaskVetoAlgoTrigEventToken
bool m_validL1Configuration
true if valid L1 configuration - if not, reset all quantities and return
const L1GtTriggerMenu * m_l1GtMenu
~LogicalExpressionL1Results()
destructor
unsigned long long m_l1GtPfTechCacheID
static const int L1GtNotValidError
std::vector< std::pair< std::string, bool > > m_decisionsAfterMask
unsigned long long m_l1GtTmVetoAlgoCacheID
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskVetoAlgoTrigRcd > m_L1GtTriggerMaskVetoAlgoTrigRunToken
std::vector< int > m_prescaleFactorSet
const L1GtTriggerMenu * ptrL1TriggerMenuEventSetup(int &errorCode)
return a pointer to the L1 trigger menu from event setup
edm::ESGetToken< L1GtStableParameters, L1GtStableParametersRcd > m_L1GtStableParametersRunToken
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
unsigned long long m_l1GtStableParCacheID
const L1GtTriggerMenuLite::L1TriggerMap * m_technicalTriggerMapLite
edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskVetoTechTrigRcd > m_L1GtTriggerMaskVetoTechTrigRunToken
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcd > m_L1GtPrescaleFactorsAlgoTrigEventToken
bool isValid()
return true if the logical expression is syntactically correct
const std::vector< unsigned int > * m_triggerMaskVetoTechTrig
void retrieveL1GtTriggerMenuLite(const edm::Run &)
retrieve L1GtTriggerMenuLite (per run product) and cache it to improve the speed
const std::vector< std::pair< std::string, int > > & errorCodes(const edm::Event &)
const int prescaleFactor(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger