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 && cfeb <= 6 ) {
47 return CSCDetId( endcap, station, ring, chamber, layer );
51 int vmecrate,
int dmb,
int tmb,
int tsector,
int cscid,
int ddu,
int dcc ) {
53 CSCLabel newRecord( endcap, station, ring, chamber, vmecrate, dmb, tmb, tsector, cscid, ddu, dcc );
55 int hid =
hwId( endcap, station, vmecrate, dmb, tmb );
56 int sid =
swId( endcap, station, ring, chamber);
58 if (
hw2sw_.insert( std::make_pair(hid, sid) ).second ) {
65 sw2hw_.insert( std::make_pair(sid, newRecord) );
78 std::map<int,CSCLabel>::const_iterator it =
sw2hw_.find( sid );
79 if ( it !=
sw2hw_.end() ) {
85 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.