CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/CondFormats/CSCObjects/src/CSCChamberMap.cc

Go to the documentation of this file.
00001 #include <CondFormats/CSCObjects/interface/CSCChamberMap.h>
00002 #include <DataFormats/MuonDetId/interface/CSCDetId.h>
00003 
00004 CSCChamberMap::CSCChamberMap(){}
00005 
00006 CSCChamberMap::~CSCChamberMap(){}
00007 
00008 const CSCMapItem::MapItem& CSCChamberMap::item( int key ) const { 
00009   return (ch_map.find(key))->second; 
00010 }
00011 
00012 int CSCChamberMap::dbIndex(const CSCDetId& id ) const {
00013 
00014   int ie = id.endcap();
00015   int is = id.station();
00016   int ir = id.ring();
00017   int ic = id.chamber();
00018   //  int il = id.layer(); // zero for parent chamber
00019 
00020   // ME1a must be reset to ME11
00021   if ( ( is == 1 ) && ( ir == 4 ) ) ir=1;
00022 
00023   return ie*100000 + is*10000 + ir*1000 + ic*10;
00024 }
00025 
00026 int CSCChamberMap::crate( const CSCDetId& id ) const {
00027   int igor = dbIndex( id );  
00028   CSCMapItem::MapItem mitem = this->item( igor );
00029   return mitem.crateid;   
00030 }
00031 
00032 int CSCChamberMap::dmb( const CSCDetId& id ) const {
00033   int igor = dbIndex( id );  
00034   CSCMapItem::MapItem mitem = this->item( igor );
00035   return mitem.dmb;   
00036 }
00037 
00038 int CSCChamberMap::ddu( const CSCDetId& id ) const {
00039   int igor = dbIndex( id );  
00040   CSCMapItem::MapItem mitem = this->item( igor );
00041   return mitem.ddu;   
00042 }
00043 
00044 int CSCChamberMap::slink( const CSCDetId& id ) const {
00045   int igor = dbIndex( id );  
00046   CSCMapItem::MapItem mitem = this->item( igor );
00047   return mitem.slink;   
00048 }
00049 
00050 int CSCChamberMap::dduSlot( const CSCDetId& id ) const {
00051   int igor = dbIndex( id );
00052   CSCMapItem::MapItem mitem = this->item( igor );
00053   return mitem.ddu_slot;
00054 }
00055 
00056 int CSCChamberMap::dduInput( const CSCDetId& id ) const {
00057   int igor = dbIndex( id );
00058   CSCMapItem::MapItem mitem = this->item( igor );
00059   return mitem.ddu_input;
00060 }
00061