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
Hide testing functions within appropriate CPP macros #24311
Hide testing functions within appropriate CPP macros #24311
Conversation
Functions which are only used during debugging were being reported by a clang warning as unused. Moving them into the same CPP macros as their calling code makes them only available if they will be called.
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-24311/6051 |
A new Pull Request was created by @Dr15Jones (Chris Jones) for master. It involves the following packages: DataFormats/TrackerRecHit2D @perrotta, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
The tests are being triggered in jenkins. |
@@ -6,6 +6,7 @@ | |||
|
|||
|
|||
namespace { | |||
#ifdef EDM_LM_DEBUG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be EDM_ML_DEBUG
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the same as the CPP macro name used later in the file:
https://github.com/cms-sw/cmssw/blob/master/DataFormats/TrackerRecHit2D/src/BaseTrackerRecHit.cc#L23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this and DataFormats/TrackerRecHit2D/interface/BaseTrackerRecHit.h should have a change to EDM_ML_DEBUG. This appears to be a typo.
About wrapping this solely into just EDM_ML_DEBUG
, I note the commented out calls to throwExceptionUninitialized
which are perhaps also needed for other non-EDM_ML_DEBUG
debugging.
Similar to TrackerSingleRecHit.cc, I'd like to suggest a flag (e.g. DO_THROW_UNITITIALIZED
) and put the currently commented out calls in e.g. getKfComponents1D
behind that flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did the switch. It also involved changing the header to at least try to keep things consistent.
NOTE: the original code already had problems with 'one definition rule'.
-1 Tested at: eae351c You can see the results of the tests here: I found follow errors while testing this PR Failed tests: AddOn
I found errors in the following addon tests: cmsDriver.py TTbar_13TeV_TuneCUETP8M1_cfi --conditions auto:run2_mc_l1stage1 --fast -n 100 --eventcontent AODSIM,DQM --relval 100000,1000 -s GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid,L1,DIGI2RAW,L1Reco,RECO,EI,VALIDATION --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --datatier GEN-SIM-DIGI-RECO,DQMIO --beamspot NominalCollision2015 --era Run2_25ns : FAILED - time: date Wed Aug 15 23:04:10 2018-date Wed Aug 15 22:58:53 2018 s - exit: 35584 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
please test |
The tests are being triggered in jenkins. |
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-24311/6098 |
The handling of previously commented versus macro enabled is now done via two different macros. |
please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
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. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
Functions which are only used during debugging were being reported
by a clang warning as unused. Moving them into the same CPP macros
as their calling code makes them only available if they will be
called.