12 int hid =
hwId( endcap, station, vme, dmb, tmb );
14 std::map<int,int>::const_iterator it =
hw2sw_.find( hid );
15 if ( it !=
hw2sw_.end() ) {
21 edm::LogError(
"CSC") <<
" cannot find requested hw id = " << hid <<
" in mapping.";
30 int cid =
chamber( endcap, station, vme, dmb, tmb );
42 if ( station == 1 && ring == 1 && cfeb == 4 ) {
46 return CSCDetId( endcap, station, ring, chamber, layer );
50 int vmecrate,
int dmb,
int tmb,
int tsector,
int cscid,
int ddu,
int dcc ) {
52 CSCLabel newRecord( endcap, station, ring, chamber, vmecrate, dmb, tmb, tsector, cscid, ddu, dcc );
54 int hid =
hwId( endcap, station, vmecrate, dmb, tmb );
55 int sid =
swId( endcap, station, ring, chamber);
57 if (
hw2sw_.insert( std::make_pair(hid, sid) ).second ) {
64 sw2hw_.insert( std::make_pair(sid, newRecord) );
77 std::map<int,CSCLabel>::const_iterator it =
sw2hw_.find( sid );
78 if ( it !=
sw2hw_.end() ) {
84 edm::LogError(
"CSC") <<
" cannot find requested sw id = " <<
id <<
" in mapping.";
std::vector< CSCLabel > mapping_
int chamber(int endcap, int station, int vmecrate, int dmb, int tmb) const
int swId(int endcap, int station, int ring, int chamber) const
static int rawIdMaker(int iendcap, int istation, int iring, int ichamber, int ilayer)
int dmbId(const CSCDetId &) const
returns dmbId given CSCDetId
CSCLabel findHardwareId(const CSCDetId &) const
returns hardware ids given chamber id
virtual int hwId(int endcap, int station, int vme, int dmb, int tmb) const =0
CSCDetId detId(int endcap, int station, int vmecrate, int dmb, int tmb, int cfeb, int layer=0) const
int crate(const CSCDetId &) const
returns vmecrate given CSCDetId
void addRecord(int endcap, int station, int ring, int chamber, int vmecrate, int dmb, int tmb, int tsector, int cscid, int ddu, int dcc)
std::map< int, int > hw2sw_
int dccId(const CSCDetId &) const
returns DCC# given CSCDetId
CSCReadoutMapping()
Default constructor.
int dduId(const CSCDetId &) const
returns DDU# given CSCDetId
std::map< int, CSCLabel > sw2hw_
virtual ~CSCReadoutMapping()
Destructor.