CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
RPCTriggerHwConfig Class Reference
Inheritance diagram for RPCTriggerHwConfig:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

typedef std::auto_ptr
< L1RPCHwConfig
ReturnType
 
- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 

Public Member Functions

ReturnType produce (const L1RPCHwConfigRcd &)
 
 RPCTriggerHwConfig (const edm::ParameterSet &)
 
 ~RPCTriggerHwConfig ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider ()
 

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
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

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().

74 {
75  //the following line is needed to tell the framework what
76  // data is being produced
77  setWhatProduced(this);
78 
79  //now do what ever other initialization is needed
80  m_disableTowers = iConfig.getParameter<std::vector<int> >("disableTowers");
81  m_disableCrates = iConfig.getParameter<std::vector<int> >("disableCrates");
82  m_disableTowersInCrates = iConfig.getParameter<std::vector<int> >("disableTowersInCrates");
83 
84  m_disableAll = iConfig.getParameter<bool>("disableAll");
85 
86  m_enableTowers = iConfig.getParameter<std::vector<int> >("enableTowers");
87  m_enableCrates = iConfig.getParameter<std::vector<int> >("enableCrates");
88  m_enableTowersInCrates = iConfig.getParameter<std::vector<int> >("enableTowersInCrates");
89 
90  if (m_disableAll) {
91  m_disableTowers.clear();
92  m_disableCrates.clear();
93  m_disableTowersInCrates.clear();
94  // check if m_enableTowers & m_enableCrates are not empty?
95  }
96 
97 
98 
99 }
T getParameter(std::string const &) const
std::vector< int > m_disableCrates
std::vector< int > m_enableCrates
std::vector< int > m_disableTowers
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::vector< int > m_enableTowersInCrates
std::vector< int > m_enableTowers
std::vector< int > m_disableTowersInCrates
RPCTriggerHwConfig::~RPCTriggerHwConfig ( )

Definition at line 102 of file RPCTriggerHwConfig.cc.

103 {
104 
105  // do anything here that needs to be done at desctruction time
106  // (e.g. close files, deallocate resources etc.)
107 
108 }

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.

118 {
119  using namespace edm::es;
120  std::auto_ptr<L1RPCHwConfig> pL1RPCHwConfig = std::auto_ptr<L1RPCHwConfig>( new L1RPCHwConfig() );
121 
122  if (m_disableAll) {
123  pL1RPCHwConfig->enableAll(false);
124  std::vector<int>::iterator crIt = m_enableCrates.begin();
125  std::vector<int>::iterator twIt = m_enableTowers.begin();
126  for (; crIt!=m_enableCrates.end(); ++crIt){
127  pL1RPCHwConfig->enableCrate(*crIt,true);
128  }
129  for (; twIt!=m_enableTowers.end(); ++twIt){
130  pL1RPCHwConfig->enableTower(*twIt,true);
131  }
132  for (unsigned int It=0; It<m_enableTowersInCrates.size(); It++) {
133  if (It%2 == 0)
134  pL1RPCHwConfig->enableTowerInCrate(m_enableTowersInCrates[It+1], m_enableTowersInCrates[It], true);
135  }
136  } else {
137  std::vector<int>::iterator crIt = m_disableCrates.begin();
138  std::vector<int>::iterator twIt = m_disableTowers.begin();
139  for (; crIt!=m_disableCrates.end(); ++crIt){
140  pL1RPCHwConfig->enableCrate(*crIt,false);
141  }
142  for (; twIt!=m_disableTowers.end(); ++twIt){
143  pL1RPCHwConfig->enableTower(*twIt,false);
144  }
145  for (unsigned int It=0; It<m_disableTowersInCrates.size(); It++) {
146  if (It%2 == 0)
147  pL1RPCHwConfig->enableTowerInCrate(m_disableTowersInCrates[It+1], m_disableTowersInCrates[It], false);
148  }
149 
150  }
151 
152  return pL1RPCHwConfig ;
153 }
std::vector< int > m_disableCrates
std::vector< int > m_enableCrates
std::vector< int > m_disableTowers
std::vector< int > m_enableTowersInCrates
std::vector< int > m_enableTowers
std::vector< int > m_disableTowersInCrates

Member Data Documentation

bool RPCTriggerHwConfig::m_disableAll
private

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().