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_enableCrates |
std::vector< int > | m_enableTowers |
int | m_firstBX |
int | m_lastBX |
Implementation: <Notes on="" implementation>="">
Definition at line 40 of file RPCTriggerHwConfig.cc.
typedef std::auto_ptr<L1RPCHwConfig> RPCTriggerHwConfig::ReturnType |
Definition at line 45 of file RPCTriggerHwConfig.cc.
RPCTriggerHwConfig::RPCTriggerHwConfig | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 74 of file RPCTriggerHwConfig.cc.
References edm::ParameterSet::getParameter(), m_disableAll, m_disableCrates, m_disableTowers, m_enableCrates, m_enableTowers, m_firstBX, m_lastBX, and edm::ESProducer::setWhatProduced().
00075 { 00076 //the following line is needed to tell the framework what 00077 // data is being produced 00078 setWhatProduced(this); 00079 00080 //now do what ever other initialization is needed 00081 m_disableTowers = iConfig.getParameter<std::vector<int> >("disableTowers"); 00082 m_disableCrates = iConfig.getParameter<std::vector<int> >("disableCrates"); 00083 00084 m_disableAll = iConfig.getParameter<bool>("disableAll"); 00085 00086 m_enableTowers = iConfig.getParameter<std::vector<int> >("enableTowers"); 00087 m_enableCrates = iConfig.getParameter<std::vector<int> >("enableCrates"); 00088 00089 if (m_disableAll) { 00090 m_disableTowers.clear(); 00091 m_disableCrates.clear(); 00092 // check if m_enableTowers & m_enableCrates are not empty? 00093 } 00094 00095 m_firstBX = iConfig.getParameter<int>("firstBX"); 00096 m_lastBX = iConfig.getParameter<int>("lastBX"); 00097 00098 00099 }
RPCTriggerHwConfig::~RPCTriggerHwConfig | ( | ) |
Definition at line 102 of file RPCTriggerHwConfig.cc.
00103 { 00104 00105 // do anything here that needs to be done at desctruction time 00106 // (e.g. close files, deallocate resources etc.) 00107 00108 }
RPCTriggerHwConfig::ReturnType RPCTriggerHwConfig::produce | ( | const L1RPCHwConfigRcd & | iRecord | ) |
Definition at line 117 of file RPCTriggerHwConfig.cc.
References Exception, m_disableAll, m_disableCrates, m_disableTowers, m_enableCrates, m_enableTowers, m_firstBX, and m_lastBX.
00118 { 00119 using namespace edm::es; 00120 std::auto_ptr<L1RPCHwConfig> pL1RPCHwConfig = std::auto_ptr<L1RPCHwConfig>( new L1RPCHwConfig() ); 00121 00122 if (m_disableAll) { 00123 pL1RPCHwConfig->enableAll(false); 00124 std::vector<int>::iterator crIt = m_enableCrates.begin(); 00125 for (; crIt!=m_enableCrates.end(); ++crIt){ 00126 pL1RPCHwConfig->enableCrate(*crIt,true); 00127 } 00128 for (unsigned int It=0; It<m_enableTowers.size(); It++) { 00129 if (It%2 == 0) 00130 pL1RPCHwConfig->enableTowerInCrate(m_enableTowers[It+1], m_enableTowers[It], true); 00131 } 00132 } else { 00133 std::vector<int>::iterator crIt = m_disableCrates.begin(); 00134 for (; crIt!=m_disableCrates.end(); ++crIt){ 00135 pL1RPCHwConfig->enableCrate(*crIt,false); 00136 } 00137 for (unsigned int It=0; It<m_disableTowers.size(); It++) { 00138 if (It%2 == 0) 00139 pL1RPCHwConfig->enableTowerInCrate(m_disableTowers[It+1], m_disableTowers[It], false); 00140 } 00141 00142 } 00143 00144 if (m_firstBX > m_lastBX ) 00145 throw cms::Exception("BadConfig") << " firstBX < m_lastBX " << "\n"; 00146 00147 pL1RPCHwConfig->setFirstBX(m_firstBX); 00148 pL1RPCHwConfig->setLastBX(m_lastBX); 00149 00150 return pL1RPCHwConfig ; 00151 }
bool RPCTriggerHwConfig::m_disableAll [private] |
Definition at line 56 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_enableCrates [private] |
Definition at line 54 of file RPCTriggerHwConfig.cc.
Referenced by produce(), and RPCTriggerHwConfig().
std::vector<int> RPCTriggerHwConfig::m_enableTowers [private] |
Definition at line 53 of file RPCTriggerHwConfig.cc.
Referenced by produce(), and RPCTriggerHwConfig().
int RPCTriggerHwConfig::m_firstBX [private] |
Definition at line 58 of file RPCTriggerHwConfig.cc.
Referenced by produce(), and RPCTriggerHwConfig().
int RPCTriggerHwConfig::m_lastBX [private] |
Definition at line 59 of file RPCTriggerHwConfig.cc.
Referenced by produce(), and RPCTriggerHwConfig().