Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply suggested fix for Wdangling-reference #45765

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions CalibTracker/SiStripCommon/plugins/TkDetMapESProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,7 @@ namespace {
} // namespace

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

const auto& tTopo = tTopoRcd.get(tTopoToken_);
Expand Down
18 changes: 6 additions & 12 deletions RecoLocalCalo/HcalRecAlgos/plugins/HcalChannelPropertiesEP.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ class HcalChannelPropertiesEP : public edm::ESProducer {
inline ~HcalChannelPropertiesEP() override {}

ReturnType1 produce1(const HcalChannelPropertiesAuxRecord& rcd) {
const auto& htopoRecord = rcd.getRecord<HcalRecNumberingRecord>();
const HcalTopology& htopo = htopoRecord.get(topoToken_);
const auto& paramsRecord = rcd.getRecord<HcalRecoParamsRcd>();
const HcalRecoParams& params = paramsRecord.get(paramsToken_);
const HcalTopology& htopo = rcd.get(topoToken_);
const HcalRecoParams& params = rcd.get(paramsToken_);

ReturnType1 prod = std::make_unique<HcalRecoParams>(params);
prod->setTopo(&htopo);
Expand All @@ -74,14 +72,10 @@ class HcalChannelPropertiesEP : public edm::ESProducer {
// Retrieve various event setup records and data products
const HcalDbRecord& dbRecord = rcd.getRecord<HcalDbRecord>();
const HcalDbService& cond = dbRecord.get(condToken_);
const auto& paramsRecord = rcd.getRecord<HcalChannelPropertiesAuxRecord>();
const HcalRecoParams& params = paramsRecord.get(myParamsToken_);
const auto& severityRecord = rcd.getRecord<HcalSeverityLevelComputerRcd>();
const HcalSeverityLevelComputer& severity = severityRecord.get(sevToken_);
const auto& qualRecord = dbRecord.getRecord<HcalChannelQualityRcd>();
const HcalChannelQuality& qual = qualRecord.get(qualToken_);
const auto& geomRecord = rcd.getRecord<CaloGeometryRecord>();
const CaloGeometry& geom = geomRecord.get(geomToken_);
const HcalRecoParams& params = rcd.get(myParamsToken_);
const HcalSeverityLevelComputer& severity = rcd.get(sevToken_);
const HcalChannelQuality& qual = dbRecord.get(qualToken_);
const CaloGeometry& geom = rcd.get(geomToken_);

// HcalTopology is taken from "params" created by the "produce1" method
const HcalTopology& htopo(*params.topo());
Expand Down