test
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,
edm::propagate_const
< std::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 39 of file RPCTriggerHwConfig.cc.

Member Typedef Documentation

Definition at line 44 of file RPCTriggerHwConfig.cc.

Constructor & Destructor Documentation

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

Definition at line 72 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().

73 {
74  //the following line is needed to tell the framework what
75  // data is being produced
76  setWhatProduced(this);
77 
78  //now do what ever other initialization is needed
79  m_disableTowers = iConfig.getParameter<std::vector<int> >("disableTowers");
80  m_disableCrates = iConfig.getParameter<std::vector<int> >("disableCrates");
81  m_disableTowersInCrates = iConfig.getParameter<std::vector<int> >("disableTowersInCrates");
82 
83  m_disableAll = iConfig.getParameter<bool>("disableAll");
84 
85  m_enableTowers = iConfig.getParameter<std::vector<int> >("enableTowers");
86  m_enableCrates = iConfig.getParameter<std::vector<int> >("enableCrates");
87  m_enableTowersInCrates = iConfig.getParameter<std::vector<int> >("enableTowersInCrates");
88 
89  if (m_disableAll) {
90  m_disableTowers.clear();
91  m_disableCrates.clear();
92  m_disableTowersInCrates.clear();
93  // check if m_enableTowers & m_enableCrates are not empty?
94  }
95 
96 
97 
98 }
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 101 of file RPCTriggerHwConfig.cc.

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

Member Function Documentation

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

Definition at line 116 of file RPCTriggerHwConfig.cc.

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

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

Referenced by produce(), and RPCTriggerHwConfig().

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

Definition at line 50 of file RPCTriggerHwConfig.cc.

Referenced by produce(), and RPCTriggerHwConfig().

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

Definition at line 49 of file RPCTriggerHwConfig.cc.

Referenced by produce(), and RPCTriggerHwConfig().

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

Definition at line 51 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().

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

Definition at line 55 of file RPCTriggerHwConfig.cc.

Referenced by produce(), and RPCTriggerHwConfig().