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

Make CSC{AL,CL}CTDigi::getHits() to return by const reference instead of a copy #30247

Merged
merged 2 commits into from Jun 16, 2020

Conversation

makortel
Copy link
Contributor

@makortel makortel commented Jun 15, 2020

PR description:

This PR proposes to change CSCCLCTDigi::getHits() to return CSCCLCTDigi::ComparatorContainer (vector of vector of uint16_t) by a const reference instead of a copy. This change fixes a clang warning in Validation/MuonCSCDigis/src/CSCStubMatcher.cc

  /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/6038296c716a87387818187cfd4f57eb/opt/cmssw/slc7_amd64_gcc820/cms/cmssw/CMSSW_11_2_CLANG_X_2020-06-14-2300/src/Validation/MuonCSCDigis/src/CSCStubMatcher.cc:140:39: warning: object backing the pointer will be destroyed at the end of the full-expression [-Wdangling-gsl]
           for (const auto& clctComp : (*c).getHits()[layer - 1]) {
                                      ^~~~~~~~~~~~~~
1 warning generated.

https://cmssdt.cern.ch/SDT/cgi-bin/buildlogs/slc7_amd64_gcc820/CMSSW_11_2_CLANG_X_2020-06-14-2300/Validation/MuonCSCDigis

The CSCALCTDigi::getHits() is changed accordingly.

PR validation:

Code compiles, with clang without warnings.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-30247/16141

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @makortel (Matti Kortelainen) for master.

It involves the following packages:

DataFormats/CSCDigi

@cmsbuild, @civanch, @mdhildreth can you please review it and eventually sign? Thanks.
@dildick, @ptcox, @rovere this is something you requested to watch as well.
@silviodonato, @dpiparo you are the release manager for this.

cms-bot commands are listed here

@makortel
Copy link
Contributor Author

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 15, 2020

The tests are being triggered in jenkins.

@dildick
Copy link
Contributor

dildick commented Jun 15, 2020

@makortel Thanks for spotting this. There is a similar line here https://github.com/cms-sw/cmssw/blob/master/DataFormats/CSCDigi/interface/CSCALCTDigi.h#L118, which is not throwing a warning as it is not being used in the CSC validation yet, but it should be modified as well.

@cmsbuild
Copy link
Contributor

+1
Tested at: 347a76a
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-385095/7076/summary.html
CMSSW: CMSSW_11_2_X_2020-06-15-1100
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

Comparison job queued.

@makortel
Copy link
Contributor Author

Thanks @dildick, I changed that one as well.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@makortel makortel changed the title Make CSCCLCTDigi::getHits() to return by const reference instead of a copy Make CSC{AL,CL}CTDigi::getHits() to return by const reference instead of a copy Jun 15, 2020
@cmsbuild
Copy link
Contributor

Pull request #30247 was updated. @cmsbuild, @civanch, @mdhildreth can you please check and sign again.

@makortel
Copy link
Contributor Author

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 15, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-385095/7076/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 36
  • DQMHistoTests: Total histograms compared: 2778811
  • DQMHistoTests: Total failures: 4
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2778757
  • DQMHistoTests: Total skipped: 50
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 35 files compared)
  • Checked 152 log files, 16 edm output root files, 36 DQM output files

@cmsbuild
Copy link
Contributor

+1
Tested at: b79e462
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-385095/7084/summary.html
CMSSW: CMSSW_11_2_X_2020-06-15-1100
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-385095/7084/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 36
  • DQMHistoTests: Total histograms compared: 2778811
  • DQMHistoTests: Total failures: 4
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2778757
  • DQMHistoTests: Total skipped: 50
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 35 files compared)
  • Checked 152 log files, 16 edm output root files, 36 DQM output files

@civanch
Copy link
Contributor

civanch commented Jun 16, 2020

+1

@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. @silviodonato, @dpiparo (and backports should be raised in the release meeting by the corresponding L2)

@silviodonato
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 9bc2221 into cms-sw:master Jun 16, 2020
@makortel makortel deleted the clangCSCCLCTDigi branch June 16, 2020 12:40
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.

None yet

5 participants