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