cmssw icon indicating copy to clipboard operation
cmssw copied to clipboard

Removing clang warning in EgammaHLTPixelMatchVarProducer

Open Sam-Harper opened this issue 1 year ago • 8 comments

PR description:

This PR fixes the clang warning reported in https://github.com/cms-sw/cmssw/pull/46319

The warning was harmless but in looking at the code, figured would make it a bit more robust against bad data (and if we ever added a new pixel layer unlikely that it is)

So the code now explicitly verfies that the value is in range and throws an exception if caused. I also strongly suspect but did not prove 100% that numeric_limits::max is an invalid value for this specific quanity and put that as an exception as well. I'm running over a bunch of data to verify this (about 20k HLTPhysics events and will try to run on an EGamma file)

Finally it should be noted that this code is only run if productsToWrite = 2 which is only done for debugging when we wish to dump the values of this producer for studies. So it doesnt normally run in the HLT and I dont believe there is any workflow that runs this code.

So this should be a zero output change. As this code does not run normally and when it does run the data should always pass these checks.

PR validation:

Runs as expected on my local machine based on HLT timing data. Will run on E/gamma data later with productsToWrite=2 later.

Sam-Harper avatar Oct 23 '24 09:10 Sam-Harper

cms-bot internal usage

cmsbuild avatar Oct 23 '24 09:10 cmsbuild

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46488/42343

  • There are other open Pull requests which might conflict with changes you have proposed:
    • File RecoEgamma/EgammaHLTProducers/plugins/EgammaHLTPixelMatchVarProducer.cc modified in PR(s): #46319

cmsbuild avatar Oct 23 '24 09:10 cmsbuild

A new Pull Request was created by @Sam-Harper for master.

It involves the following packages:

  • RecoEgamma/EgammaHLTProducers (hlt)

@Martin-Grunewald, @cmsbuild, @mmusich can you please review it and eventually sign? Thanks. @Fedespring, @HuguesBrun, @Prasant1993, @a-kapoor, @afiqaize, @cericeci, @jainshilpi, @lgray, @missirol, @mmusich, @ram1123, @sameasy, @silviodonato, @sobhatta, @valsdav, @varuns23 this is something you requested to watch as well. @antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

cmsbuild avatar Oct 23 '24 09:10 cmsbuild

@cmsbuild, please test

mmusich avatar Oct 23 '24 10:10 mmusich

+1

Size: This PR adds an extra 20KB to repository Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-59643c/42354/summary.html COMMIT: 46a958fbf72a8c04d526eec537f5bceaa88896d3 CMSSW: CMSSW_14_2_X_2024-10-22-2300/el8_amd64_gcc12 User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/46488/42354/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 2 lines to the logs
  • Reco comparison results: 12 differences found in the comparisons
  • DQMHistoTests: Total files compared: 46
  • DQMHistoTests: Total histograms compared: 3566331
  • DQMHistoTests: Total failures: 420
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3565891
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 45 files compared)
  • Checked 201 log files, 171 edm output root files, 46 DQM output files
  • TriggerResults: no differences found

cmsbuild avatar Oct 23 '24 13:10 cmsbuild

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46488/42347

  • There are other open Pull requests which might conflict with changes you have proposed:
    • File RecoEgamma/EgammaHLTProducers/plugins/EgammaHLTPixelMatchVarProducer.cc modified in PR(s): #46319

cmsbuild avatar Oct 23 '24 14:10 cmsbuild

Pull request #46488 was updated. @Martin-Grunewald, @cmsbuild, @mmusich can you please check and sign again.

cmsbuild avatar Oct 23 '24 14:10 cmsbuild

@cmsbuild, please test

Sam-Harper avatar Oct 23 '24 16:10 Sam-Harper

+1

Size: This PR adds an extra 20KB to repository Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-59643c/42361/summary.html COMMIT: f84d16592e9bd035b9ae78ab612b3411585acf59 CMSSW: CMSSW_14_2_X_2024-10-23-1100/el8_amd64_gcc12 User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/46488/42361/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 3 lines to the logs
  • Reco comparison results: 12 differences found in the comparisons
  • DQMHistoTests: Total files compared: 46
  • DQMHistoTests: Total histograms compared: 3566331
  • DQMHistoTests: Total failures: 457
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3565854
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 45 files compared)
  • Checked 201 log files, 171 edm output root files, 46 DQM output files
  • TriggerResults: no differences found

cmsbuild avatar Oct 23 '24 19:10 cmsbuild

@Sam-Harper what's the status of this PR?

Martin-Grunewald avatar Oct 31 '24 14:10 Martin-Grunewald

As far as I'm concerned, its good to go

Work will be needed in the future. But its out of scope for this change (at that point its an upgrade to phaseII) and there is a warning to alert folks about it if it happens

Sam-Harper avatar Oct 31 '24 15:10 Sam-Harper

Thanks, Sam!

Martin-Grunewald avatar Oct 31 '24 15:10 Martin-Grunewald

+1

Martin-Grunewald avatar Oct 31 '24 15:10 Martin-Grunewald

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

cmsbuild avatar Oct 31 '24 15:10 cmsbuild

+1

mandrenguyen avatar Oct 31 '24 16:10 mandrenguyen