12 int hid =
hwId(endcap, station, vme, dmb, tmb);
14 std::map<int, int>::const_iterator it =
hw2sw_.find(hid);
20 edm::LogError(
"CSC") <<
" cannot find requested hw id = " << hid <<
" in mapping.";
27 int cid =
chamber(endcap, station, vme, dmb, tmb);
39 if (station == 1 && ring == 1 && cfeb >= 4 && cfeb <= 6) {
44 return CSCDetId(endcap, station, ring, chamber, layer);
58 CSCLabel newRecord(endcap, station, ring, chamber, vmecrate, dmb, tmb, tsector, cscid, ddu, dcc);
60 int hid =
hwId(endcap, station, vmecrate, dmb, tmb);
61 int sid =
swId(endcap, station, ring, chamber);
63 if (
hw2sw_.insert(std::make_pair(hid, sid)).second) {
69 sw2hw_.insert(std::make_pair(sid, newRecord));
81 std::map<int, CSCLabel>::const_iterator it =
sw2hw_.find(sid);
87 edm::LogError(
"CSC") <<
" cannot find requested sw id = " <<
id <<
" in 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
CSCDetId detId(int endcap, int station, int vmecrate, int dmb, int tmb, int cfeb, int layer=0) const
std::vector< CSCLabel > mapping_
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)
int dccId(const CSCDetId &) const
returns DCC# given CSCDetId
std::map< int, CSCLabel > sw2hw_
virtual int hwId(int endcap, int station, int vme, int dmb, int tmb) const =0
std::map< int, int > hw2sw_
CSCReadoutMapping()
Default constructor.
int dduId(const CSCDetId &) const
returns DDU# given CSCDetId
virtual ~CSCReadoutMapping()
Destructor.