cmssw icon indicating copy to clipboard operation
cmssw copied to clipboard

[CPP20][DQM] Replace enum with static constexpr int in DQWorkerClient; replace ecaldqm::Constants enum with static constexpr ints

Open iarspider opened this issue 1 year ago • 8 comments

PR description:

Fixes the following compilation warnings:

src/DQM/EcalMonitorClient/src/CalibrationSummaryClient.cc: In member function 'virtual void ecaldqm::CalibrationSummaryClient::producePlots(ecaldqm::DQWorkerClient::ProcessType)':
  src/DQM/EcalMonitorClient/src/CalibrationSummaryClient.cc:157:67: warning: comparison of floating-point type 'double' with enumeration type 'ecaldqm::DQWorkerClient::Quality' is deprecated [-Wdeprecated-enum-float-conversion]
   157 |           if (sLaser->getBinContent(getEcalDQMSetupObjects(), id) == kBad) {
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
  src/DQM/EcalMonitorClient/src/CalibrationSummaryClient.cc:169:67: warning: comparison of floating-point type 'double' with enumeration type 'ecaldqm::DQWorkerClient::Quality' is deprecated [-Wdeprecated-enum-float-conversion]
   169 |             if (sLed->getBinContent(getEcalDQMSetupObjects(), id) == kBad) {
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
  src/DQM/EcalMonitorClient/src/CalibrationSummaryClient.cc:180:71: warning: comparison of floating-point type 'double' with enumeration type 'ecaldqm::DQWorkerClient::Quality' is deprecated [-Wdeprecated-enum-float-conversion]
   180 |           if (sTestPulse->getBinContent(getEcalDQMSetupObjects(), id) == kBad) {
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
  src/DQM/EcalMonitorClient/src/CalibrationSummaryClient.cc:190:70: warning: comparison of floating-point type 'double' with enumeration type 'ecaldqm::DQWorkerClient::Quality' is deprecated [-Wdeprecated-enum-float-conversion]
   190 |           if (sPedestal->getBinContent(getEcalDQMSetupObjects(), id) == kBad) {
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
  src/DQM/EcalMonitorClient/src/CalibrationSummaryClient.cc:214:70: warning: comparison of floating-point type 'double' with enumeration type 'ecaldqm::DQWorkerClient::Quality' is deprecated [-Wdeprecated-enum-float-conversion]
   214 |         if (sPNIntegrity.getBinContent(getEcalDQMSetupObjects(), id) == kBad)
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
  src/DQM/EcalMonitorClient/src/CalibrationSummaryClient.cc:220:71: warning: comparison of floating-point type 'double' with enumeration type 'ecaldqm::DQWorkerClient::Quality' is deprecated [-Wdeprecated-enum-float-conversion]
   220 |             if (sLaserPN->getBinContent(getEcalDQMSetupObjects(), id) == kBad) {
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
  src/DQM/EcalMonitorClient/src/CalibrationSummaryClient.cc:230:69: warning: comparison of floating-point type 'double' with enumeration type 'ecaldqm::DQWorkerClient::Quality' is deprecated [-Wdeprecated-enum-float-conversion]
   230 |             if (sLedPN->getBinContent(getEcalDQMSetupObjects(), id) == kBad) {
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
  src/DQM/EcalMonitorClient/src/CalibrationSummaryClient.cc:240:75: warning: comparison of floating-point type 'double' with enumeration type 'ecaldqm::DQWorkerClient::Quality' is deprecated [-Wdeprecated-enum-float-conversion]
   240 |             if (sTestPulsePN->getBinContent(getEcalDQMSetupObjects(), id) == kBad) {
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
  src/DQM/EcalMonitorClient/src/CalibrationSummaryClient.cc:251:74: warning: comparison of floating-point type 'double' with enumeration type 'ecaldqm::DQWorkerClient::Quality' is deprecated [-Wdeprecated-enum-float-conversion]
   251 |             if (sPedestalPN->getBinContent(getEcalDQMSetupObjects(), id) == kBad) {
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
src/DQM/EcalMonitorClient/src/CertificationClient.cc: In member function 'virtual void ecaldqm::CertificationClient::producePlots(ecaldqm::DQWorkerClient::ProcessType)':
  src/DQM/EcalMonitorClient/src/CertificationClient.cc:34:62: warning: arithmetic between floating-point type 'double' and enumeration type 'ecaldqm::Constants' is deprecated [-Wdeprecated-enum-float-conversion]
    34 |     meCertification.fill(getEcalDQMSetupObjects(), meanValue / nChannels);
      |                                                    ~~~~~~~~~~^~~~~~~~~~~

PR validation:

Bot tests

iarspider avatar May 28 '24 11:05 iarspider

cms-bot internal usage

cmsbuild avatar May 28 '24 12:05 cmsbuild

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45070/40386

  • This PR adds an extra 20KB to repository

cmsbuild avatar May 28 '24 12:05 cmsbuild

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

It involves the following packages:

  • DQM/EcalCommon (dqm)
  • DQM/EcalMonitorClient (dqm)

@nothingface0, @rvenditti, @syuvivida, @antoniovagnerini, @tjavaid, @cmsbuild can you please review it and eventually sign? Thanks. @ReyerBand, @argiro, @wang0jin, @rchatter, @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

cmsbuild avatar May 28 '24 12:05 cmsbuild

please test for CMSSW_14_1_CPP20_X

iarspider avatar May 28 '24 12:05 iarspider

please test

iarspider avatar May 28 '24 13:05 iarspider

can the PR title reflect which class(es) get(s) changed?

mmusich avatar May 28 '24 13:05 mmusich

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ecea54/39572/summary.html COMMIT: 48fc1a24e0f41d98b1762a4b33de3e446ca35aaa 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/45070/39572/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

cmsbuild avatar May 28 '24 16:05 cmsbuild

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ecea54/39577/summary.html COMMIT: 48fc1a24e0f41d98b1762a4b33de3e446ca35aaa CMSSW: CMSSW_14_1_X_2024-05-28-1100/el8_amd64_gcc12 User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45070/39577/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: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3338862
  • DQMHistoTests: Total failures: 3
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3338839
  • 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 28 '24 17:05 cmsbuild

+1

tjavaid avatar Jun 06 '24 07:06 tjavaid

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

cmsbuild avatar Jun 06 '24 07:06 cmsbuild

+1

rappoccio avatar Jun 06 '24 13:06 rappoccio