cmssw icon indicating copy to clipboard operation
cmssw copied to clipboard

[CPP20][Visualisation] Fix deprecated enum bitwise operation in FWCandidateHGCalLegoProxyBuilder

Open iarspider opened this issue 1 year ago • 27 comments

PR description:

Fix deprecated enum bitwise operation in FWCandidateHGCalLegoProxyBuilder

src/Fireworks/Candidates/plugins/FWCandidateHGCalLegoProxyBuilder.cc: In static member function 'static const std::string& FWCandidateHGCalLegoProxyBuilder::classView()':
  src/Fireworks/Candidates/plugins/FWCandidateHGCalLegoProxyBuilder.cc:97:46: warning: bitwise operation between different enumeration types 'FWViewType::EBit' and 'FWViewType::EType' is deprecated [-Wdeprecated-enum-enum-conversion]
    97 |                         FWViewType::kLegoBit | FWViewType::kLegoHF);
      |                         ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~

PR validation:

Bot tests

iarspider avatar May 28 '24 14:05 iarspider

cms-bot internal usage

cmsbuild avatar May 28 '24 14:05 cmsbuild

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45076/40391

  • This PR adds an extra 16KB to repository

cmsbuild avatar May 28 '24 14:05 cmsbuild

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

It involves the following packages:

  • Fireworks/Candidates (visualization)

@cmsbuild, @makortel, @Dr15Jones, @alja can you please review it and eventually sign? Thanks. @alja 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

cmsbuild avatar May 28 '24 14:05 cmsbuild

On a quick look it would seem these https://github.com/cms-sw/cmssw/blob/488c782b70517aeaf965096910f9c9ef886689be/Fireworks/Core/interface/FWViewType.h#L49-L64 would be better defined as static constexpr unsigned int constants.

What exactly is the purpose of or between kLegoBit and kLegoHF here? On a quick look of a few REGISTER_FWPROXYBUILDER() calls I see the or being taken among various k*Bit constants.

makortel avatar May 28 '24 14:05 makortel

@makortel This enum is used for different view types. E.g. 3D, projected views, glimpse , histogram, table type views etc. There are different types of histogram (or lego) views. Same as there are different types of projected views. Some of graphic scene elements are shared within similar view types.

alja avatar May 28 '24 17:05 alja

How would kLegoBit be distinguished from k3DBit | kRhoPhiBit? They both have the same numerical value (5).

makortel avatar May 28 '24 18:05 makortel

@makortel

There is bitwise left shit operators kLegoBit = 16 k3DBit | kRhoPhiBit = 3

I agree the whole process of plugin registration and the operators in quite convoluted.

alja avatar May 28 '24 21:05 alja

There is bitwise left shit operators

Ah sorry, I meant

How would kLegoHF be distinguished from k3DBit | kRhoPhiBit? They both have the same numerical value (5).

It is specifically this or of EType value and EBit value https://github.com/cms-sw/cmssw/blob/ab77a26b8f468cc38636c60812dff1082c6fa645/Fireworks/Candidates/plugins/FWCandidateHGCalLegoProxyBuilder.cc#L97 that I'm wondering about.

makortel avatar May 28 '24 21:05 makortel

-1

alja avatar May 28 '24 21:05 alja

@makortel I see .. It should be

FWViewType::kLegoBit | FWViewType::kLegoHFBit
); 

alja avatar May 28 '24 21:05 alja

@makortel @iarspider What should we do with this PR?

alja avatar May 28 '24 21:05 alja

In my opinion it would be good to replace the EBit enum with static constexpr unsigned int constants, and then fix the line as @alja suggested in https://github.com/cms-sw/cmssw/pull/45076#issuecomment-2136163268 . It doesn't really matter to me whether those would be done in this PR or in a separate PR (in which case I'd close this PR).

makortel avatar May 28 '24 22:05 makortel

In my opinion it would be good to replace the EBit enum with static constexpr unsigned int constants, and then fix the line as @alja suggested in #45076 (comment) . It doesn't really matter to me whether those would be done in this PR or in a separate PR (in which case I'd close this PR).

OK, I will make the change mentioned in #45076 (comment) in a separate PR.

alja avatar May 28 '24 23:05 alja

please test for CMSSW_14_1_CPP20_X

iarspider avatar May 29 '24 07:05 iarspider

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45076/40407

  • This PR adds an extra 32KB to repository

cmsbuild avatar May 29 '24 07:05 cmsbuild

Pull request #45076 was updated. @alja, @Dr15Jones, @makortel can you please check and sign again.

cmsbuild avatar May 29 '24 07:05 cmsbuild

please test

iarspider avatar May 29 '24 07:05 iarspider

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-da4ea7/39595/summary.html COMMIT: 349dedfc53175e1af788c5a5c9fd4703c1cea674 CMSSW: CMSSW_14_1_CPP20_X_2024-05-27-1100/el8_amd64_gcc12 User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45076/39595/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

cmsbuild avatar May 29 '24 10:05 cmsbuild

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-da4ea7/39596/summary.html COMMIT: 349dedfc53175e1af788c5a5c9fd4703c1cea674 CMSSW: CMSSW_14_1_X_2024-05-28-2300/el8_amd64_gcc12 User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45076/39596/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: 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

cmsbuild avatar May 29 '24 10:05 cmsbuild

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45076/40421

  • This PR adds an extra 32KB to repository

cmsbuild avatar May 29 '24 16:05 cmsbuild

Pull request #45076 was updated. @cmsbuild, @alja, @makortel, @Dr15Jones can you please check and sign again.

cmsbuild avatar May 29 '24 16:05 cmsbuild

please test for CMSSW_14_1_CPP20_X

iarspider avatar May 29 '24 16:05 iarspider

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45076/40422

  • This PR adds an extra 32KB to repository

cmsbuild avatar May 29 '24 16:05 cmsbuild

Pull request #45076 was updated. @alja, @Dr15Jones, @makortel can you please check and sign again.

cmsbuild avatar May 29 '24 16:05 cmsbuild

please test

iarspider avatar May 29 '24 16:05 iarspider

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-da4ea7/39613/summary.html COMMIT: cc91b8e87f4a584bd16e576621d7d77751c9f9c6 CMSSW: CMSSW_14_1_CPP20_X_2024-05-27-1100/el8_amd64_gcc12 User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45076/39613/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

cmsbuild avatar May 29 '24 19:05 cmsbuild

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-da4ea7/39614/summary.html COMMIT: cc91b8e87f4a584bd16e576621d7d77751c9f9c6 CMSSW: CMSSW_14_1_X_2024-05-29-1100/el8_amd64_gcc12 User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45076/39614/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 1 lines to the logs
  • Reco comparison results: 10 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3338862
  • DQMHistoTests: Total failures: 9
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3338833
  • 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

cmsbuild avatar May 29 '24 19:05 cmsbuild

@cms-sw/visualization-l2 gentle ping

iarspider avatar May 31 '24 13:05 iarspider

+1

alja avatar May 31 '24 15:05 alja

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)

cmsbuild avatar May 31 '24 15:05 cmsbuild