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
L1RPCConeDefinitionProducer Class Reference
Inheritance diagram for L1RPCConeDefinitionProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

typedef boost::shared_ptr
< L1RPCConeDefinition
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

 L1RPCConeDefinitionProducer (const edm::ParameterSet &)
 
ReturnType produce (const L1RPCConeDefinitionRcd &)
 
 ~L1RPCConeDefinitionProducer ()
 
- 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

int m_hwPlaneBeg
 
int m_hwPlaneEnd
 
L1RPCConeDefinition::TLPSizeVec m_LPSizeVec
 
L1RPCConeDefinition::TRingToLPVec m_ringToLPVec
 
L1RPCConeDefinition::TRingToTowerVec m_ringToTowerVec
 
int m_rollBeg
 
int m_rollEnd
 
int m_towerBeg
 
int m_towerEnd
 

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 38 of file L1RPCConeDefinitionProducer.cc.

Member Typedef Documentation

Definition at line 43 of file L1RPCConeDefinitionProducer.cc.

Constructor & Destructor Documentation

L1RPCConeDefinitionProducer::L1RPCConeDefinitionProducer ( const edm::ParameterSet iConfig)

Definition at line 76 of file L1RPCConeDefinitionProducer.cc.

References edm::ParameterSet::getParameter(), i, L1RPCConeDefinition::TRingToTower::m_etaPart, L1RPCConeDefinition::TRingToLP::m_etaPart, L1RPCConeDefinition::TRingToTower::m_hwPlane, L1RPCConeDefinition::TRingToLP::m_hwPlane, m_hwPlaneBeg, m_hwPlaneEnd, L1RPCConeDefinition::TRingToTower::m_index, L1RPCConeDefinition::TRingToLP::m_index, L1RPCConeDefinition::TLPSize::m_LP, L1RPCConeDefinition::TRingToLP::m_LP, m_LPSizeVec, m_ringToLPVec, m_ringToTowerVec, m_rollBeg, m_rollEnd, L1RPCConeDefinition::TLPSize::m_size, L1RPCConeDefinition::TLPSize::m_tower, L1RPCConeDefinition::TRingToTower::m_tower, m_towerBeg, m_towerEnd, mergeVDriftHistosByStation::name, edm::ESProducer::setWhatProduced(), and edmStreamStallGrapher::t.

