CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Private Attributes
ObjectMap Class Reference

#include <DTSegtoRPC.h>

Public Member Functions

std::set< RPCDetIdGetRolls (DTStationIndex dtstationindex)
 
 ObjectMap (const edm::EventSetup &iSetup)
 

Static Public Member Functions

static ObjectMapGetInstance (const edm::EventSetup &iSetup)
 

Public Attributes

std::map< DTStationIndex,
std::set< RPCDetId > > 
rollstoreDT
 

Static Private Attributes

static ObjectMapmapInstance = NULL
 

Detailed Description

Definition at line 60 of file DTSegtoRPC.h.

Constructor & Destructor Documentation

ObjectMap::ObjectMap ( const edm::EventSetup iSetup)

Definition at line 24 of file DTSegtoRPC.cc.

References edm::EventSetup::get(), alignCSCRings::r, RPCDetId::region(), RPCDetId::ring(), RPCChamber::rolls(), rollstoreDT, RPCDetId::sector(), relativeConstraints::station, and RPCDetId::station().

Referenced by GetInstance().

24  {
27 
28  iSetup.get<MuonGeometryRecord>().get(rpcGeo);
29  iSetup.get<MuonGeometryRecord>().get(dtGeo);
30 
31  for (TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){
32  if(dynamic_cast< RPCChamber* >( *it ) != 0 ){
33  RPCChamber* ch = dynamic_cast< RPCChamber* >( *it );
34  std::vector< const RPCRoll*> roles = (ch->rolls());
35  for(std::vector<const RPCRoll*>::const_iterator r = roles.begin();r != roles.end(); ++r){
36  RPCDetId rpcId = (*r)->id();
37  int region=rpcId.region();
38  if(region==0){
39  int wheel=rpcId.ring();
40  int sector=rpcId.sector();
41  int station=rpcId.station();
42  DTStationIndex ind(region,wheel,sector,station);
43  std::set<RPCDetId> myrolls;
44  if (rollstoreDT.find(ind)!=rollstoreDT.end()) myrolls=rollstoreDT[ind];
45  myrolls.insert(rpcId);
46  rollstoreDT[ind]=myrolls;
47  }
48  }
49  }
50  }
51 }
std::map< DTStationIndex, std::set< RPCDetId > > rollstoreDT
Definition: DTSegtoRPC.h:65
int ring() const
Definition: RPCDetId.h:72
const std::vector< const RPCRoll * > & rolls() const
Return the Rolls.
Definition: RPCChamber.cc:68
const T & get() const
Definition: EventSetup.h:55
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:102
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63
int station() const
Definition: RPCDetId.h:96

Member Function Documentation

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

17  {
18  if (mapInstance == NULL){
19  mapInstance = new ObjectMap(iSetup);
20  }
21  return mapInstance;
22 }
#define NULL
Definition: scimark2.h:8
static ObjectMap * mapInstance
Definition: DTSegtoRPC.h:68
ObjectMap(const edm::EventSetup &iSetup)
Definition: DTSegtoRPC.cc:24
std::set<RPCDetId> ObjectMap::GetRolls ( DTStationIndex  dtstationindex)
inline

Definition at line 63 of file DTSegtoRPC.h.

References mapInstance, and rollstoreDT.

Referenced by DTSegtoRPC::DTSegtoRPC().

63 {return mapInstance->rollstoreDT[dtstationindex];}
static ObjectMap * mapInstance
Definition: DTSegtoRPC.h:68
std::map< DTStationIndex, std::set< RPCDetId > > rollstoreDT
Definition: DTSegtoRPC.h:65

Member Data Documentation

ObjectMap * ObjectMap::mapInstance = NULL
staticprivate

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