CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
RPCConeBuilder Class Reference

#include <L1Trigger/RPCTriggerConfig/src/RPCConeBuilder.cc>

Inheritance diagram for RPCConeBuilder:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

typedef std::shared_ptr< L1RPCConeBuilderReturnType
 
- 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

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

std::pair< int, int > areConnected (RPCStripsRing::TIdToRindMap::iterator ref, RPCStripsRing::TIdToRindMap::iterator other)
 
void buildCones (const edm::ESHandle< RPCGeometry > &rpcGeom)
 
void buildConnections ()
 

Private Attributes

int m_hwPlaneBeg
 
int m_hwPlaneEnd
 
edm::ESHandle< L1RPCConeDefinitionm_L1RPCConeDefinition
 
RPCStripsRing::TIdToRindMap m_ringsMap
 
int m_rollBeg
 
int m_rollEnd
 
edm::ESHandle< RPCGeometrym_rpcGeometry
 
bool m_runOnceBuildCones
 
int m_towerBeg
 Returns logplane number for this connection, if not connected returns -1. In second lpSize. More...
 
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::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())
 
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>="">

Usage: <usage>

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 35 of file RPCConeBuilder.h.

Member Typedef Documentation

typedef std::shared_ptr<L1RPCConeBuilder> RPCConeBuilder::ReturnType

Definition at line 39 of file RPCConeBuilder.h.

Constructor & Destructor Documentation

RPCConeBuilder::RPCConeBuilder ( const edm::ParameterSet iConfig)

Definition at line 42 of file RPCConeBuilder.cc.

References coneDefCallback(), edm::eventsetup::dependsOn(), geometryCallback(), and edm::ESProducer::setWhatProduced().

