#include <L1GtPsbSetupTrivialProducer.h>
Public Member Functions | |
L1GtPsbSetupTrivialProducer (const edm::ParameterSet &) | |
constructor | |
boost::shared_ptr< L1GtPsbSetup > | producePsbSetup (const L1GtPsbSetupRcd &) |
public methods | |
~L1GtPsbSetupTrivialProducer () | |
destructor | |
Private Attributes | |
std::vector< L1GtPsbConfig > | m_gtPsbSetup |
L1 GT PSB boards and their setup. |
Description: ESProducer for the setup of L1 GT PSB boards.
Implementation: <TODO: enter implementation details>
$Date$ $Revision$
Definition at line 37 of file L1GtPsbSetupTrivialProducer.h.
L1GtPsbSetupTrivialProducer::L1GtPsbSetupTrivialProducer | ( | const edm::ParameterSet & | parSet | ) |
constructor
Definition at line 40 of file L1GtPsbSetupTrivialProducer.cc.
References edm::ParameterSet::getParameter(), m_gtPsbSetup, producePsbSetup(), L1GtPsbConfig::PsbNumberLvdsGroups, L1GtPsbConfig::PsbSerLinkNumberChannels, L1GtPsbConfig::setGtPsbCh0SendLvds(), L1GtPsbConfig::setGtPsbCh1SendLvds(), L1GtPsbConfig::setGtPsbEnableRecLvds(), L1GtPsbConfig::setGtPsbEnableRecSerLink(), and edm::ESProducer::setWhatProduced().
{ // tell the framework what data is being produced setWhatProduced(this, &L1GtPsbSetupTrivialProducer::producePsbSetup); // now do what ever other initialization is needed // detailed input configuration for PSB std::vector<edm::ParameterSet> psbSetup = parSet.getParameter<std::vector< edm::ParameterSet> > ("PsbSetup"); // reserve space for L1 GT boards m_gtPsbSetup.reserve(psbSetup.size()); std::vector<unsigned int> enableRecLvdsInt; enableRecLvdsInt.reserve(L1GtPsbConfig::PsbNumberLvdsGroups); std::vector<bool> enableRecLvds; enableRecLvds.reserve(L1GtPsbConfig::PsbNumberLvdsGroups); std::vector<unsigned int> enableRecSerLinkInt; enableRecSerLinkInt.reserve(L1GtPsbConfig::PsbSerLinkNumberChannels); std::vector<bool> enableRecSerLink; enableRecSerLink.reserve(L1GtPsbConfig::PsbSerLinkNumberChannels); for (std::vector<edm::ParameterSet>::const_iterator itPSet = psbSetup.begin(); itPSet != psbSetup.end(); ++itPSet) { // L1GtPsbConfig psbConfig(itPSet->getParameter<int> ("Slot")); psbConfig.setGtPsbCh0SendLvds( itPSet->getParameter<bool> ("Ch0SendLvds")); psbConfig.setGtPsbCh1SendLvds( itPSet->getParameter<bool> ("Ch1SendLvds")); enableRecLvdsInt = itPSet->getParameter<std::vector<unsigned int> > ( "EnableRecLvds"); for (std::vector<unsigned int>::const_iterator cIt = enableRecLvdsInt.begin(); cIt != enableRecLvdsInt.end(); ++cIt) { bool val = *cIt; enableRecLvds.push_back(val); } psbConfig.setGtPsbEnableRecLvds(enableRecLvds); enableRecLvds.clear(); enableRecSerLinkInt = itPSet->getParameter<std::vector<unsigned int> > ( "EnableRecSerLink"); for (std::vector<unsigned int>::const_iterator cIt = enableRecSerLinkInt.begin(); cIt != enableRecSerLinkInt.end(); ++cIt) { bool val = *cIt; enableRecSerLink.push_back(val); } psbConfig.setGtPsbEnableRecSerLink(enableRecSerLink); enableRecSerLink.clear(); // push the board in the vector m_gtPsbSetup.push_back(psbConfig); } }
L1GtPsbSetupTrivialProducer::~L1GtPsbSetupTrivialProducer | ( | ) |
boost::shared_ptr< L1GtPsbSetup > L1GtPsbSetupTrivialProducer::producePsbSetup | ( | const L1GtPsbSetupRcd & | iRecord | ) |
public methods
produce the setup for L1 GT PSB boards
Definition at line 119 of file L1GtPsbSetupTrivialProducer.cc.
References m_gtPsbSetup, and L1GtPsbSetup::setGtPsbSetup().
Referenced by L1GtPsbSetupTrivialProducer().
{ using namespace edm::es; boost::shared_ptr<L1GtPsbSetup> pL1GtPsbSetup = boost::shared_ptr< L1GtPsbSetup>(new L1GtPsbSetup()); pL1GtPsbSetup->setGtPsbSetup(m_gtPsbSetup); return pL1GtPsbSetup; }
std::vector<L1GtPsbConfig> L1GtPsbSetupTrivialProducer::m_gtPsbSetup [private] |
L1 GT PSB boards and their setup.
Definition at line 58 of file L1GtPsbSetupTrivialProducer.h.
Referenced by L1GtPsbSetupTrivialProducer(), and producePsbSetup().