[6.40] Dispatch GetMinum,GetMaximum calculations to friend when necessary - #23236
Merged
vepadulano merged 3 commits intoSep 3, 2026
Merged
Conversation
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)
pcanal
approved these changes
Sep 2, 2026
Test Results 20 files 20 suites 2d 21h 4m 47s ⏱️ For more details on these failures, see this check. Results for commit 8e7c03b. ♻️ This comment has been updated with latest results. |
vepadulano
merged commit Sep 3, 2026
97299ab
into
root-project:v6-40-00-patches
57 of 66 checks passed
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.
Backport of #22677, requested by @vepadulano.