#include <CondTools/L1Trigger/interface/L1TriggerKeyOnlineProd.h>
Public Types | |
typedef boost::shared_ptr < L1TriggerKey > | ReturnType |
Public Member Functions | |
L1TriggerKeyOnlineProd (const edm::ParameterSet &) | |
ReturnType | produce (const L1TriggerKeyRcd &) |
~L1TriggerKeyOnlineProd () | |
Private Attributes | |
std::vector< std::string > | m_subsystemLabels |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Description: Get L1TriggerKey objects from all subsystems and collate.
Usage: <usage>
Definition at line 38 of file L1TriggerKeyOnlineProd.h.
typedef boost::shared_ptr<L1TriggerKey> L1TriggerKeyOnlineProd::ReturnType |
Definition at line 43 of file L1TriggerKeyOnlineProd.h.
L1TriggerKeyOnlineProd::L1TriggerKeyOnlineProd | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 47 of file L1TriggerKeyOnlineProd.cc.
References edm::ESProducer::setWhatProduced().
: m_subsystemLabels( iConfig.getParameter< std::vector< std::string > >( "subsystemLabels" ) ) { //the following line is needed to tell the framework what // data is being produced setWhatProduced(this); //now do what ever other initialization is needed }
L1TriggerKeyOnlineProd::~L1TriggerKeyOnlineProd | ( | ) |
Definition at line 59 of file L1TriggerKeyOnlineProd.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
L1TriggerKeyOnlineProd::ReturnType L1TriggerKeyOnlineProd::produce | ( | const L1TriggerKeyRcd & | iRecord | ) |
Definition at line 74 of file L1TriggerKeyOnlineProd.cc.
References end, edm::eventsetup::EventSetupRecord::get(), and m_subsystemLabels.
{ using namespace edm::es; // Start with "SubsystemKeysOnly" edm::ESHandle< L1TriggerKey > subsystemKeys ; try { iRecord.get( "SubsystemKeysOnly", subsystemKeys ) ; } catch( l1t::DataAlreadyPresentException& ex ) { throw ex ; } boost::shared_ptr<L1TriggerKey> pL1TriggerKey ; pL1TriggerKey = boost::shared_ptr< L1TriggerKey >( new L1TriggerKey( *subsystemKeys ) ) ; // Collate object keys std::vector< std::string >::const_iterator itr = m_subsystemLabels.begin() ; std::vector< std::string >::const_iterator end = m_subsystemLabels.end() ; for( ; itr != end ; ++itr ) { edm::ESHandle< L1TriggerKey > objectKeys ; try { iRecord.get( *itr, objectKeys ) ; } catch( l1t::DataAlreadyPresentException& ex ) { throw ex ; } pL1TriggerKey->add( objectKeys->recordToKeyMap() ) ; } return pL1TriggerKey ; }
std::vector< std::string > L1TriggerKeyOnlineProd::m_subsystemLabels [private] |
Definition at line 48 of file L1TriggerKeyOnlineProd.h.
Referenced by produce().