CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/CondFormats/CSCObjects/src/CSCGains.cc

Go to the documentation of this file.
00001 #include "CondFormats/CSCObjects/interface/CSCGains.h"
00002 #include "DataFormats/MuonDetId/interface/CSCIndexer.h"
00003 #include "FWCore/Utilities/interface/Exception.h"
00004 
00005 CSCGains::CSCGains(){}
00006 CSCGains::~CSCGains(){}
00007 
00008 const CSCGains::Item & CSCGains::item(const CSCDetId & cscId, int strip) const
00009 {
00010   CSCIndexer indexer;
00011   GainsMap::const_iterator mapItr = gains.find( indexer.dbIndex(cscId, strip) );
00012   if(mapItr == gains.end())
00013   {
00014     throw cms::Exception("CSCGains")
00015       << "Cannot find CSC conditions for chamber " << cscId;
00016   }
00017   return mapItr->second.at(strip-1);
00018 }
00019