diff --git a/CalibTracker/SiStripCommon/plugins/TkDetMapESProducer.cc b/CalibTracker/SiStripCommon/plugins/TkDetMapESProducer.cc index 1ac35d6026675..f634d29508a81 100644 --- a/CalibTracker/SiStripCommon/plugins/TkDetMapESProducer.cc +++ b/CalibTracker/SiStripCommon/plugins/TkDetMapESProducer.cc @@ -294,7 +294,8 @@ namespace { } // namespace std::unique_ptr TkDetMapESProducer::produce(const TrackerTopologyRcd& tTopoRcd) { - const auto& geomDet = tTopoRcd.getRecord().get(geomDetToken_); + const auto& geomDetRcd = tTopoRcd.getRecord(); + const auto& geomDet = geomDetRcd.get(geomDetToken_); const auto TkDetIdList = TrackerGeometryUtils::getSiStripDetIds(geomDet); const auto& tTopo = tTopoRcd.get(tTopoToken_); diff --git a/CalibTracker/SiStripESProducers/plugins/fake/SiStripBackPlaneCorrectionFakeESSource.cc b/CalibTracker/SiStripESProducers/plugins/fake/SiStripBackPlaneCorrectionFakeESSource.cc index cef3b4a83774c..cf089d0f24a20 100644 --- a/CalibTracker/SiStripESProducers/plugins/fake/SiStripBackPlaneCorrectionFakeESSource.cc +++ b/CalibTracker/SiStripESProducers/plugins/fake/SiStripBackPlaneCorrectionFakeESSource.cc @@ -65,7 +65,8 @@ SiStripBackPlaneCorrectionFakeESSource::ReturnType SiStripBackPlaneCorrectionFak const SiStripBackPlaneCorrectionRcd& iRecord) { using namespace edm::es; - const auto& geomDet = iRecord.getRecord().get(m_geomDetToken); + const auto& geomDetRcd = iRecord.getRecord(); + const auto& geomDet = geomDetRcd.get(m_geomDetToken); const auto& tTopo = iRecord.get(m_tTopoToken); auto backPlaneCorrection = std::make_unique(); diff --git a/CalibTracker/SiStripESProducers/plugins/fake/SiStripHashedDetIdFakeESSource.cc b/CalibTracker/SiStripESProducers/plugins/fake/SiStripHashedDetIdFakeESSource.cc index a82168bc842d4..39793a014c857 100644 --- a/CalibTracker/SiStripESProducers/plugins/fake/SiStripHashedDetIdFakeESSource.cc +++ b/CalibTracker/SiStripESProducers/plugins/fake/SiStripHashedDetIdFakeESSource.cc @@ -31,7 +31,8 @@ std::unique_ptr SiStripHashedDetIdFakeESSource::produce(cons edm::LogVerbatim("HashedDetId") << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]" << " Building \"fake\" hashed DetId map from IdealGeometry"; - const auto& geomDet = record.getRecord().get(geomDetToken_); + const auto& geomDetRcd = record.getRecord(); + const auto& geomDet = geomDetRcd.get(geomDetToken_); const std::vector dets = TrackerGeometryUtils::getSiStripDetIds(geomDet); edm::LogVerbatim("HashedDetId") << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]" diff --git a/CalibTracker/SiStripESProducers/plugins/fake/SiStripLorentzAngleFakeESSource.cc b/CalibTracker/SiStripESProducers/plugins/fake/SiStripLorentzAngleFakeESSource.cc index 920cf6df72dbd..5c1710758a318 100644 --- a/CalibTracker/SiStripESProducers/plugins/fake/SiStripLorentzAngleFakeESSource.cc +++ b/CalibTracker/SiStripESProducers/plugins/fake/SiStripLorentzAngleFakeESSource.cc @@ -183,7 +183,8 @@ SiStripLorentzAngleFakeESSource::ReturnType SiStripLorentzAngleFakeESSource::pro const SiStripLorentzAngleRcd& iRecord) { using namespace edm::es; - const auto& geomDet = iRecord.getRecord().get(m_geomDetToken); + const auto& geomDetRcd = iRecord.getRecord(); + const auto& geomDet = geomDetRcd.get(m_geomDetToken); const auto& tTopo = iRecord.get(m_tTopoToken); auto lorentzAngle = std::make_unique(); diff --git a/CalibTracker/SiStripQuality/plugins/SiStripQualityHotStripIdentifier.cc b/CalibTracker/SiStripQuality/plugins/SiStripQualityHotStripIdentifier.cc index ebb3c0a177d1f..fb9d9c0a0a1ca 100644 --- a/CalibTracker/SiStripQuality/plugins/SiStripQualityHotStripIdentifier.cc +++ b/CalibTracker/SiStripQuality/plugins/SiStripQualityHotStripIdentifier.cc @@ -167,7 +167,8 @@ void SiStripQualityHotStripIdentifier::resetHistos() { void SiStripQualityHotStripIdentifier::bookHistos() { edm::LogInfo("SiStripQualityHotStripIdentifier") << " [SiStripQualityHotStripIdentifier::bookHistos] " << std::endl; char hname[1024]; - for (const auto& it : SiStripDetInfoFileReader::read(fp_.fullPath()).getAllData()) { + const SiStripDetInfo& info = SiStripDetInfoFileReader::read(fp_.fullPath()); + for (const auto& it : info.getAllData()) { sprintf(hname, "h_%d", it.first); auto ref = ClusterPositionHistoMap.find(it.first); if (ref == ClusterPositionHistoMap.end()) {