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

PPS clean code for bad pot #38740

Merged
merged 4 commits into from Jul 22, 2022
Merged

PPS clean code for bad pot #38740

merged 4 commits into from Jul 22, 2022

Conversation

fabferro
Copy link
Contributor

PR description:

This PR is a follow-up of PR #38553 implemented the requested code cleaning. No changes expected.

PR validation:

Run3 data processing.

No backport needed.

@tvami @grzanka

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-38740/31055

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @fabferro (Fabrizio Ferro) for master.

It involves the following packages:

  • RecoPPS/Local (reconstruction)

@jpata, @cmsbuild, @clacaputo can you please review it and eventually sign? Thanks.
@forthommel, @grzanka this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@tvami
Copy link
Contributor

tvami commented Jul 15, 2022

@cmsbuild , please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-608883/26259/summary.html
COMMIT: c6e0b2a
CMSSW: CMSSW_12_5_X_2022-07-14-2300/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/38740/26259/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 3653966
  • DQMHistoTests: Total failures: 8
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3653936
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 49 files compared)
  • Checked 208 log files, 45 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

@clacaputo
Copy link
Contributor

+reconstruction

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

@@ -65,31 +65,31 @@ class CTPPSPixelLocalTrackProducer : public edm::stream::EDProducer<> {

edm::InputTag inputTag_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inputTag_ never used

@@ -65,31 +65,31 @@ class CTPPSPixelLocalTrackProducer : public edm::stream::EDProducer<> {

edm::InputTag inputTag_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inputTag_ never used

@@ -65,31 +65,31 @@ class CTPPSPixelLocalTrackProducer : public edm::stream::EDProducer<> {

edm::InputTag inputTag_;
edm::EDGetTokenT<edm::DetSetVector<CTPPSPixelRecHit>> tokenCTPPSPixelRecHit_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not to make const all other classs members initialized in the ctor initialization list (and never modified afterwards)?

edm::ESWatcher<VeryForwardRealGeometryRecord> geometryWatcher_;

edm::ESGetToken<CTPPSPixelAnalysisMask, CTPPSPixelAnalysisMaskRcd> tokenCTPPSPixelAnalysisMask_;
const edm::ESGetToken<CTPPSPixelAnalysisMask, CTPPSPixelAnalysisMaskRcd> tokenCTPPSPixelAnalysisMask_;

uint32_t numberOfPlanesPerPot_;
std::vector<uint32_t> listOfAllPlanes_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only used locally in the constructor: no need to make it a class member.
Moreover: why to reserve(6) for it? Are you hardcoding somehow the number of elements that should be passed with the numberOfPlanesPerPot_ parameter instead? In any case, if this variable becomes local in the constructor, there is no need to reserve its size

@qliphy
Copy link
Contributor

qliphy commented Jul 20, 2022

@fabferro Please have a look at above comments. Moreover, this PR should be backport to 12_4_X

@cmsbuild
Copy link
Contributor

Pull request #38740 was updated. @jpata, @cmsbuild, @clacaputo can you please check and sign again.

@fabferro
Copy link
Contributor Author

@perrotta : comments implemented. Backport PR opened #38797

const edm::ESGetToken<CTPPSGeometry, VeryForwardRealGeometryRecord> tokenCTPPSGeometry_;
edm::ESWatcher<VeryForwardRealGeometryRecord> geometryWatcher_;

const edm::ESGetToken<CTPPSPixelAnalysisMask, CTPPSPixelAnalysisMaskRcd> tokenCTPPSPixelAnalysisMask_;

uint32_t numberOfPlanesPerPot_;
std::vector<uint32_t> listOfAllPlanes_;
const uint32_t numberOfPlanesPerPot_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @fabferro
To be fully compliant with the CMS style, since this is not a class member any more, you should remove the trailing underscore from the name.
Moreover, I'd move this definition right before when it is used, i.e before L103

(I know, this is not fundamental... But since tests weren't started yet, I think you can finish the cleaning before we launch them)

@perrotta
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-38740/31154

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

Pull request #38740 was updated. @jpata, @clacaputo can you please check and sign again.

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-608883/26343/summary.html
COMMIT: 7414392
CMSSW: CMSSW_12_5_X_2022-07-19-2300/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/38740/26343/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 3662417
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3662393
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 49 files compared)
  • Checked 208 log files, 45 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

@perrotta
Copy link
Contributor

@cms-sw/reconstruction-l2 could you please check and (re)sign, if you agree with the latest changes?

@perrotta
Copy link
Contributor

+1

@perrotta
Copy link
Contributor

merge

@cmsbuild cmsbuild merged commit d255b3f into cms-sw:master Jul 22, 2022
@jfernan2
Copy link
Contributor

jfernan2 commented Sep 18, 2023

+1
(for the reords)

@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 be automatically merged.

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

7 participants