-
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
Fix usage of deprecated methods returning TIterator (replace with range loops or begin/end) #43373
Conversation
please test for ROOT6_X |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43373/37851
|
A new Pull Request was created by @iarspider for master. It involves the following packages:
@cmsbuild, @tvami can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test for ROOT6_X |
please ping |
please test |
please test for CMSSW_14_0_ROOT6_X |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-928c2b/36035/summary.html Comparison SummarySummary:
|
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-928c2b/36036/summary.html Comparison SummarySummary:
|
+analysis
|
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) |
+1 |
TIterator* iter = dataVars.createIterator(); | ||
TObject* obj(nullptr); | ||
while ((obj = iter->Next())) | ||
for (TObject* obj : dataVars) |
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.
Thanks for these changes! This even fixed a memory leak of the TIterator
!
RooRealVar* sep_var = nullptr; | ||
while ((var = (RooAbsArg*)iter->Next())) { | ||
for (const auto& var : *Data->get()) { |
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.
And this also fixed a memory leak 🙂
PR description:
This PR fixes warnings observed in ROOT6_X IBs:1, 2:
PR validation:
Bot tests