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 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 boost::shared_ptr
< L1RPCConeBuilder
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

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 ()
 
- 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 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
< L1RPCConeDefinition
m_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::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>="">

Usage: <usage>

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

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

Definition at line 36 of file RPCConeBuilder.h.

Member Typedef Documentation

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

Definition at line 40 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

Definition at line 40 of file RPCConeBuilder.h.

40 {};

Member Function Documentation

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

Definition at line 352 of file RPCConeBuilder.cc.

References funct::abs(), Exception, cmsHarvester::index, and m_L1RPCConeDefinition.

Referenced by buildConnections().

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

Referenced by produce().

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  boost::shared_ptr<L1RPCConeBuilder::TConMap > uncompressedCons
192  = boost::shared_ptr<L1RPCConeBuilder::TConMap >(new L1RPCConeBuilder::TConMap());
193 
194 
195  int rolls = 0;
196  for(TrackingGeometry::DetContainer::const_iterator it = rpcGeom->dets().begin();
197  it != rpcGeom->dets().end();
198  ++it)
199  {
200 
201  if( dynamic_cast< RPCRoll const * >( *it ) == 0 ) continue;
202 
203  ++rolls;
204  RPCRoll const* roll = dynamic_cast< RPCRoll const*>( *it );
205 
206  int ringId = RPCStripsRing::getRingId(roll);
207  if ( m_ringsMap.find(ringId) == m_ringsMap.end() ) {
208  m_ringsMap[ringId]=RPCStripsRing(roll, uncompressedCons);
209  } else {
210  m_ringsMap[ringId].addRoll(roll);
211  }
212  //RPCStripsRing sr(roll);
213 
214  }
215 
216  //std::cout << " found: " << rolls << " dets" << std::endl;
217 
218  RPCStripsRing::TIdToRindMap::iterator it = m_ringsMap.begin();
219 
220  // filtermixed strips, fill gaps with virtual strips
221  for (;it != m_ringsMap.end(); ++it){
222 
223  //int before = it->second.size();
224 
225  it->second.filterOverlapingChambers();
226  it->second.fillWithVirtualStrips();
227 
228 
229  //std::cout << it->first << " " << it->second.isReferenceRing() << " "
230  // << before << " -> "
231  // << it->second.size() << std::endl;
232 
233  // In reference plane we should have 144*8 = 1152 strips
234  //int plane = it->first/1000;
235  int etaPart = it->first%100;
236  if (it->second.isReferenceRing() && (it->second.size() != 1152)){
237 
238  if (std::abs(etaPart)>=14 || std::abs(etaPart)<=17 ) {
239  //std::cout << "etaPart " << etaPart << " size " << it->second.size() << std::endl;
240  }
241  else {
242  throw cms::Exception("RPCInternal") << "Problem: refring " << it->first
243  << " has " << it->second.size() << " strips \n";
244  }
245  }
246 
247 
248  }
249 
250  // Xcheck, if rings are symettrical
251  it = m_ringsMap.begin();
252  for (;it != m_ringsMap.end(); ++it){
253  int key = it->first;
254  int sign = key/100 - (key/1000)*10;
255 
256  if (sign == 0) {
257  key += 100;
258  } else {
259  key -= 100;
260  }
261 
262  if (key != 2000){// Hey 2100 has no counterring
263  if (it->second.size() != m_ringsMap[key].size())
264  {
265  throw cms::Exception("RPCInternal") << " Size differs for ring " << key << " +- 100 \n";
266  }
267  }
268 
269 
270  }
271 
273 }
bool m_runOnceBuildCones
double sign(double x)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
RPCStripsRing::TIdToRindMap m_ringsMap
std::map< uint32_t, TStrip2ConVec > TConMap
string const
Definition: compareJSON.py:14
void RPCConeBuilder::buildConnections ( )
private

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

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

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

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.

119 {
120 
121 
122  //std::cout << " RPCConeBuilder::produce called " << std::endl;
123  using namespace edm::es;
124  boost::shared_ptr<L1RPCConeBuilder> pL1RPCConeBuilder( ( new 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 64 of file RPCConeBuilder.h.

int RPCConeBuilder::m_hwPlaneEnd
private

Definition at line 65 of file RPCConeBuilder.h.

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

Definition at line 67 of file RPCConeBuilder.h.

Referenced by areConnected(), and coneDefCallback().

RPCStripsRing::TIdToRindMap RPCConeBuilder::m_ringsMap
private

Definition at line 71 of file RPCConeBuilder.h.

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

int RPCConeBuilder::m_rollBeg
private

Definition at line 62 of file RPCConeBuilder.h.

int RPCConeBuilder::m_rollEnd
private

Definition at line 63 of file RPCConeBuilder.h.

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

Definition at line 68 of file RPCConeBuilder.h.

Referenced by geometryCallback(), and produce().

bool RPCConeBuilder::m_runOnceBuildCones
private

Definition at line 69 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 60 of file RPCConeBuilder.h.

Referenced by produce().

int RPCConeBuilder::m_towerEnd
private

Definition at line 61 of file RPCConeBuilder.h.

Referenced by produce().