CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Public Attributes | Static Private Attributes

ObjectMap Class Reference

#include <DTSegtoRPC.h>

List of all members.

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

                                               {
  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;
        }
      }
    }
  }
}

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

                                                            {
  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];}

Member Data Documentation

ObjectMap * ObjectMap::mapInstance = NULL [static, private]

Definition at line 68 of file DTSegtoRPC.h.

Referenced by GetInstance(), and GetRolls().

Definition at line 65 of file DTSegtoRPC.h.

Referenced by GetRolls(), and ObjectMap().