Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:00

0001 #include "CondFormats/CSCObjects/interface/CSCPedestals.h"
0002 #include "DataFormats/MuonDetId/interface/CSCIndexer.h"
0003 #include "FWCore/Utilities/interface/Exception.h"
0004 
0005 CSCPedestals::CSCPedestals() {}
0006 CSCPedestals::~CSCPedestals() {}
0007 
0008 const CSCPedestals::Item& CSCPedestals::item(const CSCDetId& cscId, int strip) const {
0009   CSCIndexer indexer;
0010   PedestalMap::const_iterator mapItr = pedestals.find(indexer.dbIndex(cscId, strip));
0011   if (mapItr == pedestals.end()) {
0012     throw cms::Exception("CSCPedestals") << "Cannot find CSC conditions for chamber " << cscId;
0013   }
0014   return mapItr->second.at(strip - 1);
0015 }