Skip to content

[DF] Support for RHist with VariationsFor (on root master) - #22956

Merged
vepadulano merged 1 commit into
root-project:masterfrom
gpetruc:rhist_variationsfor
Aug 4, 2026
Merged

[DF] Support for RHist with VariationsFor (on root master)#22956
vepadulano merged 1 commit into
root-project:masterfrom
gpetruc:rhist_variationsfor

Conversation

@gpetruc

@gpetruc gpetruc commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Support for RHist with VariationsFor

Changes or fixes:

In order to allow VariationsFor on RHist, this PR does two things:

  • change the plain copy of the object with a call to a template function that I can specialise to use Clone() on RHist and RHistEngine that are non-copiable.
  • implements the MakeNew method for RHistFillHelper and RHistEngineFillHelper

Both changes are trivial, all the existing logic for VariationsFor, copying and filling RHists is unchanged.

To check that the code compiles and run, two unit tests are added, for RHistFillHelper and RHistEngineFillHelper.
No attempt is made of testing VariationsFor on all possible code paths (JIT vs compile time, 1D vs multi-D, weights vs no weights, etc.) because the code changes are agnostic to all that.

This PR is based on the current master, but I have also a branch on top of #22899 from @hahnjo : the two features are orthogonal, but some trivial merge conflicts are expected in the unit tests.

Checklist:

  • tested changes locally
  • tested with ctest -R gtest-tree-dataframe-dataframe-hist

This PR fixes #22954

@vepadulano vepadulano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! LGTM!

Comment thread tree/dataframe/inc/ROOT/RDFHelpers.hxx Outdated
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 17h 45m 57s ⏱️
 3 856 tests  3 855 ✅ 0 💤 1 ❌
78 544 runs  78 542 ✅ 1 💤 1 ❌

For more details on these failures, see this check.

Results for commit a24d2e6.

♻️ This comment has been updated with latest results.

@hahnjo hahnjo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, but I won't officially approve since it's only RDF code. We may want to document that a user-provided RHist / RHistEngine will end up being used for the nominal result, and the variations will start from fresh ones. Also one inline comment for a potential simplification.

Comment thread tree/dataframe/inc/ROOT/RDFHelpers.hxx Outdated
@vepadulano
vepadulano force-pushed the rhist_variationsfor branch from 0803f5a to a24d2e6 Compare August 3, 2026 11:06
@vepadulano
vepadulano merged commit 895dd77 into root-project:master Aug 4, 2026
32 of 34 checks passed
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.

[DF] Support for RHist with VariationsFor

3 participants