Skip to content

Comments

[hist] Prepare for explicit object ownership model#21296

Merged
hageboeck merged 4 commits intoroot-project:masterfrom
hageboeck:root7-ownership-15
Feb 19, 2026
Merged

[hist] Prepare for explicit object ownership model#21296
hageboeck merged 4 commits intoroot-project:masterfrom
hageboeck:root7-ownership-15

Conversation

@hageboeck
Copy link
Member

  • Ensure correct cleanup for members of a THStack
  • Move FitSlices / Project to explicit registration
  • Extend TH1::AddDirectoryStatus() to TEfficiency

When histograms get added to a THStack, they are likely in multiple
TLists. Therefore, the kMustCleanup bit must be set.
In the past, the bit usually got set automatically when histograms added
themselves to directories, but when this is disabled, the cleanup bit
remained unset.
The function documentation explicitly states that the histograms created
by these operations are added to the current directory, so this is done
explicitly here.
This makes the code independent of whether implicit ownership is on or
off.
@hageboeck hageboeck self-assigned this Feb 17, 2026
This makes TEfficiency consistent with other histogram-like classes, in
the sense that it only adds itself to a directory if the corresponding
flags are on.
Copy link
Contributor

@martamaja10 martamaja10 left a comment

Choose a reason for hiding this comment

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

LGTM!

@github-actions
Copy link

Test Results

    22 files      22 suites   3d 16h 59m 5s ⏱️
 3 794 tests  3 794 ✅ 0 💤 0 ❌
75 411 runs  75 411 ✅ 0 💤 0 ❌

Results for commit 1905003.

@hageboeck hageboeck merged commit 6168513 into root-project:master Feb 19, 2026
30 checks passed
@hageboeck hageboeck deleted the root7-ownership-15 branch February 19, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants