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

[GCC13] Avoid Wdangling-reference warning in CalibTracker submodules #45732

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

iarspider
Copy link
Contributor

PR description:

In GCC13 IBs, the following warnings are emitted:

src/CalibTracker/SiStripCommon/plugins/TkDetMapESProducer.cc: In member function 'std::unique_ptr<TkDetMap> TkDetMapESProducer::produce(const TrackerTopologyRcd&)':
  src/CalibTracker/SiStripCommon/plugins/TkDetMapESProducer.cc:297:15: warning: possibly dangling reference to a temporary [-Wdangling-reference]
   297 |   const auto& geomDet = tTopoRcd.getRecord<IdealGeometryRecord>().get(geomDetToken_);
      |               ^~~~~~~
src/CalibTracker/SiStripCommon/plugins/TkDetMapESProducer.cc:297:70: note: the temporary was destroyed at the end of the full expression 'edm::eventsetup::DependentRecordImplementation<RecordT, ListT>::getRecord() const [with DepRecordT = IdealGeometryRecord; RecordT = TrackerTopologyRcd; ListT = edm::mpl::Vector<IdealGeometryRecord, PTrackerParametersRcd>]().IdealGeometryRecord::<anonymous>.edm::eventsetup::DependentRecordImplementation<IdealGeometryRecord, edm::mpl::Vector<GeometryFileRcd> >::<anonymous>.edm::eventsetup::EventSetupRecordImplementation<IdealGeometryRecord>::get<GeometricDet>(((TkDetMapESProducer*)this)->TkDetMapESProducer::geomDetToken_)'
  297 |   const auto& geomDet = tTopoRcd.getRecord<IdealGeometryRecord>().get(geomDetToken_);
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
	  
src/CalibTracker/SiStripESProducers/plugins/fake/SiStripBackPlaneCorrectionFakeESSource.cc: In member function 'SiStripBackPlaneCorrectionFakeESSource::ReturnType SiStripBackPlaneCorrectionFakeESSource::produce(const SiStripBackPlaneCorrectionRcd&)':
  src/CalibTracker/SiStripESProducers/plugins/fake/SiStripBackPlaneCorrectionFakeESSource.cc:68:15: warning: possibly dangling reference to a temporary [-Wdangling-reference]
    68 |   const auto& geomDet = iRecord.getRecord<TrackerTopologyRcd>().get(m_geomDetToken);
      |               ^~~~~~~
src/CalibTracker/SiStripESProducers/plugins/fake/SiStripBackPlaneCorrectionFakeESSource.cc:68:68: note: the temporary was destroyed at the end of the full expression 'edm::eventsetup::DependentRecordImplementation<RecordT, ListT>::getRecord() const [with DepRecordT = TrackerTopologyRcd; RecordT = SiStripBackPlaneCorrectionRcd; ListT = edm::mpl::Vector<TrackerTopologyRcd>]().TrackerTopologyRcd::<anonymous>.edm::eventsetup::DependentRecordImplementation<TrackerTopologyRcd, edm::mpl::Vector<IdealGeometryRecord, PTrackerParametersRcd> >::get<GeometricDet, IdealGeometryRecord>(((SiStripBackPlaneCorrectionFakeESSource*)this)->SiStripBackPlaneCorrectionFakeESSource::m_geomDetToken)'
   68 |   const auto& geomDet = iRecord.getRecord<TrackerTopologyRcd>().get(m_geomDetToken);
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~

src/CalibTracker/SiStripESProducers/plugins/fake/SiStripHashedDetIdFakeESSource.cc: In member function 'virtual std::unique_ptr<SiStripHashedDetId> SiStripHashedDetIdFakeESSource::produce(const SiStripHashedDetIdRcd&)':
  src/CalibTracker/SiStripESProducers/plugins/fake/SiStripHashedDetIdFakeESSource.cc:34:15: warning: possibly dangling reference to a temporary [-Wdangling-reference]
    34 |   const auto& geomDet = record.getRecord<TrackerDigiGeometryRecord>().get(geomDetToken_);
      |               ^~~~~~~
