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

Fix gcc 9 warnings in DataFormats #27844

Merged
merged 4 commits into from
Sep 6, 2019

Conversation

mrodozov
Copy link
Contributor

PR description:

Fixes warnings in DataFormats gcc9 IB

PR validation:

Builds without warnings. Some warnings were from other packages (PR still open)

@mrodozov
Copy link
Contributor Author

please test

@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-27844/11581

  • This PR adds an extra 24KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 23, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/2146/console Started: 2019/08/23 17:17

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @mrodozov (Mircho Rodozov) for master.

It involves the following packages:

DataFormats/EgammaCandidates
DataFormats/HcalCalibObjects
DataFormats/TrackReco
DataFormats/TrackerCommon

@perrotta, @slava77, @christopheralanwest, @tocheng, @cmsbuild, @franzoni, @tlampen, @pohsun can you please review it and eventually sign? Thanks.
@Sam-Harper, @makortel, @jainshilpi, @tocheng, @VinInn, @rovere, @gpetruc, @mmusich, @lgray, @varuns23 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

@@ -35,7 +35,7 @@ double HFRecalibration::getCorr(int ieta, int depth, double lumi) {
switch (depth) {
case 1:
reCalFactor = (1 + HFParsAB[0][0][ieta] * sqrt(lumi) + HFParsAB[0][1][ieta] * lumi);

[[fallthrough]];
Copy link
Contributor

@perrotta perrotta Aug 23, 2019

Choose a reason for hiding this comment

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

I suspect this wasn't originally supposed to fall through: @abdoulline @igv4321 ?

Choose a reason for hiding this comment

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

@perrotta
I suppose there had to be "break" originally (apparently forgotten by author), as HF depths are treated separately (method parameter list has "depth" parameter).
So fall though doesn't seem to be natural here...

@@ -396,6 +396,7 @@ SiStripModuleGeometry TrackerTopology::moduleGeometry(const DetId &id) const {
case 3:
return SiStripModuleGeometry::W3A;
}
[[fallthrough]];
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should never fall through in real life, though, I would rather break here, after returning an SiStripModuleGeometry::UNKNOWNGEOMETRY;

@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-885847/2146/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2939508
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2939166
  • DQMHistoTests: Total skipped: 341
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 142 log files, 14 edm output root files, 34 DQM output files

@@ -90,6 +90,7 @@ void Photon::setCorrectedEnergy(P4type type, float newEnergy, float delta_e, boo
case regression1:
eCorrections_.regression1Energy = newEnergy;
eCorrections_.regression1EnergyError = delta_e;
[[fallthrough]];
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it rather break here? @Sam-Harper

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, this is bug, thanks for pointing this out. Luckily I dont think we use regression1 and its regression2 that is our main correction. Likewise for comment below

@@ -150,6 +151,7 @@ void Photon::setP4(P4type type, const LorentzVector& p4, float error, bool setTo
case regression1:
eCorrections_.regression1P4 = p4;
eCorrections_.regression1EnergyError = error;
[[fallthrough]];
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it rather break here? @Sam-Harper

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, see above comment, thanks for spotting!

@perrotta
Copy link
Contributor

Once could profit and further remove unneeded break statements in Photon::getCorrectedEnergy and Photon::getCorrectedEnergyError

@perrotta
Copy link
Contributor

@mrodozov , all updates have been addressed separately, and it looks like that the correct fix is here in all cases to replace the fallthrough with an apparently forgotten break statement.
Will you take care of updating this PR accordingly? Or should I do it?

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2019

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2019

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27844/11741

  • This PR adds an extra 28KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/2326/console Started: 2019/09/03 11:49

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2019

Pull request #27844 was updated. @perrotta, @slava77, @christopheralanwest, @tocheng, @cmsbuild, @franzoni, @tlampen, @pohsun can you please check and sign again.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2019

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2019

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2019

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2955700
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2955358
  • DQMHistoTests: Total skipped: 341
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 145 log files, 15 edm output root files, 34 DQM output files

@perrotta
Copy link
Contributor

perrotta commented Sep 4, 2019

+1

  • [[fallthrough]] directive inserted in DataFormats/EgammaCandidates/src/Photon.cc, to replicate the identical behaviour as before
  • fallthrough replaced by a break in DataFormats/HcalCalibObjects/src/HFRecalibration.cc (bug fix): this could affect HF aging scenarios in Phase2
  • fallthrough replaced by a return of UNKNOWNGEOMETRY in DataFormats/TrackerCommon/src/TrackerTopology.cc (logical bug fix, but quite likely never hit):
  • Jenkins tests pass and show no difference

@pohsun
Copy link

pohsun commented Sep 5, 2019

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 5, 2019

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

fabiocos commented Sep 6, 2019

+1

@cmsbuild cmsbuild merged commit 28f9d39 into cms-sw:master Sep 6, 2019
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.

8 participants