Skip to content

Conversation

@gabrielmscampos
Copy link
Member

@gabrielmscampos gabrielmscampos commented Dec 9, 2025

Retrieve FitSlicesY's results from TObjArray instead of current gDirectory.

PR description:

Resolves DQM's part in #49543 by removing TH1::AddDirectory and refactoring the code to retrieve histograms from a TObjArray.

PR validation:

cmsRun -j JobReport4.xml step4_HARVESTING.py

Retrieve FitSlicesY's results from TObjArray instead of current
gDirectory.
@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 9, 2025

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 9, 2025

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 9, 2025

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

It involves the following packages:

  • DQMServices/Components (dqm)

@cmsbuild, @ctarricone, @gabrielmscampos, @nothingface0, @rseidita can you please review it and eventually sign? Thanks.
@barvic this is something you requested to watch as well.
@ftenchini, @mandrenguyen, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@gabrielmscampos
Copy link
Member Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 9, 2025

-1

Failed Tests: RelVals
Size: This PR adds an extra 28KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5fb5c5/49852/summary.html
COMMIT: 9eef0a9
CMSSW: CMSSW_16_0_X_2025-12-08-2300/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/49575/49852/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5fb5c5/49852/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5fb5c5/49852/git-merge-result

DAS Queries: The DAS query tests failed, see the summary page for details.

Failed RelVals

  • 135.4A fatal system signal has occurred: segmentation violation
  • 2025.0000001A fatal system signal has occurred: segmentation violation
  • 34434.75A fatal system signal has occurred: segmentation violation
Expand to see more relval errors ...

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 9, 2025

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 9, 2025

Pull request #49575 was updated. @cmsbuild, @ctarricone, @gabrielmscampos, @nothingface0, @rseidita can you please check and sign again.

@gabrielmscampos
Copy link
Member Author

please test

TH1* h2;
TH1* h3;

TH1* fetchSlice(TObjArray& arr, const std::string& name) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to leak memory. Might I suggest

Suggested change
TH1* fetchSlice(TObjArray& arr, const std::string& name) {
std::unique_ptr<TH1> fetchSlice(TObjArray& arr, const std::string& name) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Dr15Jones, yes, I can implement your suggestion. May I ask why the first can lead to memory leak? Since it returns a raw pointer, the caller is responsible for deleting it (that is where I see the memory leak possibility), and in this case that deletion happens in the class destructor.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had not looked at the scope for the variables being used. As CMS convention is to use m_' prefix or a _ suffix for member data names I assumed these were local variables. So it sounds like it isn't a memory leak. Might I suggest changing those member variables to be std::unique_ptr<> anyway and having the function still return std::unique_ptr?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Done. I also took the opportunity to add the _ suffix to the member data names.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Pull request #49575 was updated. @cmsbuild, @ctarricone, @gabrielmscampos, @nothingface0, @rseidita can you please check and sign again.

@gabrielmscampos
Copy link
Member Author

please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 28KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5fb5c5/49874/summary.html
COMMIT: 17086f1
CMSSW: CMSSW_16_0_X_2025-12-09-2300/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/49575/49874/install.sh to create a dev area with all the needed externals and cmssw changes.

DAS Queries: The DAS query tests failed, see the summary page for details.

Comparison Summary

Summary:

  • You potentially added 2 lines to the logs
  • Reco comparison results: 6 differences found in the comparisons
  • Reco comparison had 4 failed jobs
  • DQMHistoTests: Total files compared: 53
  • DQMHistoTests: Total histograms compared: 4273241
  • DQMHistoTests: Total failures: 97
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 4273124
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 52 files compared)
  • Checked 227 log files, 198 edm output root files, 53 DQM output files
  • TriggerResults: no differences found

@nothingface0
Copy link
Contributor

+dqm

@cmsbuild
Copy link
Contributor

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

@mandrenguyen
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 6bc7125 into cms-sw:master Dec 15, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants