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
ObjectMap2 Class Reference

#include <TracktoRPC.h>

Public Member Functions

std::set< RPCDetIdGetRolls (DTStationIndex2 dtstationindex)
 
 ObjectMap2 (const edm::EventSetup &iSetup)
 

Static Public Member Functions

static ObjectMap2GetInstance (const edm::EventSetup &iSetup)
 

Public Attributes

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

Static Private Attributes

static ObjectMap2mapInstance = NULL
 

Detailed Description

Definition at line 112 of file TracktoRPC.h.

Constructor & Destructor Documentation

ObjectMap2::ObjectMap2 ( const edm::EventSetup iSetup)

Definition at line 28 of file TracktoRPC.cc.

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

Referenced by GetInstance().

28  {
31 
32  iSetup.get<MuonGeometryRecord>().get(rpcGeo);
33  iSetup.get<MuonGeometryRecord>().get(dtGeo);
34 
35  for (TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){
36  if(dynamic_cast< RPCChamber* >( *it ) != 0 ){
37  RPCChamber* ch = dynamic_cast< RPCChamber* >( *it );
38  std::vector< const RPCRoll*> roles = (ch->rolls());
39  for(std::vector<const RPCRoll*>::const_iterator r = roles.begin();r != roles.end(); ++r){
40  RPCDetId rpcId = (*r)->id();
41  int region=rpcId.region();
42  if(region==0){
43  int wheel=rpcId.ring();
44  int sector=rpcId.sector();
45  int station=rpcId.station();
46  DTStationIndex2 ind(region,wheel,sector,station);
47  std::set<RPCDetId> myrolls;
48  if (rollstoreDT.find(ind)!=rollstoreDT.end()) myrolls=rollstoreDT[ind];
49  myrolls.insert(rpcId);
50  rollstoreDT[ind]=myrolls;
51  }
52  }
53  }
54  }
55 }
std::map< DTStationIndex2, std::set< RPCDetId > > rollstoreDT
Definition: TracktoRPC.h:117
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

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

21  {
22  if (mapInstance == NULL){
23  mapInstance = new ObjectMap2(iSetup);
24  }
25  return mapInstance;
26 }
#define NULL
Definition: scimark2.h:8
static ObjectMap2 * mapInstance
Definition: TracktoRPC.h:120
ObjectMap2(const edm::EventSetup &iSetup)
Definition: TracktoRPC.cc:28
std::set<RPCDetId> ObjectMap2::GetRolls ( DTStationIndex2  dtstationindex)
inline

Definition at line 115 of file TracktoRPC.h.

References mapInstance, and rollstoreDT.

Referenced by TracktoRPC::TracktoRPC().

115 {return mapInstance->rollstoreDT[dtstationindex];}
static ObjectMap2 * mapInstance
Definition: TracktoRPC.h:120
std::map< DTStationIndex2, std::set< RPCDetId > > rollstoreDT
Definition: TracktoRPC.h:117

Member Data Documentation

ObjectMap2 * ObjectMap2::mapInstance = NULL
staticprivate

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