Dispatch GetMinum,GetMaximum calculations to friend when necessary - #22677
Merged
Conversation
vepadulano
force-pushed
the
gh-22652
branch
2 times, most recently
from
June 22, 2026 09:57
1bd9d16 to
9990ddf
Compare
Test Results 18 files 18 suites 2d 20h 54m 58s ⏱️ For more details on these failures, see this check. Results for commit cc4a87a. ♻️ This comment has been updated with latest results. |
dpiparo
self-requested a review
June 27, 2026 10:22
dpiparo
approved these changes
Jun 27, 2026
pcanal
reviewed
Aug 25, 2026
pcanal
reviewed
Aug 25, 2026
pcanal
reviewed
Aug 25, 2026
pcanal
reviewed
Aug 25, 2026
pcanal
reviewed
Aug 31, 2026
pcanal
reviewed
Aug 31, 2026
pcanal
reviewed
Aug 31, 2026
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.
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.
…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>
Member
Author
|
/backport to 6.40 |
|
Preparing to backport PR #22677 to branch 6.40 requested by vepadulano |
|
This PR has been backported to branch 6.40: #23236 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #22652