#include <TracktoRPC.h>
Public Member Functions | |
std::set< RPCDetId > | GetRolls (DTStationIndex2 dtstationindex) |
ObjectMap2 (const edm::EventSetup &iSetup) | |
Static Public Member Functions | |
static ObjectMap2 * | GetInstance (const edm::EventSetup &iSetup) |
Public Attributes | |
std::map< DTStationIndex2, std::set< RPCDetId > > | rollstoreDT |
Static Private Attributes | |
static ObjectMap2 * | mapInstance = NULL |
Definition at line 112 of file TracktoRPC.h.
ObjectMap2::ObjectMap2 | ( | const edm::EventSetup & | iSetup | ) |
Definition at line 28 of file TracktoRPC.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(); DTStationIndex2 ind(region,wheel,sector,station); std::set<RPCDetId> myrolls; if (rollstoreDT.find(ind)!=rollstoreDT.end()) myrolls=rollstoreDT[ind]; myrolls.insert(rpcId); rollstoreDT[ind]=myrolls; } } } } }
ObjectMap2 * ObjectMap2::GetInstance | ( | const edm::EventSetup & | iSetup | ) | [static] |
Definition at line 21 of file TracktoRPC.cc.
References mapInstance, NULL, and ObjectMap2().
Referenced by TracktoRPC::TracktoRPC().
{ if (mapInstance == NULL){ mapInstance = new ObjectMap2(iSetup); } return mapInstance; }
std::set<RPCDetId> ObjectMap2::GetRolls | ( | DTStationIndex2 | dtstationindex | ) | [inline] |
Definition at line 115 of file TracktoRPC.h.
References mapInstance, and rollstoreDT.
Referenced by TracktoRPC::TracktoRPC().
{return mapInstance->rollstoreDT[dtstationindex];}
ObjectMap2 * ObjectMap2::mapInstance = NULL [static, private] |
Definition at line 120 of file TracktoRPC.h.
Referenced by GetInstance(), and GetRolls().
std::map<DTStationIndex2,std::set<RPCDetId> > ObjectMap2::rollstoreDT |
Definition at line 117 of file TracktoRPC.h.
Referenced by GetRolls(), and ObjectMap2().