76  :
77  m_towerBeg(iConfig.getParameter<int>("towerBeg")),
78  m_towerEnd(iConfig.getParameter<int>("towerEnd")),
79  m_rollBeg(iConfig.getParameter<int>("rollBeg")),
80  m_rollEnd(iConfig.getParameter<int>("rollEnd")),
81  m_hwPlaneBeg(iConfig.getParameter<int>("hwPlaneBeg")),
82  m_hwPlaneEnd(iConfig.getParameter<int>("hwPlaneEnd"))
83 {
84  //the following line is needed to tell the framework what
85  // data is being produced
86  setWhatProduced(this);
87 
88  for (int t = m_towerBeg; t <= m_towerEnd; ++t){
89 
90  std::stringstream name;
91  name << "lpSizeTower" << t;
92 
93 
94  std::vector<int> newSizes =
95  iConfig.getParameter<std::vector<int> >(name.str().c_str());
96 
97  for (unsigned int lp = 0; lp < newSizes.size();++lp){
98 // L1RPCConeDefinition::TLPSize lps(t, lp, newSizes[lp]);
100  lps.m_tower=t;
101  lps.m_LP=lp;
102  lps.m_size=newSizes[lp];
103  m_LPSizeVec.push_back(lps);
104  }
105 
106 
107 
108  }
109 
110 
111 
112  //now do what ever other initialization is needed
113 
114  // hw planes numbered from 0 to 5
115  // rolls from 0 to 17 (etaPartition)
116  //
117  // rollConnLP_[roll]_[hwPlane-1]
118  // rollConnLP_5_3 = cms.vint32(6, 0, 0),
119  // ----- roll 5, hwPlane 4 (3+1) is logplane 6 (OK)
120  //
121  // rollConnT_[roll]_[hwPlane-1]
122  // rollConnT_5_3 = cms.vint32(4, -1, -1),
123  // ----- roll 5, hwPlane 4 (3+1) contirubtes to tower 4 (OK)
124 
125  for (int roll = m_rollBeg; roll <= m_rollEnd; ++roll){
126  //L1RPCConeDefinition::THWplaneToTower newHwPlToTower;
127  //L1RPCConeDefinition::THWplaneToLP newHWplaneToLP;
128  for (int hwpl = m_hwPlaneBeg; hwpl <= m_hwPlaneEnd; ++hwpl){
129  std::stringstream name;
130  name << "rollConnLP_" << roll << "_" << hwpl;
131 
132  std::vector<int> hwPl2LPVec = iConfig.getParameter<std::vector<int> >(name.str().c_str());
133  //newHWplaneToLP.push_back(newListLP);
134  for (unsigned int i = 0;i < hwPl2LPVec.size();++i){
135 
136  if (hwPl2LPVec[i]>=0)
137  {
138 // L1RPCConeDefinition::TRingToLP lp(roll, hwpl, hwPl2LPVec[i],i);
140  lp.m_etaPart=roll;
141  lp.m_hwPlane=hwpl;
142  lp.m_LP=hwPl2LPVec[i];
143  lp.m_index=i;
144  m_ringToLPVec.push_back(lp);
145  }
146  }
147 
148 
149  std::stringstream name1;
150  name1 << "rollConnT_" << roll << "_" << hwpl;
151 
152  /*L1RPCConeDefinition::TLPList newListT =
153  iConfig.getParameter<std::vector<int> >(name1.str().c_str());
154  newHwPlToTower.push_back(newListT);*/
155  std::vector<int> hwPl2TowerVec = iConfig.getParameter<std::vector<int> >(name1.str().c_str());
156 
157  for (unsigned int i = 0;i < hwPl2TowerVec.size();++i){
158 
159  if (hwPl2TowerVec[i]>=0)
160  {
161 // L1RPCConeDefinition::TRingToTower rt(roll, hwpl, hwPl2TowerVec[i],i);
163  rt.m_etaPart=roll;
164  rt.m_hwPlane=hwpl;
165  rt.m_tower=hwPl2TowerVec[i];
166  rt.m_index=i;
167  m_ringToTowerVec.push_back(rt);
168  }
169  }
170 
171 
172  }
173  //m_RingsToTowers.push_back(newHwPlToTower);
174 
175  //m_RingsToLP.push_back(newHWplaneToLP);
176  }
177 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
L1RPCConeDefinition::TRingToLPVec m_ringToLPVec
L1RPCConeDefinition::TRingToTowerVec m_ringToTowerVec
L1RPCConeDefinition::TLPSizeVec m_LPSizeVec
L1RPCConeDefinitionProducer::~L1RPCConeDefinitionProducer ( )

Definition at line 180 of file L1RPCConeDefinitionProducer.cc.

180 {}

Member Function Documentation

L1RPCConeDefinitionProducer::ReturnType L1RPCConeDefinitionProducer::produce ( const L1RPCConeDefinitionRcd iRecord)

Definition at line 190 of file L1RPCConeDefinitionProducer.cc.

References m_LPSizeVec, m_ringToLPVec, m_ringToTowerVec, m_towerBeg, and m_towerEnd.

191 {
192  using namespace edm::es;
193  boost::shared_ptr<L1RPCConeDefinition> pL1RPCConeDefinition(new L1RPCConeDefinition);
194 
195  pL1RPCConeDefinition->setFirstTower(m_towerBeg);
196  pL1RPCConeDefinition->setLastTower(m_towerEnd);
197 
198  pL1RPCConeDefinition->setLPSizeVec(m_LPSizeVec);
199  pL1RPCConeDefinition->setRingToLPVec(m_ringToLPVec);
200  pL1RPCConeDefinition->setRingToTowerVec(m_ringToTowerVec);
201 
202 
203  return pL1RPCConeDefinition ;
204 }
L1RPCConeDefinition::TRingToLPVec m_ringToLPVec
L1RPCConeDefinition::TRingToTowerVec m_ringToTowerVec
L1RPCConeDefinition::TLPSizeVec m_LPSizeVec

Member Data Documentation

int L1RPCConeDefinitionProducer::m_hwPlaneBeg
private

Definition at line 52 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer().

int L1RPCConeDefinitionProducer::m_hwPlaneEnd
private

Definition at line 53 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer().

L1RPCConeDefinition::TLPSizeVec L1RPCConeDefinitionProducer::m_LPSizeVec
private

Definition at line 56 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer(), and produce().

L1RPCConeDefinition::TRingToLPVec L1RPCConeDefinitionProducer::m_ringToLPVec
private

Definition at line 62 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer(), and produce().

L1RPCConeDefinition::TRingToTowerVec L1RPCConeDefinitionProducer::m_ringToTowerVec
private

Definition at line 59 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer(), and produce().

int L1RPCConeDefinitionProducer::m_rollBeg
private

Definition at line 50 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer().

int L1RPCConeDefinitionProducer::m_rollEnd
private

Definition at line 51 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer().

int L1RPCConeDefinitionProducer::m_towerBeg
private

Definition at line 48 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer(), and produce().

int L1RPCConeDefinitionProducer::m_towerEnd
private

Definition at line 49 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer(), and produce().