src/CalibTracker/SiStripESProducers/plugins/fake/SiStripHashedDetIdFakeESSource.cc:34:74: note: the temporary was destroyed at the end of the full expression 'edm::eventsetup::DependentRecordImplementation<RecordT, ListT>::getRecord() const [with DepRecordT = TrackerDigiGeometryRecord; RecordT = SiStripHashedDetIdRcd; ListT = edm::mpl::Vector<TrackerDigiGeometryRecord>]().TrackerDigiGeometryRecord::<anonymous>.edm::eventsetup::DependentRecordImplementation<TrackerDigiGeometryRecord, edm::mpl::Vector<IdealGeometryRecord, TrackerAlignmentRcd, TrackerAlignmentErrorExtendedRcd, TrackerSurfaceDeformationRcd, GlobalPositionRcd, TrackerTopologyRcd, PTrackerParametersRcd, PTrackerAdditionalParametersPerDetRcd> >::get<GeometricDet, IdealGeometryRecord>(((SiStripHashedDetIdFakeESSource*)this)->SiStripHashedDetIdFakeESSource::geomDetToken_)'
   34 |   const auto& geomDet = record.getRecord<TrackerDigiGeometryRecord>().get(geomDetToken_);
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
src/CalibTracker/SiStripESProducers/plugins/fake/SiStripLorentzAngleFakeESSource.cc: In member function 'SiStripLorentzAngleFakeESSource::ReturnType SiStripLorentzAngleFakeESSource::produce(const SiStripLorentzAngleRcd&)':
  src/CalibTracker/SiStripESProducers/plugins/fake/SiStripLorentzAngleFakeESSource.cc:186:15: warning: possibly dangling reference to a temporary [-Wdangling-reference]
   186 |   const auto& geomDet = iRecord.getRecord<TrackerTopologyRcd>().get(m_geomDetToken);
      |               ^~~~~~~
src/CalibTracker/SiStripESProducers/plugins/fake/SiStripLorentzAngleFakeESSource.cc:186:68: note: the temporary was destroyed at the end of the full expression 'edm::eventsetup::DependentRecordImplementation<RecordT, ListT>::getRecord() const [with DepRecordT = TrackerTopologyRcd; RecordT = SiStripLorentzAngleRcd; ListT = edm::mpl::Vector<TrackerTopologyRcd>]().TrackerTopologyRcd::<anonymous>.edm::eventsetup::DependentRecordImplementation<TrackerTopologyRcd, edm::mpl::Vector<IdealGeometryRecord, PTrackerParametersRcd> >::get<GeometricDet, IdealGeometryRecord>(((SiStripLorentzAngleFakeESSource*)this)->SiStripLorentzAngleFakeESSource::m_geomDetToken)'
  186 |   const auto& geomDet = iRecord.getRecord<TrackerTopologyRcd>().get(m_geomDetToken);
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
	  
