CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

RPCTriggerHwConfig Class Reference

Inheritance diagram for RPCTriggerHwConfig:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Types

typedef std::auto_ptr
< L1RPCHwConfig
ReturnType

Public Member Functions

ReturnType produce (const L1RPCHwConfigRcd &)
 RPCTriggerHwConfig (const edm::ParameterSet &)
 ~RPCTriggerHwConfig ()

Private Attributes

bool m_disableAll
std::vector< int > m_disableCrates
std::vector< int > m_disableTowers
std::vector< int > m_disableTowersInCrates
std::vector< int > m_enableCrates
std::vector< int > m_enableTowers
std::vector< int > m_enableTowersInCrates

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 40 of file RPCTriggerHwConfig.cc.


Member Typedef Documentation

Definition at line 45 of file RPCTriggerHwConfig.cc.


Constructor & Destructor Documentation

RPCTriggerHwConfig::RPCTriggerHwConfig ( const edm::ParameterSet iConfig)

Definition at line 73 of file RPCTriggerHwConfig.cc.

References edm::ParameterSet::getParameter(), m_disableAll, m_disableCrates, m_disableTowers, m_disableTowersInCrates, m_enableCrates, m_enableTowers, m_enableTowersInCrates, and edm::ESProducer::setWhatProduced().

{
   //the following line is needed to tell the framework what
   // data is being produced
   setWhatProduced(this);

   //now do what ever other initialization is needed
    m_disableTowers =  iConfig.getParameter<std::vector<int> >("disableTowers");
    m_disableCrates =  iConfig.getParameter<std::vector<int> >("disableCrates");
    m_disableTowersInCrates =  iConfig.getParameter<std::vector<int> >("disableTowersInCrates");

    m_disableAll = iConfig.getParameter<bool>("disableAll");

    m_enableTowers =  iConfig.getParameter<std::vector<int> >("enableTowers");
    m_enableCrates =  iConfig.getParameter<std::vector<int> >("enableCrates");
    m_enableTowersInCrates =  iConfig.getParameter<std::vector<int> >("enableTowersInCrates");

    if (m_disableAll) {
      m_disableTowers.clear();
      m_disableCrates.clear();
      m_disableTowersInCrates.clear();
      // check if m_enableTowers  & m_enableCrates are not empty?
    }



}
RPCTriggerHwConfig::~RPCTriggerHwConfig ( )

Definition at line 102 of file RPCTriggerHwConfig.cc.

{
 
   // do anything here that needs to be done at desctruction time
   // (e.g. close files, deallocate resources etc.)

}

Member Function Documentation

RPCTriggerHwConfig::ReturnType RPCTriggerHwConfig::produce ( const L1RPCHwConfigRcd iRecord)

Definition at line 117 of file RPCTriggerHwConfig.cc.

References m_disableAll, m_disableCrates, m_disableTowers, m_disableTowersInCrates, m_enableCrates, m_enableTowers, and m_enableTowersInCrates.

{
   using namespace edm::es;
   std::auto_ptr<L1RPCHwConfig> pL1RPCHwConfig = std::auto_ptr<L1RPCHwConfig>( new L1RPCHwConfig() );

   if (m_disableAll) {
     pL1RPCHwConfig->enableAll(false);
     std::vector<int>::iterator crIt = m_enableCrates.begin();
     std::vector<int>::iterator twIt = m_enableTowers.begin();
     for (; crIt!=m_enableCrates.end(); ++crIt){
       pL1RPCHwConfig->enableCrate(*crIt,true);
     }
     for (; twIt!=m_enableTowers.end(); ++twIt){
       pL1RPCHwConfig->enableTower(*twIt,true);
     }
     for (unsigned int It=0; It<m_enableTowersInCrates.size(); It++) {
       if (It%2 == 0)
       pL1RPCHwConfig->enableTowerInCrate(m_enableTowersInCrates[It+1], m_enableTowersInCrates[It], true);
     }
   } else {
     std::vector<int>::iterator crIt = m_disableCrates.begin();
     std::vector<int>::iterator twIt = m_disableTowers.begin();
     for (; crIt!=m_disableCrates.end(); ++crIt){
       pL1RPCHwConfig->enableCrate(*crIt,false);
     }
     for (; twIt!=m_disableTowers.end(); ++twIt){
       pL1RPCHwConfig->enableTower(*twIt,false);
     }
     for (unsigned int It=0; It<m_disableTowersInCrates.size(); It++) {
       if (It%2 == 0)
       pL1RPCHwConfig->enableTowerInCrate(m_disableTowersInCrates[It+1], m_disableTowersInCrates[It], false);
     }

   }

   return pL1RPCHwConfig ;
}

Member Data Documentation

Definition at line 58 of file RPCTriggerHwConfig.cc.

Referenced by produce(), and RPCTriggerHwConfig().

std::vector<int> RPCTriggerHwConfig::m_disableCrates [private]

Definition at line 51 of file RPCTriggerHwConfig.cc.

Referenced by produce(), and RPCTriggerHwConfig().

std::vector<int> RPCTriggerHwConfig::m_disableTowers [private]

Definition at line 50 of file RPCTriggerHwConfig.cc.

Referenced by produce(), and RPCTriggerHwConfig().

std::vector<int> RPCTriggerHwConfig::m_disableTowersInCrates [private]

Definition at line 52 of file RPCTriggerHwConfig.cc.

Referenced by produce(), and RPCTriggerHwConfig().

std::vector<int> RPCTriggerHwConfig::m_enableCrates [private]

Definition at line 55 of file RPCTriggerHwConfig.cc.

Referenced by produce(), and RPCTriggerHwConfig().

std::vector<int> RPCTriggerHwConfig::m_enableTowers [private]

Definition at line 54 of file RPCTriggerHwConfig.cc.

Referenced by produce(), and RPCTriggerHwConfig().

std::vector<int> RPCTriggerHwConfig::m_enableTowersInCrates [private]

Definition at line 56 of file RPCTriggerHwConfig.cc.

Referenced by produce(), and RPCTriggerHwConfig().