Skip to content

Commit 1d7ff69

Browse files
authored
Merge pull request #45732 from iarspider/iarspider-patch-20240817-5
[GCC13] Avoid Wdangling-reference warning in CalibTracker submodules
2 parents 0964abb + a3b77c7 commit 1d7ff69

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

CalibTracker/SiStripCommon/plugins/TkDetMapESProducer.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@ namespace {
294294
} // namespace
295295

296296
std::unique_ptr<TkDetMap> TkDetMapESProducer::produce(const TrackerTopologyRcd& tTopoRcd) {
297-
const auto& geomDet = tTopoRcd.getRecord<IdealGeometryRecord>().get(geomDetToken_);
297+
const auto& geomDetRcd = tTopoRcd.getRecord<IdealGeometryRecord>();
298+
const auto& geomDet = geomDetRcd.get(geomDetToken_);
298299
const auto TkDetIdList = TrackerGeometryUtils::getSiStripDetIds(geomDet);
299300

300301
const auto& tTopo = tTopoRcd.get(tTopoToken_);

CalibTracker/SiStripESProducers/plugins/fake/SiStripBackPlaneCorrectionFakeESSource.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ SiStripBackPlaneCorrectionFakeESSource::ReturnType SiStripBackPlaneCorrectionFak
6565
const SiStripBackPlaneCorrectionRcd& iRecord) {
6666
using namespace edm::es;
6767

68-
const auto& geomDet = iRecord.getRecord<TrackerTopologyRcd>().get(m_geomDetToken);
68+
const auto& geomDetRcd = iRecord.getRecord<TrackerTopologyRcd>();
69+
const auto& geomDet = geomDetRcd.get(m_geomDetToken);
6970
const auto& tTopo = iRecord.get(m_tTopoToken);
7071

7172
auto backPlaneCorrection = std::make_unique<SiStripBackPlaneCorrection>();

CalibTracker/SiStripESProducers/plugins/fake/SiStripHashedDetIdFakeESSource.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ std::unique_ptr<SiStripHashedDetId> SiStripHashedDetIdFakeESSource::produce(cons
3131
edm::LogVerbatim("HashedDetId") << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]"
3232
<< " Building \"fake\" hashed DetId map from IdealGeometry";
3333

34-
const auto& geomDet = record.getRecord<TrackerDigiGeometryRecord>().get(geomDetToken_);
34+
const auto& geomDetRcd = record.getRecord<TrackerDigiGeometryRecord>();
35+
const auto& geomDet = geomDetRcd.get(geomDetToken_);
3536

3637
const std::vector<uint32_t> dets = TrackerGeometryUtils::getSiStripDetIds(geomDet);
3738
edm::LogVerbatim("HashedDetId") << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]"

CalibTracker/SiStripESProducers/plugins/fake/SiStripLorentzAngleFakeESSource.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ SiStripLorentzAngleFakeESSource::ReturnType SiStripLorentzAngleFakeESSource::pro
183183
const SiStripLorentzAngleRcd& iRecord) {
184184
using namespace edm::es;
185185

186-
const auto& geomDet = iRecord.getRecord<TrackerTopologyRcd>().get(m_geomDetToken);
186+
const auto& geomDetRcd = iRecord.getRecord<TrackerTopologyRcd>();
187+
const auto& geomDet = geomDetRcd.get(m_geomDetToken);
187188
const auto& tTopo = iRecord.get(m_tTopoToken);
188189

189190
auto lorentzAngle = std::make_unique<SiStripLorentzAngle>();

CalibTracker/SiStripQuality/plugins/SiStripQualityHotStripIdentifier.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ void SiStripQualityHotStripIdentifier::resetHistos() {
167167
void SiStripQualityHotStripIdentifier::bookHistos() {
168168
edm::LogInfo("SiStripQualityHotStripIdentifier") << " [SiStripQualityHotStripIdentifier::bookHistos] " << std::endl;
169169
char hname[1024];
170-
for (const auto& it : SiStripDetInfoFileReader::read(fp_.fullPath()).getAllData()) {
170+
const SiStripDetInfo& info = SiStripDetInfoFileReader::read(fp_.fullPath());
171+
for (const auto& it : info.getAllData()) {
171172
sprintf(hname, "h_%d", it.first);
172173
auto ref = ClusterPositionHistoMap.find(it.first);
173174
if (ref == ClusterPositionHistoMap.end()) {

0 commit comments

Comments
 (0)