src/CalibTracker/SiStripQuality/plugins/SiStripQualityHotStripIdentifier.cc: In member function 'void SiStripQualityHotStripIdentifier::bookHistos()':
  src/CalibTracker/SiStripQuality/plugins/SiStripQualityHotStripIdentifier.cc:170:83: warning: possibly dangling reference to a temporary [-Wdangling-reference]
   170 |   for (const auto& it : SiStripDetInfoFileReader::read(fp_.fullPath()).getAllData()) {
      |                                                                                   ^
src/CalibTracker/SiStripQuality/plugins/SiStripQualityHotStripIdentifier.cc:170:82: note: the temporary was destroyed at the end of the full expression 'SiStripDetInfoFileReader::read(std::string)().SiStripDetInfo::getAllData()'
  170 |   for (const auto& it : SiStripDetInfoFileReader::read(fp_.fullPath()).getAllData()) {
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~

PR validation:

Bot tests

@iarspider iarspider changed the title Avoid Wdangling-reference warning in CalibTracker submodules [GCC13] Avoid Wdangling-reference warning in CalibTracker submodules Aug 17, 2024
@iarspider
Copy link
Contributor Author

please test for el9_amd64_gcc13

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 17, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @iarspider for master.

It involves the following packages:

  • CalibTracker/SiStripCommon (alca)
  • CalibTracker/SiStripESProducers (alca)
  • CalibTracker/SiStripQuality (alca)

@consuegs, @perrotta, @saumyaphor4252 can you please review it and eventually sign? Thanks.
@echabert, @gbenelli, @mmusich, @robervalwalsh, @rsreds, @tocheng, @yuanchao this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@iarspider
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 24KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-faa5ad/40989/summary.html
COMMIT: 575e336
CMSSW: CMSSW_14_1_X_2024-08-16-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/45732/40989/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-faa5ad/40988/summary.html
COMMIT: 575e336
CMSSW: CMSSW_14_1_X_2024-08-16-2300/el9_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/45732/40988/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 265 lines to the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 61768 differences found in the comparisons
  • DQMHistoTests: Total files compared: 45
  • DQMHistoTests: Total histograms compared: 3422510
  • DQMHistoTests: Total failures: 364291
  • DQMHistoTests: Total nulls: 373
  • DQMHistoTests: Total successes: 3057826
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 5.620999999999999 KiB( 44 files compared)
  • DQMHistoSizes: changed ( 10224.0 ): -0.544 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 13034.0 ): 2.776 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 140.043 ): -0.004 KiB JetMET/SUSYDQM
  • DQMHistoSizes: changed ( 250202.181 ): 0.234 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 25202.0 ): 0.719 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 7.3 ): 2.702 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 8.0 ): -0.262 KiB SiStrip/MechanicalView
  • Checked 196 log files, 165 edm output root files, 45 DQM output files

…tifier.cc

Co-authored-by: Andrea Perrotta <perrotta@cern.ch>
@iarspider
Copy link
Contributor Author

please test for el9_amd64_gcc13

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Pull request #45732 was updated. @consuegs, @perrotta, @saumyaphor4252 can you please check and sign again.

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-faa5ad/41000/summary.html
COMMIT: a3b77c7
CMSSW: CMSSW_14_1_X_2024-08-16-2300/el9_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/45732/41000/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 262 lines to the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 61768 differences found in the comparisons
  • DQMHistoTests: Total files compared: 45
  • DQMHistoTests: Total histograms compared: 3422510
  • DQMHistoTests: Total failures: 364292
  • DQMHistoTests: Total nulls: 373
  • DQMHistoTests: Total successes: 3057825
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 5.620999999999999 KiB( 44 files compared)
  • DQMHistoSizes: changed ( 10224.0 ): -0.544 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 13034.0 ): 2.776 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 140.043 ): -0.004 KiB JetMET/SUSYDQM
  • DQMHistoSizes: changed ( 250202.181 ): 0.234 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 25202.0 ): 0.719 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 7.3 ): 2.702 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 8.0 ): -0.262 KiB SiStrip/MechanicalView
  • Checked 196 log files, 165 edm output root files, 45 DQM output files

@perrotta
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 12KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-faa5ad/41005/summary.html
COMMIT: a3b77c7
CMSSW: CMSSW_14_1_X_2024-08-18-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45732/41005/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 2 lines to the logs
  • Reco comparison results: 8 differences found in the comparisons
  • DQMHistoTests: Total files compared: 45
  • DQMHistoTests: Total histograms compared: 3422510
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3422488
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 44 files compared)
  • Checked 196 log files, 165 edm output root files, 45 DQM output files
  • TriggerResults: no differences found

@perrotta
Copy link
Contributor

+alca

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @mandrenguyen, @sextonkennedy, @rappoccio, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2)

@mandrenguyen
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 1d7ff69 into cms-sw:master Aug 19, 2024
17 checks passed
@iarspider iarspider deleted the iarspider-patch-20240817-5 branch August 19, 2024 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants