Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:50:55

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