CMS 3D CMS Logo

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

using ReturnType = std::unique_ptr< L1RPCConeDefinition >
 
- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 

Public Member Functions

 L1RPCConeDefinitionProducer (const edm::ParameterSet &)
 
ReturnType produce (const L1RPCConeDefinitionRcd &)
 
 ~L1RPCConeDefinitionProducer () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- 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 () noexcept(false)
 

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
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollector setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 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 37 of file L1RPCConeDefinitionProducer.cc.

Member Typedef Documentation

Definition at line 42 of file L1RPCConeDefinitionProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 75 of file L1RPCConeDefinitionProducer.cc.

References edm::ParameterSet::getParameter(), mps_fire::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, dataset::name, edm::ESProducer::setWhatProduced(), and lumiQTWidget::t.

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

Definition at line 179 of file L1RPCConeDefinitionProducer.cc.

179 {}

Member Function Documentation

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

Definition at line 189 of file L1RPCConeDefinitionProducer.cc.

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

190 {
191  auto pL1RPCConeDefinition = std::make_unique<L1RPCConeDefinition>();
192 
193  pL1RPCConeDefinition->setFirstTower(m_towerBeg);
194  pL1RPCConeDefinition->setLastTower(m_towerEnd);
195 
196  pL1RPCConeDefinition->setLPSizeVec(m_LPSizeVec);
197  pL1RPCConeDefinition->setRingToLPVec(m_ringToLPVec);
198  pL1RPCConeDefinition->setRingToTowerVec(m_ringToTowerVec);
199 
200  return pL1RPCConeDefinition ;
201 }
L1RPCConeDefinition::TRingToLPVec m_ringToLPVec
L1RPCConeDefinition::TRingToTowerVec m_ringToTowerVec
L1RPCConeDefinition::TLPSizeVec m_LPSizeVec

Member Data Documentation

int L1RPCConeDefinitionProducer::m_hwPlaneBeg
private

Definition at line 51 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer().

int L1RPCConeDefinitionProducer::m_hwPlaneEnd
private

Definition at line 52 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer().

L1RPCConeDefinition::TLPSizeVec L1RPCConeDefinitionProducer::m_LPSizeVec
private

Definition at line 55 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer(), and produce().

L1RPCConeDefinition::TRingToLPVec L1RPCConeDefinitionProducer::m_ringToLPVec
private

Definition at line 61 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer(), and produce().

L1RPCConeDefinition::TRingToTowerVec L1RPCConeDefinitionProducer::m_ringToTowerVec
private

Definition at line 58 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer(), and produce().

int L1RPCConeDefinitionProducer::m_rollBeg
private

Definition at line 49 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer().

int L1RPCConeDefinitionProducer::m_rollEnd
private

Definition at line 50 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer().

int L1RPCConeDefinitionProducer::m_towerBeg
private

Definition at line 47 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer(), and produce().

int L1RPCConeDefinitionProducer::m_towerEnd
private

Definition at line 48 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer(), and produce().