Skip to content

[6.40] Dispatch GetMinum,GetMaximum calculations to friend when necessary - #23236

Merged
vepadulano merged 3 commits into
root-project:v6-40-00-patchesfrom
root-project-bot:BP_6.40_pull_22677
Sep 3, 2026
Merged

[6.40] Dispatch GetMinum,GetMaximum calculations to friend when necessary#23236
vepadulano merged 3 commits into
root-project:v6-40-00-patchesfrom
root-project-bot:BP_6.40_pull_22677

Conversation

@root-project-bot

Copy link
Copy Markdown

Backport of #22677, requested by @vepadulano.

vepadulano and others added 3 commits September 2, 2026 16:00
This commit introduces testing for GetMinimum,GetMaximum in case the requested column belongs to a friend tree.

Two tests are taken directly from the reproducer reported by a user at https://root-forum.cern.ch/t/ttree-getminimum-getmaximum-only-scan-one-file-of-a-friend-tchain/64905

A third test exercises in particular the correct updating of the branch addresses of the friend TChain when it switches to another file even though the main TChain is still traversing the same file.

(cherry picked from commit f986ef3)
Implement a similar strategy to what was done for GetBranch in
root-project@30860f3
.

This commit introduces non-functional changes, but a better code organization.

This commit also introduces a description of the search order of
TTree::GetLeaf(const char* branchname, const char *leafname) in its
documentation.

(cherry picked from commit 7f28afb)
…ombinations

The processing logic for the methods is factorised out into an internal helper
method. TChain does not override the methods anymore, the whole implementation
is in TTree.

The methods take into account the following situations:

* The dataset is a TTree and contains the input column
* The dataset is a TChain and contains the input column, in which case the methods detect file switching and update the leaf pointer correctly.
* The dataset is a TChain, contains the input column, but some files miss it, in which case the methods skip the entries from those files.
* The dataset has a friend TTree which contains the input column
* The dataset is a TChain and has a friend TChain which contains the input column, in which case the methods detect file switching on the friend and update the leaf pointer correctly.
* The dataset is a TChain and has a friend TChain. The input column is partially available in either the main or the friend chain. This can happen for example if the main chain has some files missing the input column and the user knowingly injects the input column in the files of the friend chain. In this case, the methods detect file switching at the boundary between files of the main chain, but also detect if there are file switches in the friend chain. Notably, the entries must still be overall aligned between the main chain and the friend one.

Co-authored-by: Philippe Canal <pcanal@fnal.gov>
(cherry picked from commit 8dee834)
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Test Results

    20 files      20 suites   2d 21h 4m 47s ⏱️
 3 862 tests  3 828 ✅ 0 💤 34 ❌
69 758 runs  69 724 ✅ 0 💤 34 ❌

For more details on these failures, see this check.

Results for commit 8e7c03b.

♻️ This comment has been updated with latest results.

@vepadulano
vepadulano merged commit 97299ab into root-project:v6-40-00-patches Sep 3, 2026
57 of 66 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.

4 participants