-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Modify L1TGlobal menu code and CondFormats to remove reinterpret_cast to and from utm firmware "es" types #41036
Conversation
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41036/34572
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41036/34573
|
A new Pull Request was created by @aloeliger (Andrew Loeliger) for master. It involves the following packages:
@epalencia, @cmsbuild, @saumyaphor4252, @aloeliger, @francescobrivio, @cecilecaillol, @tvami can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
@aloeliger n.b. duplicating Update: I just noticed these functions rely on es* classes, so then there is no way around it seems... |
@arnobaer Yeah, that's the conclusion I came to unfortunately. Perhaps in the future we should discuss the addition of member setters in the respective |
@aloeliger the duplicated functions are not up to date with the current utm_0.11.x release. This might result in differnt behaviour of the emulator. See https://gitlab.cern.ch/cms-l1t-utm/utm/-/blob/utm_0.11.1/tmEventSetup/tmEventSetup.cc |
-1 Failed Tests: Build BuildI found compilation error when building: In file included from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_13_1_X_2023-03-10-2300/src/CondFormats/L1TObjects/interface/L1TUtmScale.h:13, from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_13_1_X_2023-03-10-2300/src/CondFormats/L1TObjects/interface/L1TUtmTriggerMenu.h:14, from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_13_1_X_2023-03-10-2300/src/L1Trigger/L1TGlobal/interface/L1TGlobalUtil.h:12, from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_13_1_X_2023-03-10-2300/src/DQM/CastorMonitor/interface/CastorMonitorModule.h:17, from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_13_1_X_2023-03-10-2300/src/DQM/CastorMonitor/src/CastorMonitorModule.cc:6: /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_13_1_X_2023-03-10-2300/src/CondFormats/L1TObjects/interface/L1TUtmBin.h:15:10: fatal error: tmEventSetup/esBin.hh: No such file or directory 15 | #include "tmEventSetup/esBin.hh" | ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_13_1_X_2023-03-10-2300/src/CondFormats/L1TObjects/interface/L1TUtmScale.h:13, from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_13_1_X_2023-03-10-2300/src/CondFormats/L1TObjects/interface/L1TUtmTriggerMenu.h:14, |
@arnobaer Okay. I'll take a look at it when I fix the compilation error. Strange that that's happening, it compiles when I try it. |
looks like https://github.com/cms-sw/cmssw/blob/master/DQM/CastorMonitor/interface/CastorMonitorModule.h#L17 ( |
Right, I always forget about that command. Thank you. |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7f8219/31495/summary.html Comparison SummarySummary:
|
+l1 I don't know if I should be signing my own PRs, but it passes all menu unit tests, and no difference in trigger results is seen. |
@cms-sw/dqm-l2 do you have any comments? |
+1 |
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. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
#include "tmEventSetup/esObject.hh" | ||
#include "tmEventSetup/esCut.hh" | ||
#include "tmEventSetup/esScale.hh" | ||
#include "tmEventSetup/esTypes.hh" |
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.
Is this include needed?
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.
@perrotta I believe so, there are a number of enum
types used in the code that I didn't want to change: https://gitlab.cern.ch/cms-l1t-utm/utm/-/blob/master/tmEventSetup/include/utm/tmEventSetup/esTypes.hh
+1 |
Hello @aloeliger, Cheers, |
@elfontan nothing in here should be necessary for data-taking and back-porting, this is just a fix going forward. If, for whatever reason, the undefined utm behavior breaks in production, we could back-port this. It shouldn't be necessary though. It can work on all utm versions v0.11.2 and forward. |
PR description:
This PR changes L1TGlobal code and CondFormats to remove three instances of
reinterpret_cast
(one inL1TUtmTriggerMenuESProducer
, and two inTriggerMenuParser
) that were attempting to reinterpret pointers of utm Trigger Menu code/objects to CMSSWL1TUtm
objects (with undefined behavior). To achieve this, constructors were added to equivalentL1TUtm
objects that can accept firmwareutm/es
objects and create exact (or at the least, more defined) copies by copying values. TheseL1TUtm
objects should now be used with preference in CMSSW and across L1TGlobal code.This code should not produce any change in global trigger results. Any change in trigger results is incorrect and should not be merged.
These changes were requested in review of cms-sw/cmsdist#8352 and may address an issue seen in the testing of that PR. Regardless of whether it fixes that issue, these changes were requested.
These changes should in theory close #30819
@elfontan I figured you might like to be kept apprised of these changes.
PR validation:
All code compiles, and passes all unit tests, with special attention paid to the
testL1TGlobalProducer
, which produces identical results. Run the matrix seems to produce reasonable output. I have also confirmed (using print statements) that the now copied-by-valueL1TUtmTriggerMenu
members should be entirely identical to theL1TUtmTriggerMenu
produced previously byreinterpret_cast
If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:
This PR is not a backport. This PR may need to be backported to 13_0 to match the corresponding utm firmware update backport, if this PR solves the issue seen in cms-sw/cmsdist#8352. @epalencia may be able to clarify if that is necessary.