#include <DTSegtoRPC.h>
Public Member Functions | |
std::set< RPCDetId > | GetRolls (DTStationIndex dtstationindex) |
ObjectMap (const edm::EventSetup &iSetup) | |
Static Public Member Functions | |
static ObjectMap * | GetInstance (const edm::EventSetup &iSetup) |
Public Attributes | |
std::map< DTStationIndex, std::set< RPCDetId > > | rollstoreDT |
Static Private Attributes | |
static ObjectMap * | mapInstance = NULL |
Definition at line 60 of file DTSegtoRPC.h.
ObjectMap::ObjectMap | ( | const edm::EventSetup & | iSetup | ) |
Definition at line 24 of file DTSegtoRPC.cc.
References edm::EventSetup::get(), csvReporter::r, RPCDetId::region(), RPCDetId::ring(), RPCChamber::rolls(), rollstoreDT, RPCDetId::sector(), relativeConstraints::station, and RPCDetId::station().
Referenced by GetInstance().
{ edm::ESHandle<RPCGeometry> rpcGeo; edm::ESHandle<DTGeometry> dtGeo; iSetup.get<MuonGeometryRecord>().get(rpcGeo); iSetup.get<MuonGeometryRecord>().get(dtGeo); for (TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){ if(dynamic_cast< RPCChamber* >( *it ) != 0 ){ RPCChamber* ch = dynamic_cast< RPCChamber* >( *it ); std::vector< const RPCRoll*> roles = (ch->rolls()); for(std::vector<const RPCRoll*>::const_iterator r = roles.begin();r != roles.end(); ++r){ RPCDetId rpcId = (*r)->id(); int region=rpcId.region(); if(region==0){ int wheel=rpcId.ring(); int sector=rpcId.sector(); int station=rpcId.station(); DTStationIndex ind(region,wheel,sector,station); std::set<RPCDetId> myrolls; if (rollstoreDT.find(ind)!=rollstoreDT.end()) myrolls=rollstoreDT[ind]; myrolls.insert(rpcId); rollstoreDT[ind]=myrolls; } } } } }
ObjectMap * ObjectMap::GetInstance | ( | const edm::EventSetup & | iSetup | ) | [static] |
Definition at line 17 of file DTSegtoRPC.cc.
References mapInstance, NULL, and ObjectMap().
Referenced by DTSegtoRPC::DTSegtoRPC().
{ if (mapInstance == NULL){ mapInstance = new ObjectMap(iSetup); } return mapInstance; }
std::set<RPCDetId> ObjectMap::GetRolls | ( | DTStationIndex | dtstationindex | ) | [inline] |
Definition at line 63 of file DTSegtoRPC.h.
References mapInstance, and rollstoreDT.
Referenced by DTSegtoRPC::DTSegtoRPC().
{return mapInstance->rollstoreDT[dtstationindex];}
ObjectMap * ObjectMap::mapInstance = NULL [static, private] |
Definition at line 68 of file DTSegtoRPC.h.
Referenced by GetInstance(), and GetRolls().
std::map<DTStationIndex,std::set<RPCDetId> > ObjectMap::rollstoreDT |
Definition at line 65 of file DTSegtoRPC.h.
Referenced by GetRolls(), and ObjectMap().