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

Move duplicate getCtfTrackRef function to its own file #25976

Merged
merged 1 commit into from Feb 26, 2019
Merged

Move duplicate getCtfTrackRef function to its own file #25976

merged 1 commit into from Feb 26, 2019

Conversation

guitargeek
Copy link
Contributor

Just some reorganization of duplicate code in RecoEgamma, which also goes in the direction of slimming down a bit GsfElectronAlgo aka. "the electron god class".

Are there any convention related to names of files holding free functions like this? And do you maybe share my sentiment that the function should be maybe given a more clear name like getClosestCtfToGsf?

@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-25976/8481

  • This PR adds an extra 32KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @guitargeek (Jonas Rembser) for master.

It involves the following packages:

RecoEgamma/EgammaElectronAlgos
RecoEgamma/EgammaElectronProducers

@cmsbuild, @perrotta, @slava77 can you please review it and eventually sign? Thanks.
@jainshilpi, @Sam-Harper, @varuns23, @rovere, @lgray this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@perrotta
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 19, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/33192/console Started: 2019/02/19 18:18

@cmsbuild
Copy link
Contributor

@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-25976/33192/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 32
  • DQMHistoTests: Total histograms compared: 3098286
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3098088
  • DQMHistoTests: Total skipped: 197
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 31 files compared)
  • Checked 133 log files, 14 edm output root files, 32 DQM output files

@guitargeek
Copy link
Contributor Author

Hi @perrotta, with #25977 being merged soon I will have to do a rebase here. Do you have any suggestion about e.g. the file name so I can do the rebase and implement comments in one go? Thanks!

Copy link
Contributor

@perrotta perrotta left a comment

Choose a reason for hiding this comment

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

About the name of the file: you could do something similar as, e.g., EgAmbiguityTools in the same package: GsfElectronTools (?) with a namespace which includes the functions in it (only this one, by now).
About the name of the function, since it is only addressed in a couple of places in cmssw, I think you can rename it in some more appropriate way if you think so.

@@ -0,0 +1,14 @@
#ifndef getCtfTrackRef_h
Copy link
Contributor

Choose a reason for hiding this comment

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

Include guard should include the full path

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok! Thanks for giving your opinion.

@perrotta
Copy link
Contributor

please test
(hoping that the issue described in #26002 can be solved now)

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 25, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/33266/console Started: 2019/02/25 16:01

@cmsbuild
Copy link
Contributor

@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-25976/33266/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 32
  • DQMHistoTests: Total histograms compared: 3098286
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3098088
  • DQMHistoTests: Total skipped: 197
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 31 files compared)
  • Checked 133 log files, 14 edm output root files, 32 DQM output files

@perrotta
Copy link
Contributor

perrotta commented Feb 26, 2019

+1

  • It just moves a utility function into a dedicated file, so that it can be called from the different classes without code duplication
  • No change expected in outputs: jenkins tests pass and show no changes
  • (The same could have been obtained by using directly the same function as defined in GsfElectronCoreBaseProducer: this PR goes in the direction of separating those "utility functions" from the class code, which gets therefore "slimmed" as such)

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

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit c6d3ed5 into cms-sw:master Feb 26, 2019
@guitargeek guitargeek deleted the closestCtfTrack_codeDuplication branch February 26, 2019 15:30
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