#include <L1GtTriggerMenuLiteProducer.h>
Public Member Functions | |
L1GtTriggerMenuLiteProducer (const edm::ParameterSet &) | |
constructor(s) | |
virtual | ~L1GtTriggerMenuLiteProducer () |
destructor | |
Private Member Functions | |
virtual void | beginJob () override final |
void | beginRunProduce (edm::Run &, const edm::EventSetup &) override final |
virtual void | endJob () |
virtual void | produce (edm::Event &, const edm::EventSetup &) override final |
void | retrieveL1EventSetup (const edm::EventSetup &) |
Private Attributes | |
const AlgorithmMap * | m_algorithmAliasMap |
const AlgorithmMap * | m_algorithmMap |
const L1GtTriggerMenu * | m_l1GtMenu |
unsigned long long | m_l1GtMenuCacheID |
const L1GtPrescaleFactors * | m_l1GtPfAlgo |
prescale factors | |
unsigned long long | m_l1GtPfAlgoCacheID |
const L1GtPrescaleFactors * | m_l1GtPfTech |
unsigned long long | m_l1GtPfTechCacheID |
const L1GtStableParameters * | m_l1GtStablePar |
cached stuff | |
unsigned long long | m_l1GtStableParCacheID |
const L1GtTriggerMask * | m_l1GtTmAlgo |
trigger masks | |
unsigned long long | m_l1GtTmAlgoCacheID |
const L1GtTriggerMask * | m_l1GtTmTech |
unsigned long long | m_l1GtTmTechCacheID |
unsigned int | m_numberPhysTriggers |
number of physics triggers | |
unsigned int | m_numberTechnicalTriggers |
number of technical triggers | |
unsigned int | m_physicsDaqPartition |
index of physics DAQ partition | |
const std::vector< std::vector < int > > * | m_prescaleFactorsAlgoTrig |
const std::vector< std::vector < int > > * | m_prescaleFactorsTechTrig |
const AlgorithmMap * | m_technicalTriggerMap |
const std::vector< unsigned int > * | m_triggerMaskAlgoTrig |
const std::vector< unsigned int > * | m_triggerMaskTechTrig |
Description: L1GtTriggerMenuLite producer.
Implementation: Read the L1 trigger menu, the trigger masks and the prescale factor sets from event setup and save a lite version (top level menu, trigger masks for physics partition and prescale factor set) in Run Data.
$Date$ $Revision$
Definition at line 44 of file L1GtTriggerMenuLiteProducer.h.
L1GtTriggerMenuLiteProducer::L1GtTriggerMenuLiteProducer | ( | const edm::ParameterSet & | parSet | ) | [explicit] |
constructor(s)
Definition at line 53 of file L1GtTriggerMenuLiteProducer.cc.
: m_l1GtStableParCacheID(0ULL), m_numberPhysTriggers(0), m_numberTechnicalTriggers(0), m_l1GtMenuCacheID(0ULL), m_l1GtTmAlgoCacheID(0ULL), m_l1GtTmTechCacheID(0ULL), m_l1GtPfAlgoCacheID(0ULL), m_l1GtPfTechCacheID(0ULL), m_physicsDaqPartition(0) { // EDM product in Run Data produces<L1GtTriggerMenuLite, edm::InRun>(); }
L1GtTriggerMenuLiteProducer::~L1GtTriggerMenuLiteProducer | ( | ) | [virtual] |
void L1GtTriggerMenuLiteProducer::beginJob | ( | void | ) | [override, private, virtual] |
Reimplemented from edm::one::EDProducerBase.
Definition at line 197 of file L1GtTriggerMenuLiteProducer.cc.
{
// empty
}
void L1GtTriggerMenuLiteProducer::beginRunProduce | ( | edm::Run & | iRun, |
const edm::EventSetup & | evSetup | ||
) | [override, private] |
Definition at line 201 of file L1GtTriggerMenuLiteProducer.cc.
References L1GtTriggerMenu::gtScaleDbKey(), L1GtTriggerMenu::gtTriggerMenuImplementation(), L1GtTriggerMenu::gtTriggerMenuInterface(), L1GtTriggerMenu::gtTriggerMenuName(), edm::isDebugEnabled(), LogDebug, m_algorithmAliasMap, m_algorithmMap, m_l1GtMenu, m_numberPhysTriggers, m_numberTechnicalTriggers, m_physicsDaqPartition, m_prescaleFactorsAlgoTrig, m_prescaleFactorsTechTrig, m_technicalTriggerMap, m_triggerMaskAlgoTrig, m_triggerMaskTechTrig, edm::Run::put(), and retrieveL1EventSetup().
{ // retrieveL1EventSetup(evSetup); // produce the L1GtTriggerMenuLite std::auto_ptr<L1GtTriggerMenuLite> gtTriggerMenuLite(new L1GtTriggerMenuLite()); // lite L1 trigger menu gtTriggerMenuLite->setGtTriggerMenuInterface(m_l1GtMenu->gtTriggerMenuInterface()); gtTriggerMenuLite->setGtTriggerMenuName(m_l1GtMenu->gtTriggerMenuName()); gtTriggerMenuLite->setGtTriggerMenuImplementation(m_l1GtMenu->gtTriggerMenuImplementation()); gtTriggerMenuLite->setGtScaleDbKey(m_l1GtMenu->gtScaleDbKey()); // L1GtTriggerMenuLite::L1TriggerMap algMap; for (CItAlgo itAlgo = m_algorithmMap->begin(); itAlgo != m_algorithmMap->end(); itAlgo++) { unsigned int bitNumber = (itAlgo->second).algoBitNumber(); algMap[bitNumber] = itAlgo->first; } gtTriggerMenuLite->setGtAlgorithmMap(algMap); // L1GtTriggerMenuLite::L1TriggerMap algAliasMap; for (CItAlgo itAlgo = m_algorithmAliasMap->begin(); itAlgo != m_algorithmAliasMap->end(); itAlgo++) { unsigned int bitNumber = (itAlgo->second).algoBitNumber(); algAliasMap[bitNumber] = itAlgo->first; } gtTriggerMenuLite->setGtAlgorithmAliasMap(algAliasMap); // L1GtTriggerMenuLite::L1TriggerMap techMap; for (CItAlgo itAlgo = m_technicalTriggerMap->begin(); itAlgo != m_technicalTriggerMap->end(); itAlgo++) { unsigned int bitNumber = (itAlgo->second).algoBitNumber(); techMap[bitNumber] = itAlgo->first; } gtTriggerMenuLite->setGtTechnicalTriggerMap(techMap); // trigger masks std::vector<unsigned int> triggerMaskAlgoTrig(m_numberPhysTriggers, 0); int iBit = -1; for (std::vector<unsigned int>::const_iterator itBit = m_triggerMaskAlgoTrig->begin(); itBit != m_triggerMaskAlgoTrig->end(); itBit++) { iBit++; triggerMaskAlgoTrig[iBit] = (*itBit) & (1 << m_physicsDaqPartition); } gtTriggerMenuLite->setGtTriggerMaskAlgoTrig(triggerMaskAlgoTrig); // std::vector<unsigned int> triggerMaskTechTrig(m_numberTechnicalTriggers, 0); iBit = -1; for (std::vector<unsigned int>::const_iterator itBit = m_triggerMaskTechTrig->begin(); itBit != m_triggerMaskTechTrig->end(); itBit++) { iBit++; triggerMaskTechTrig[iBit] = (*itBit) & (1 << m_physicsDaqPartition); } gtTriggerMenuLite->setGtTriggerMaskTechTrig(triggerMaskTechTrig); // gtTriggerMenuLite->setGtPrescaleFactorsAlgoTrig(*m_prescaleFactorsAlgoTrig); gtTriggerMenuLite->setGtPrescaleFactorsTechTrig(*m_prescaleFactorsTechTrig); // print menu, trigger masks and prescale factors if (edm::isDebugEnabled()) { LogDebug("L1GtTriggerMenuLiteProducer") << *gtTriggerMenuLite; } // put records into event iRun.put(gtTriggerMenuLite); }
void L1GtTriggerMenuLiteProducer::endJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::one::EDProducerBase.
Definition at line 308 of file L1GtTriggerMenuLiteProducer.cc.
{
// empty now
}
void L1GtTriggerMenuLiteProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | evSetup | ||
) | [override, private, virtual] |
Implements edm::one::EDProducerBase.
Definition at line 301 of file L1GtTriggerMenuLiteProducer.cc.
{ }
void L1GtTriggerMenuLiteProducer::retrieveL1EventSetup | ( | const edm::EventSetup & | evSetup | ) | [private] |
retrieve all the relevant L1 trigger event setup records and cache them to improve the speed
Definition at line 79 of file L1GtTriggerMenuLiteProducer.cc.
References edm::EventSetup::get(), L1GtTriggerMenu::gtAlgorithmAliasMap(), L1GtTriggerMenu::gtAlgorithmMap(), L1GtStableParameters::gtNumberPhysTriggers(), L1GtStableParameters::gtNumberTechnicalTriggers(), L1GtPrescaleFactors::gtPrescaleFactors(), L1GtTriggerMenu::gtTechnicalTriggerMap(), L1GtTriggerMask::gtTriggerMask(), m_algorithmAliasMap, m_algorithmMap, 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_numberPhysTriggers, m_numberTechnicalTriggers, m_prescaleFactorsAlgoTrig, m_prescaleFactorsTechTrig, m_technicalTriggerMap, m_triggerMaskAlgoTrig, m_triggerMaskTechTrig, and edm::ESHandle< T >::product().
Referenced by beginRunProduce().
{ // get / update the stable parameters from the EventSetup // local cache & check on cacheIdentifier unsigned long long l1GtStableParCacheID = evSetup.get<L1GtStableParametersRcd>().cacheIdentifier(); if (m_l1GtStableParCacheID != l1GtStableParCacheID) { edm::ESHandle<L1GtStableParameters> l1GtStablePar; evSetup.get<L1GtStableParametersRcd>().get(l1GtStablePar); m_l1GtStablePar = l1GtStablePar.product(); // number of physics triggers m_numberPhysTriggers = m_l1GtStablePar->gtNumberPhysTriggers(); // number of technical triggers m_numberTechnicalTriggers = m_l1GtStablePar->gtNumberTechnicalTriggers(); // m_l1GtStableParCacheID = l1GtStableParCacheID; } // get / update the prescale factors from the EventSetup // local cache & check on cacheIdentifier unsigned long long l1GtPfAlgoCacheID = evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().cacheIdentifier(); if (m_l1GtPfAlgoCacheID != l1GtPfAlgoCacheID) { edm::ESHandle<L1GtPrescaleFactors> l1GtPfAlgo; evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().get(l1GtPfAlgo); m_l1GtPfAlgo = l1GtPfAlgo.product(); m_prescaleFactorsAlgoTrig = &(m_l1GtPfAlgo->gtPrescaleFactors()); m_l1GtPfAlgoCacheID = l1GtPfAlgoCacheID; } unsigned long long l1GtPfTechCacheID = evSetup.get< L1GtPrescaleFactorsTechTrigRcd>().cacheIdentifier(); if (m_l1GtPfTechCacheID != l1GtPfTechCacheID) { edm::ESHandle<L1GtPrescaleFactors> l1GtPfTech; evSetup.get<L1GtPrescaleFactorsTechTrigRcd>().get(l1GtPfTech); m_l1GtPfTech = l1GtPfTech.product(); m_prescaleFactorsTechTrig = &(m_l1GtPfTech->gtPrescaleFactors()); m_l1GtPfTechCacheID = l1GtPfTechCacheID; } // get / update the trigger mask from the EventSetup // local cache & check on cacheIdentifier unsigned long long l1GtTmAlgoCacheID = evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().cacheIdentifier(); if (m_l1GtTmAlgoCacheID != l1GtTmAlgoCacheID) { edm::ESHandle<L1GtTriggerMask> l1GtTmAlgo; evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().get(l1GtTmAlgo); m_l1GtTmAlgo = l1GtTmAlgo.product(); m_triggerMaskAlgoTrig = &(m_l1GtTmAlgo->gtTriggerMask()); m_l1GtTmAlgoCacheID = l1GtTmAlgoCacheID; } unsigned long long l1GtTmTechCacheID = evSetup.get<L1GtTriggerMaskTechTrigRcd>().cacheIdentifier(); if (m_l1GtTmTechCacheID != l1GtTmTechCacheID) { edm::ESHandle<L1GtTriggerMask> l1GtTmTech; evSetup.get<L1GtTriggerMaskTechTrigRcd>().get(l1GtTmTech); m_l1GtTmTech = l1GtTmTech.product(); m_triggerMaskTechTrig = &(m_l1GtTmTech->gtTriggerMask()); m_l1GtTmTechCacheID = l1GtTmTechCacheID; } // get / update the trigger menu from the EventSetup // local cache & check on cacheIdentifier unsigned long long l1GtMenuCacheID = evSetup.get<L1GtTriggerMenuRcd>().cacheIdentifier(); if (m_l1GtMenuCacheID != l1GtMenuCacheID) { edm::ESHandle<L1GtTriggerMenu> l1GtMenu; evSetup.get<L1GtTriggerMenuRcd>().get(l1GtMenu); m_l1GtMenu = l1GtMenu.product(); m_algorithmMap = &(m_l1GtMenu->gtAlgorithmMap()); m_algorithmAliasMap = &(m_l1GtMenu->gtAlgorithmAliasMap()); m_technicalTriggerMap = &(m_l1GtMenu->gtTechnicalTriggerMap()); m_l1GtMenuCacheID = l1GtMenuCacheID; } }
const AlgorithmMap* L1GtTriggerMenuLiteProducer::m_algorithmAliasMap [private] |
Definition at line 87 of file L1GtTriggerMenuLiteProducer.h.
Referenced by beginRunProduce(), and retrieveL1EventSetup().
const AlgorithmMap* L1GtTriggerMenuLiteProducer::m_algorithmMap [private] |
Definition at line 86 of file L1GtTriggerMenuLiteProducer.h.
Referenced by beginRunProduce(), and retrieveL1EventSetup().
const L1GtTriggerMenu* L1GtTriggerMenuLiteProducer::m_l1GtMenu [private] |
Definition at line 83 of file L1GtTriggerMenuLiteProducer.h.
Referenced by beginRunProduce(), and retrieveL1EventSetup().
unsigned long long L1GtTriggerMenuLiteProducer::m_l1GtMenuCacheID [private] |
Definition at line 84 of file L1GtTriggerMenuLiteProducer.h.
Referenced by retrieveL1EventSetup().
const L1GtPrescaleFactors* L1GtTriggerMenuLiteProducer::m_l1GtPfAlgo [private] |
prescale factors
Definition at line 101 of file L1GtTriggerMenuLiteProducer.h.
Referenced by retrieveL1EventSetup().
unsigned long long L1GtTriggerMenuLiteProducer::m_l1GtPfAlgoCacheID [private] |
Definition at line 102 of file L1GtTriggerMenuLiteProducer.h.
Referenced by retrieveL1EventSetup().
const L1GtPrescaleFactors* L1GtTriggerMenuLiteProducer::m_l1GtPfTech [private] |
Definition at line 104 of file L1GtTriggerMenuLiteProducer.h.
Referenced by retrieveL1EventSetup().
unsigned long long L1GtTriggerMenuLiteProducer::m_l1GtPfTechCacheID [private] |
Definition at line 105 of file L1GtTriggerMenuLiteProducer.h.
Referenced by retrieveL1EventSetup().
const L1GtStableParameters* L1GtTriggerMenuLiteProducer::m_l1GtStablePar [private] |
cached stuff
stable parameters
Definition at line 73 of file L1GtTriggerMenuLiteProducer.h.
Referenced by retrieveL1EventSetup().
unsigned long long L1GtTriggerMenuLiteProducer::m_l1GtStableParCacheID [private] |
Definition at line 74 of file L1GtTriggerMenuLiteProducer.h.
Referenced by retrieveL1EventSetup().
const L1GtTriggerMask* L1GtTriggerMenuLiteProducer::m_l1GtTmAlgo [private] |
trigger masks
Definition at line 91 of file L1GtTriggerMenuLiteProducer.h.
Referenced by retrieveL1EventSetup().
unsigned long long L1GtTriggerMenuLiteProducer::m_l1GtTmAlgoCacheID [private] |
Definition at line 92 of file L1GtTriggerMenuLiteProducer.h.
Referenced by retrieveL1EventSetup().
const L1GtTriggerMask* L1GtTriggerMenuLiteProducer::m_l1GtTmTech [private] |
Definition at line 94 of file L1GtTriggerMenuLiteProducer.h.
Referenced by retrieveL1EventSetup().
unsigned long long L1GtTriggerMenuLiteProducer::m_l1GtTmTechCacheID [private] |
Definition at line 95 of file L1GtTriggerMenuLiteProducer.h.
Referenced by retrieveL1EventSetup().
unsigned int L1GtTriggerMenuLiteProducer::m_numberPhysTriggers [private] |
number of physics triggers
Definition at line 77 of file L1GtTriggerMenuLiteProducer.h.
Referenced by beginRunProduce(), and retrieveL1EventSetup().
unsigned int L1GtTriggerMenuLiteProducer::m_numberTechnicalTriggers [private] |
number of technical triggers
Definition at line 80 of file L1GtTriggerMenuLiteProducer.h.
Referenced by beginRunProduce(), and retrieveL1EventSetup().
unsigned int L1GtTriggerMenuLiteProducer::m_physicsDaqPartition [private] |
index of physics DAQ partition
Definition at line 113 of file L1GtTriggerMenuLiteProducer.h.
Referenced by beginRunProduce().
const std::vector<std::vector<int> >* L1GtTriggerMenuLiteProducer::m_prescaleFactorsAlgoTrig [private] |
Definition at line 107 of file L1GtTriggerMenuLiteProducer.h.
Referenced by beginRunProduce(), and retrieveL1EventSetup().
const std::vector<std::vector<int> >* L1GtTriggerMenuLiteProducer::m_prescaleFactorsTechTrig [private] |
Definition at line 108 of file L1GtTriggerMenuLiteProducer.h.
Referenced by beginRunProduce(), and retrieveL1EventSetup().
const AlgorithmMap* L1GtTriggerMenuLiteProducer::m_technicalTriggerMap [private] |
Definition at line 88 of file L1GtTriggerMenuLiteProducer.h.
Referenced by beginRunProduce(), and retrieveL1EventSetup().
const std::vector<unsigned int>* L1GtTriggerMenuLiteProducer::m_triggerMaskAlgoTrig [private] |
Definition at line 97 of file L1GtTriggerMenuLiteProducer.h.
Referenced by beginRunProduce(), and retrieveL1EventSetup().
const std::vector<unsigned int>* L1GtTriggerMenuLiteProducer::m_triggerMaskTechTrig [private] |
Definition at line 98 of file L1GtTriggerMenuLiteProducer.h.
Referenced by beginRunProduce(), and retrieveL1EventSetup().