42  :
43  m_towerBeg(iConfig.getParameter<int>("towerBeg")),
44  m_towerEnd(iConfig.getParameter<int>("towerEnd")),
45  m_runOnceBuildCones(false)
46  //m_rollBeg(iConfig.getParameter<int>("rollBeg")),
47  //m_rollEnd(iConfig.getParameter<int>("rollEnd")),
48  //m_hwPlaneBeg(iConfig.getParameter<int>("hwPlaneBeg")),
49  //m_hwPlaneEnd(iConfig.getParameter<int>("hwPlaneEnd"))
50 {
51 
54  );
55 
56  /* TT
57  for (int i = m_towerBeg; i <= m_towerEnd; ++i){
58 
59  std::stringstream name;
60  name << "lpSizeTower" << i;
61 
62  L1RPCConeBuilder::TLogPlaneSize newSizes =
63  iConfig.getParameter<std::vector<int> >(name.str().c_str());
64 
65  m_LPSizesInTowers.push_back(newSizes);
66 
67  }
68 
69  */
70 
71  // hw planes numbered from 0 to 5
72  // rolls from 0 to 17 (etaPartition)
73  //
74  // rollConnLP_[roll]_[hwPlane-1]
75  // rollConnLP_5_3 = cms.vint32(6, 0, 0),
76  // ----- roll 5, hwPlane 4 (3+1) is logplane 6 (OK)
77  //
78  // rollConnT_[roll]_[hwPlane-1]
79  // rollConnT_5_3 = cms.vint32(4, -1, -1),
80  // ----- roll 5, hwPlane 4 (3+1) contirubtes to tower 4 (OK)
81 
82  /*
83  for (int roll = m_rollBeg; roll <= m_rollEnd; ++roll){
84  L1RPCConeDefinition::THWplaneToTower newHwPlToTower;
85  L1RPCConeDefinition::THWplaneToLP newHWplaneToLP;
86  for (int hwpl = m_hwPlaneBeg; hwpl <= m_hwPlaneEnd; ++hwpl){
87  std::stringstream name;
88  name << "rollConnLP_" << roll << "_" << hwpl;
89 
90  L1RPCConeDefinition::TTowerList newListLP =
91  iConfig.getParameter<std::vector<int> >(name.str().c_str());
92  newHWplaneToLP.push_back(newListLP);
93 
94 
95  std::stringstream name1;
96  name1 << "rollConnT_" << roll << "_" << hwpl;
97 
98  L1RPCConeDefinition::TLPList newListT =
99  iConfig.getParameter<std::vector<int> >(name1.str().c_str());
100  newHwPlToTower.push_back(newListT);
101  }
102  m_RingsToTowers.push_back(newHwPlToTower);
103  m_RingsToLP.push_back(newHWplaneToLP);
104  }
105  */
106 }
T getParameter(std::string const &) const
depends_on::OneHolder< T, TDependsOnRecord > dependsOn(void(T::*iT)(const TDependsOnRecord &))
bool m_runOnceBuildCones
void geometryCallback(const MuonGeometryRecord &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void coneDefCallback(const L1RPCConeDefinitionRcd &)
int m_towerBeg
Returns logplane number for this connection, if not connected returns -1. In second lpSize...
RPCConeBuilder::~RPCConeBuilder ( )
inline

Member Function Documentation

std::pair< int, int > RPCConeBuilder::areConnected ( RPCStripsRing::TIdToRindMap::iterator  ref,
RPCStripsRing::TIdToRindMap::iterator  other 
)
private

Definition at line 351 of file RPCConeBuilder.cc.

References funct::abs(), Exception, L1RPCConeDefinition::getLPSizeVec(), L1RPCConeDefinition::getRingToLPVec(), L1RPCConeDefinition::getRingToTowerVec(), diffTreeTool::index, and m_L1RPCConeDefinition.

Referenced by buildConnections(), and ~RPCConeBuilder().

352  {
353 
354  int logplane = -1;
355 
356  //std::cout << "Checking " << ref->first << " and " << other->first << std::endl;
357 
358  // Do not connect rolls lying on the oposite side of detector
359  if ( ref->second.getEtaPartition()*other->second.getEtaPartition()<0 )
360  return std::make_pair(-1,0);
361 
362 
363  /*std::cout << "Ref " << ref->second.getEtaPartition() << " " <<ref->second.getHwPlane() << std::endl;
364  std::cout << "Other " << other->second.getEtaPartition() << " " <<other->second.getHwPlane() << std::endl;
365  std::cout.flush();*/
366 
367  // refRing and otherRing areConnected, if they contribute to the same tower
368  /*
369  L1RPCConeDefinition::TTowerList refTowList
370  = m_L1RPCConeDefinition->getRingsToTowers().at(std::abs(ref->second.getEtaPartition()))
371  .at(ref->second.getHwPlane()-1);
372 
373 
374  L1RPCConeDefinition::TTowerList otherTowList
375  = m_L1RPCConeDefinition->getRingsToTowers().at(std::abs(other->second.getEtaPartition()))
376  .at(other->second.getHwPlane()-1);
377  */
378 
379  L1RPCConeDefinition::TRingToTowerVec::const_iterator itRef
381 
382  const L1RPCConeDefinition::TRingToTowerVec::const_iterator itEnd
384 
385  L1RPCConeDefinition::TRingToTowerVec::const_iterator itOther = itRef;
386 
387  int refTowerCnt = 0;
388  int index = -1;
389  int refTower = -1;
390 
391  for (;itRef != itEnd; ++itRef){
392  if ( itRef->m_etaPart != std::abs(ref->second.getEtaPartition())
393  || itRef->m_hwPlane != std::abs(ref->second.getHwPlane()-1) // -1?
394  ) continue;
395 
396  ++refTowerCnt;
397  refTower = itRef->m_tower;
398 
399  for (;itOther != itEnd; ++itOther){
400  if ( itOther->m_etaPart != std::abs(other->second.getEtaPartition())
401  || itOther->m_hwPlane != std::abs(other->second.getHwPlane()-1) // -1?
402  ) continue;
403 
404  if (itOther->m_tower == refTower) index = itOther->m_index;
405 
406  }
407 
408  }
409 
410  if(refTowerCnt>1){
411  throw cms::Exception("RPCConeBuilder") << " Reference(?) ring "
412  << ref->first << " "
413  << "wants to be connected to " << refTowerCnt << " towers \n";
414 
415  }
416 
417  if(refTowerCnt==0){
418  throw cms::Exception("RPCConeBuilder") << " Reference(?) ring "
419  << ref->first << " "
420  << " is not connected anywhere \n";
421 
422  }
423 
424  /*
425  if(index == -1){
426  throw cms::Exception("RPCConeBuilder") << "Wrong Index -1 \n"
427  }*/
428 
429 
430  /*
431  int refTower = -1;
432 
433  L1RPCConeDefinition::TTowerList::iterator rtlIt = refTowList.begin();
434  for (; rtlIt != refTowList.end(); ++rtlIt){
435 
436  if ( *rtlIt >= 0 && refTower < 0){
437  refTower = *rtlIt;
438  }
439  else if ( *rtlIt >= 0 && refTower >= 0) {
440  throw cms::Exception("RPCConfig") << " Reference(?) ring "
441  << ref->first << " "
442  << "wants to be connected more than one tower: "
443  << refTower << " "
444  << *rtlIt << "\n";
445 
446  }
447 
448  }
449 
450  if (refTower < 0) {
451  throw cms::Exception("RPCConfig") << " Reference(?) ring "
452  << ref->first
453  << " is not connected anywhere \n";
454  }
455 
456  L1RPCConeDefinition::TTowerList::iterator otlIt = otherTowList.begin();
457 
458  int index = -1, i = 0;
459  for (; otlIt != otherTowList.end(); ++otlIt){
460  if (*otlIt == refTower) {
461  index = i;
462  }
463  ++i;
464  }
465  */
466 
467  int lpSize = 0;
468  if (index != -1){
469  /*
470  logplane = m_L1RPCConeDefinition->getRingsToLP().at(std::abs(other->second.getEtaPartition()))
471  .at(other->second.getHwPlane()-1)
472  .at(index);*/
473  {
474  L1RPCConeDefinition::TRingToLPVec::const_iterator it = m_L1RPCConeDefinition->getRingToLPVec().begin();
475  L1RPCConeDefinition::TRingToLPVec::const_iterator itEnd = m_L1RPCConeDefinition->getRingToLPVec().end();
476  for (;it!=itEnd;++it){
477 
478  if (it->m_etaPart != std::abs(other->second.getEtaPartition())
479  || it->m_hwPlane != std::abs(other->second.getHwPlane()-1)
480  || it->m_index != index) continue;
481 
482  logplane = it->m_LP;
483 
484  }
485  }
486  //lpSize = m_L1RPCConeDefinition->getLPSizeForTowers().at(refTower).at(logplane-1);
487 
488  {
489  L1RPCConeDefinition::TLPSizeVec::const_iterator it = m_L1RPCConeDefinition->getLPSizeVec().begin();
490  L1RPCConeDefinition::TLPSizeVec::const_iterator itEnd = m_L1RPCConeDefinition->getLPSizeVec().end();
491  for (;it!=itEnd;++it){
492 
493  //std::cout << it->m_LP << " " << logplane << std::endl;
494  if (it->m_tower != std::abs(refTower) || it->m_LP != logplane-1) continue;
495  lpSize = it->m_size;
496 
497  }
498 
499  //FIXME
500  if (lpSize==-1) {
501  //throw cms::Exception("getLogStrip") << " lpSize==-1\n";
502  }
503  }
504  }
505 
506 
507  /*
508  if (logplane != -1){
509 
510  std::cout << ref->first << " <-> " << other->first
511  << " logplane " << logplane
512  << " lpsize " << lpSize
513  << std::endl;
514  }//*/
515 
516  return std::make_pair(logplane,lpSize);
517 
518 }
const TRingToLPVec & getRingToLPVec() const
const TRingToTowerVec & getRingToTowerVec() const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const TLPSizeVec & getLPSizeVec() const
edm::ESHandle< L1RPCConeDefinition > m_L1RPCConeDefinition
void RPCConeBuilder::buildCones ( const edm::ESHandle< RPCGeometry > &  rpcGeom)
private

Definition at line 179 of file RPCConeBuilder.cc.

References funct::abs(), buildConnections(), RPCGeometry::dets(), Exception, RPCStripsRing::getRingId(), crabWrapper::key, m_ringsMap, m_runOnceBuildCones, and Validation_hcalonly_cfi::sign.

Referenced by produce(), and ~RPCConeBuilder().

179  {
180 
181 
182  if (!m_runOnceBuildCones){
183  m_runOnceBuildCones = true;
184  } else {
185  throw cms::Exception("RPCInternal") << "buildCones called twice \n";
186  }
187 
188  //std::cout << " ---> buildCones called " << std::endl;
189 
190  // fetch geometricall data
191  auto uncompressedCons = std::make_shared<L1RPCConeBuilder::TConMap>();
192 
193 
194  int rolls = 0;
195  for(TrackingGeometry::DetContainer::const_iterator it = rpcGeom->dets().begin();
196  it != rpcGeom->dets().end();
197  ++it)
198  {
199 
200  if( dynamic_cast< RPCRoll const * >( *it ) == 0 ) continue;
201 
202  ++rolls;
203  RPCRoll const* roll = dynamic_cast< RPCRoll const*>( *it );
204 
205  int ringId = RPCStripsRing::getRingId(roll);
206  if ( m_ringsMap.find(ringId) == m_ringsMap.end() ) {
207  m_ringsMap[ringId]=RPCStripsRing(roll, uncompressedCons);
208  } else {
209  m_ringsMap[ringId].addRoll(roll);
210  }
211  //RPCStripsRing sr(roll);
212 
213  }
214 
215  //std::cout << " found: " << rolls << " dets" << std::endl;
216 
217  RPCStripsRing::TIdToRindMap::iterator it = m_ringsMap.begin();
218 
219  // filtermixed strips, fill gaps with virtual strips
220  for (;it != m_ringsMap.end(); ++it){
221 
222  //int before = it->second.size();
223 
224  it->second.filterOverlapingChambers();
225  it->second.fillWithVirtualStrips();
226 
227 
228  //std::cout << it->first << " " << it->second.isReferenceRing() << " "
229  // << before << " -> "
230  // << it->second.size() << std::endl;
231 
232  // In reference plane we should have 144*8 = 1152 strips
233  //int plane = it->first/1000;
234  int etaPart = it->first%100;
235  if (it->second.isReferenceRing() && (it->second.size() != 1152)){
236 
237  if (std::abs(etaPart)>=14 || std::abs(etaPart)<=17 ) {
238  //std::cout << "etaPart " << etaPart << " size " << it->second.size() << std::endl;
239  }
240  else {
241  throw cms::Exception("RPCInternal") << "Problem: refring " << it->first
242  << " has " << it->second.size() << " strips \n";
243  }
244  }
245 
246 
247  }
248 
249  // Xcheck, if rings are symettrical
250  it = m_ringsMap.begin();
251  for (;it != m_ringsMap.end(); ++it){
252  int key = it->first;
253  int sign = key/100 - (key/1000)*10;
254 
255  if (sign == 0) {
256  key += 100;
257  } else {
258  key -= 100;
259  }
260 
261  if (key != 2000){// Hey 2100 has no counterring
262  if (it->second.size() != m_ringsMap[key].size())
263  {
264  throw cms::Exception("RPCInternal") << " Size differs for ring " << key << " +- 100 \n";
265  }
266  }
267 
268 
269  }
270 
272 }
bool m_runOnceBuildCones
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
RPCStripsRing::TIdToRindMap m_ringsMap
virtual const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: RPCGeometry.cc:33
void RPCConeBuilder::buildConnections ( )
private

Definition at line 275 of file RPCConeBuilder.cc.

References areConnected(), Exception, RPCStripsRing::TOtherConnStruct::m_it, RPCStripsRing::TOtherConnStruct::m_logplane, RPCStripsRing::TOtherConnStruct::m_logplaneSize, and m_ringsMap.

Referenced by buildCones(), and ~RPCConeBuilder().

275  {
276 
277 
278 
279  RPCStripsRing::TIdToRindMap::iterator itRef = m_ringsMap.begin();
280  for (;itRef != m_ringsMap.end(); ++itRef){ // iterate over reference rings
281 
282 
283  RPCStripsRing::TOtherConnStructVec ringsToConnect;
284 
285  if (!itRef->second.isReferenceRing()) continue; // iterate over reference rings
286 
287  RPCStripsRing::TIdToRindMap::iterator itOther = m_ringsMap.begin();
288  for (;itOther != m_ringsMap.end(); ++itOther){ // iterate over nonreference rings
289 
290  if (itOther->second.isReferenceRing()) continue; // iterate over nonreference rings
291 
292  std::pair<int,int> pr = areConnected(itRef, itOther);
293  if ( pr.first != -1 ) {
294  RPCStripsRing::TOtherConnStruct newOtherConn;
295  newOtherConn.m_it = itOther;
296  newOtherConn.m_logplane = pr.first;
297  newOtherConn.m_logplaneSize = pr.second;
298  ringsToConnect.push_back(newOtherConn);
299  }
300 
301 
302  } // OtherRings iteration ends
303 
304  //
305  std::pair<int,int> prRef = areConnected(itRef, itRef);
306  if (prRef.first == -1){
307  throw cms::Exception("RPCConfig") << " Cannot determine logplane for reference ring "
308  << itRef->first << "\n ";
309  }
310 
311  /*&
312  if (prRef.second != 8){
313  // XXX
314  throw cms::Exception("RPCConfig") << " logplaneSize for reference ring "
315  << itRef->first << " wrong "
316  << " logplane: " << prRef.first
317  << " etaPart: " << itRef->second.getEtaPartition()
318  << " tower: " << itRef->second.getTowerForRefRing()
319  << " hwPlane: " << itRef->second.getHwPlane()
320  << " strips " << prRef.second << "\n";
321  }*/
322 
323  itRef->second.createRefConnections(ringsToConnect, prRef.first, prRef.second);
324 
325  } // RefRings iteration ends
326 
327 
328  // Fetch connection data, and save in one place
329  /*
330  RPCStripsRing::TIdToRindMap::iterator it = m_ringsMap.begin();
331  for (;it != m_ringsMap.end(); ++it) {
332 
333  L1RPCConeBuilder::TConMap nmap = it->second.getConnectionsMap();
334  L1RPCConeBuilder::TConMap::iterator newMapIt = nmap.begin();
335  for (; newMapIt != nmap.end(); ++ newMapIt) {
336  uint32_t raw = newMapIt->first;
337  TStrip2ConVec stripsVec = newMapIt->second;
338  TStrip2ConVec::iterator stripIt = stripsVec.first
339  //unsigned char strip =
340 
341 
342  }
343 
344 
345  }*/
346 
347 }
std::pair< int, int > areConnected(RPCStripsRing::TIdToRindMap::iterator ref, RPCStripsRing::TIdToRindMap::iterator other)
std::vector< TOtherConnStruct > TOtherConnStructVec
Definition: RPCStripsRing.h:53
RPCStripsRing::TIdToRindMap m_ringsMap
TIdToRindMap::iterator m_it
Definition: RPCStripsRing.h:50
void RPCConeBuilder::coneDefCallback ( const L1RPCConeDefinitionRcd record)

Definition at line 163 of file RPCConeBuilder.cc.

References edm::eventsetup::EventSetupRecord::get(), m_L1RPCConeDefinition, and m_runOnceBuildCones.

Referenced by RPCConeBuilder(), and ~RPCConeBuilder().

163  {
164 
165  //std::cout << " ConeDef callback called " << std::endl;
166  m_runOnceBuildCones = false; // allow re-running of buildCones
167 
168  //edm::ESHandle<RPCGeometry> rpcGeom;
169  record.get(m_L1RPCConeDefinition);
170 
171  //std::cout << " ConeDef callback exit " << std::endl;
172  //std::cout.flush();
173  //buildCones(rpcGeom);
174 
175 }
bool m_runOnceBuildCones
void get(HolderT &iHolder) const
edm::ESHandle< L1RPCConeDefinition > m_L1RPCConeDefinition
void RPCConeBuilder::geometryCallback ( const MuonGeometryRecord record)

Definition at line 154 of file RPCConeBuilder.cc.

References edm::eventsetup::EventSetupRecord::get(), m_rpcGeometry, and m_runOnceBuildCones.

Referenced by RPCConeBuilder(), and ~RPCConeBuilder().

154  {
155 
156  //std::cout << " Geometry callback called " << std::endl;
157  m_runOnceBuildCones = false; // allow re-running of buildCones
158  record.get(m_rpcGeometry);
159 
160 
161 }
edm::ESHandle< RPCGeometry > m_rpcGeometry
bool m_runOnceBuildCones
void get(HolderT &iHolder) const
RPCConeBuilder::ReturnType RPCConeBuilder::produce ( const L1RPCConeBuilderRcd iRecord)

Definition at line 117 of file RPCConeBuilder.cc.

References buildCones(), m_ringsMap, m_rpcGeometry, m_towerBeg, and m_towerEnd.

Referenced by ~RPCConeBuilder().

119 {
120 
121 
122  //std::cout << " RPCConeBuilder::produce called " << std::endl;
123  using namespace edm::es;
124  auto pL1RPCConeBuilder = std::make_shared<L1RPCConeBuilder>();
125 
126  pL1RPCConeBuilder->setFirstTower(m_towerBeg);
127  pL1RPCConeBuilder->setLastTower(m_towerEnd);
128 
129  /*
130  pL1RPCConeBuilder->setLPSizeForTowers(m_LPSizesInTowers);
131  pL1RPCConeBuilder->setRingsToLP(m_RingsToLP);
132  */
133 
134  //iRecord.get(m_rpcGeometry);
135  //iRecord.get(m_L1RPCConeDefinition);
137 
138  // Compress all connections. Since members of this class are shared
139  // pointers this call will compress all data
140  m_ringsMap.begin()->second.compressConnections();
141 
142  pL1RPCConeBuilder->setConeConnectionMap(m_ringsMap.begin()->second.getConnectionsMap());
143 
144  pL1RPCConeBuilder->setCompressedConeConnectionMap(
145  m_ringsMap.begin()->second.getCompressedConnectionsMap());
146 
147  m_ringsMap.clear(); // free mem
148 
149  return pL1RPCConeBuilder;
150 
151 }
edm::ESHandle< RPCGeometry > m_rpcGeometry
void buildCones(const edm::ESHandle< RPCGeometry > &rpcGeom)
int m_towerBeg
Returns logplane number for this connection, if not connected returns -1. In second lpSize...
RPCStripsRing::TIdToRindMap m_ringsMap

Member Data Documentation

int RPCConeBuilder::m_hwPlaneBeg
private

Definition at line 63 of file RPCConeBuilder.h.

int RPCConeBuilder::m_hwPlaneEnd
private

Definition at line 64 of file RPCConeBuilder.h.

edm::ESHandle<L1RPCConeDefinition> RPCConeBuilder::m_L1RPCConeDefinition
private

Definition at line 66 of file RPCConeBuilder.h.

Referenced by areConnected(), and coneDefCallback().

RPCStripsRing::TIdToRindMap RPCConeBuilder::m_ringsMap
private

Definition at line 70 of file RPCConeBuilder.h.

Referenced by buildCones(), buildConnections(), and produce().

int RPCConeBuilder::m_rollBeg
private

Definition at line 61 of file RPCConeBuilder.h.

int RPCConeBuilder::m_rollEnd
private

Definition at line 62 of file RPCConeBuilder.h.

edm::ESHandle<RPCGeometry> RPCConeBuilder::m_rpcGeometry
private

Definition at line 67 of file RPCConeBuilder.h.

Referenced by geometryCallback(), and produce().

bool RPCConeBuilder::m_runOnceBuildCones
private

Definition at line 68 of file RPCConeBuilder.h.

Referenced by buildCones(), coneDefCallback(), and geometryCallback().

int RPCConeBuilder::m_towerBeg
private

Returns logplane number for this connection, if not connected returns -1. In second lpSize.

Definition at line 59 of file RPCConeBuilder.h.

Referenced by produce().

int RPCConeBuilder::m_towerEnd
private

Definition at line 60 of file RPCConeBuilder.h.

Referenced by produce().