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

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

Merged
merged 5 commits into from
Jun 3, 2024

Conversation

iarspider
Copy link
Contributor

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

@cmsbuild
Copy link
Contributor

cmsbuild commented May 28, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

+code-checks

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

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

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

@makortel
Copy link
Contributor

On a quick look it would seem these

enum EBit {
k3DBit = 1 << k3D,
kRhoPhiBit = 1 << kRhoPhi,
kRhoZBit = 1 << kRhoZ,
kRhoPhiPFBit = 1 << kRhoPhiPF,
kISpyBit = 1 << kISpy,
kLegoBit = 1 << kLego,
kLegoHFBit = 1 << kLegoHF,
kLegoPFECALBit = 1 << kLegoPFECAL,
kGlimpseBit = 1 << kGlimpse,
kTableBit = 1 << kTable,
kTableHLTBit = 1 << kTableHLT,
kTableL1Bit = 1 << kTableL1,
kGeometryBit = 1 << kGeometryTable,
kOverlapBit = 1 << kOverlapTable
};

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.

@alja
Copy link
Contributor

alja commented May 28, 2024

@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.

@makortel
Copy link
Contributor

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

@alja
Copy link
Contributor

alja commented May 28, 2024

@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.

@makortel
Copy link
Contributor

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

FWViewType::kLegoBit | FWViewType::kLegoHF);

that I'm wondering about.

@alja
Copy link
Contributor

alja commented May 28, 2024

-1

@alja
Copy link
Contributor

alja commented May 28, 2024

@makortel I see .. It should be

FWViewType::kLegoBit | FWViewType::kLegoHFBit
); 

@alja
Copy link
Contributor

alja commented May 28, 2024

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

@makortel
Copy link
Contributor

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).

@alja
Copy link
Contributor

alja commented May 28, 2024

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.

@iarspider
Copy link
Contributor Author

please test for CMSSW_14_1_CPP20_X

@cmsbuild
Copy link
Contributor

+code-checks

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

  • This PR adds an extra 32KB to repository

@cmsbuild
Copy link
Contributor

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

@iarspider
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-da4ea7/39613/summary.html
COMMIT: cc91b8e
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
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-da4ea7/39614/summary.html
COMMIT: cc91b8e
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

@iarspider
Copy link
Contributor Author

@cms-sw/visualization-l2 gentle ping

@alja
Copy link
Contributor

alja commented May 31, 2024

+1

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

@rappoccio
Copy link
Contributor

+1

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