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 deprecated enum arithmetics in CaloGeometry #45133

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

iarspider
Copy link
Contributor

PR description:

Fix the following compilation warning:

  src/Geometry/CaloGeometry/src/CaloGeometry.cc:19:16: warning: arithmetic between different enumeration types 'DetId::Detector' and 'CaloGeometry::<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
    19 |   return ((det - kMinDet) * kNSubDets + subdet);
      |            ~~~~^~~~~~~~~

PR validation:

Bot tests

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 4, 2024

cms-bot internal usage

@iarspider
Copy link
Contributor Author

please test for CMSSW_14_1_CPP20_X

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 4, 2024

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45133/40473

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 4, 2024

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

It involves the following packages:

  • Geometry/CaloGeometry (geometry)

@bsunanda, @makortel, @Dr15Jones, @mdhildreth, @civanch can you please review it and eventually sign? Thanks.
@fabiocos, @wang0jin, @bsunanda, @ReyerBand, @thomreis this is something you requested to watch as well.
@rappoccio, @sextonkennedy, @antoniovilela you are the release manager for this.

cms-bot commands are listed here

@@ -16,7 +16,7 @@ unsigned int CaloGeometry::makeIndex(DetId::Detector det, int subdet, bool& ok)
edm::LogWarning("CaloGeometry") << "Det:Subdet " << idet << ":" << subdet << " min|max Det " << kMinDet << ":"
<< kMaxDet << " min|max subdet 0:" << kMaxSub;

return ((det - kMinDet) * kNSubDets + subdet);
return ((det - static_cast<int>(kMinDet)) * kNSubDets + subdet);
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 it would be better to define all these

enum {
kMaxDet = 10,
kMinDet = 3,
kNDets = kMaxDet - kMinDet + 1,
kMaxSub = 6,
kNSubDets = kMaxSub + 1,
kLength = kNDets * kNSubDets
};

as static constexpr constants.

@iarspider
Copy link
Contributor Author

please abort

@iarspider
Copy link
Contributor Author

please test for CMSSW_14_1_CPP20_X

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 4, 2024

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45133/40476

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 4, 2024

Pull request #45133 was updated. @civanch, @makortel, @Dr15Jones, @mdhildreth, @bsunanda can you please check and sign again.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 4, 2024

-1

Failed Tests: UnitTests
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7f5f34/39697/summary.html
COMMIT: f7a44d1
CMSSW: CMSSW_14_1_CPP20_X_2024-06-03-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/45133/39697/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7f5f34/39697/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7f5f34/39697/git-merge-result

Unit Tests

I found 1 errors in the following unit tests:

---> test RecoPPSLocalNewT2 had ERRORS

Comparison Summary

Summary:

@iarspider
Copy link
Contributor Author

please test

@iarspider
Copy link
Contributor Author

test RecoPPSLocalNewT2 had ERRORS

#45101

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2024

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7f5f34/39702/summary.html
COMMIT: f7a44d1
CMSSW: CMSSW_14_1_X_2024-06-04-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/45133/39702/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 2 lines from the logs
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3338862
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3338842
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 202 log files, 165 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@civanch
Copy link
Contributor

civanch commented Jun 6, 2024

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 6, 2024

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

@rappoccio
Copy link
Contributor

+1

@rappoccio
Copy link
Contributor

merge

@cmsbuild cmsbuild merged commit dff78b8 into cms-sw:master Jun 6, 2024
16 of 17 checks passed
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.

5 participants