Skip to content

[hist] Implement RHistStats::Taint() and RHist{,Engine}::SetBinContent#21355

Open
hahnjo wants to merge 5 commits intoroot-project:masterfrom
hahnjo:hist-set-taint
Open

[hist] Implement RHistStats::Taint() and RHist{,Engine}::SetBinContent#21355
hahnjo wants to merge 5 commits intoroot-project:masterfrom
hahnjo:hist-set-taint

Conversation

@hahnjo
Copy link
Member

@hahnjo hahnjo commented Feb 23, 2026

As discussed during the last PPP, calling RHist::SetBinContent will taint the global histogram statistics.

@hahnjo hahnjo self-assigned this Feb 23, 2026
@hahnjo hahnjo added the in:Hist label Feb 23, 2026
@github-actions
Copy link

github-actions bot commented Feb 23, 2026

Test Results

    21 files      21 suites   3d 4h 55m 4s ⏱️
 3 834 tests  3 833 ✅ 1 💤 0 ❌
72 851 runs  72 842 ✅ 9 💤 0 ❌

Results for commit 3b2319e.

♻️ This comment has been updated with latest results.

@hahnjo
Copy link
Member Author

hahnjo commented Mar 16, 2026

gentle ping :-)

hahnjo added 5 commits March 18, 2026 08:58
If a dimension is disabled, it should not be possible to retrieve its
quantities.
This will be used to taint the global statistics before the user
modifies bin contents explicitly.
The implementation choice is to allow modifications without extra
checks / performance penalty, and throw on read access.
This needs one indirection to construct the std::array of indices
with the right (number of) elements.
Also remove Internal::SetBinContent that is not needed anymore.
It will taint the histogram statistics.
Copy link
Contributor

@jblomer jblomer left a comment

Choose a reason for hiding this comment

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

LGTM

double fSumW2 = 0.0;
/// The sums per dimension
std::vector<RDimensionStats> fDimensionStats;
/// Whether this object is tainted
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe expand a bit: what tainting means and when it happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants