You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[tree] Align behaviour of SetBranchStatus of TChain and TTree
When a user calls SetBranchStatus("*", false) it means that all branches of the
dataset should be deactivated, no matter what other method is called, except if
then the user calls SetBranchStatus(someBranch, true) to activate a branch.
So, if a user calls SetBranchStatus to deactivate all branches and then calls
SetBranchAddress, this should have no effect. No data should be read because the
branch related to SetBranchAddress should not have been activated.
Before this commit, TTree was respecting this rule, but TChain was not. This
commit ensures that TChain only sets the status of the branch of the current
TTree if the corresponding TChainElement was explicitly provided with a status
by the user.
Copy file name to clipboardExpand all lines: README/ReleaseNotes/v638/index.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,12 @@
8
8
## Core Libraries
9
9
* Behavior change: when selecting a template instantiation for a dictionary, all the template arguments have to be fully defined - the forward declarations are not enough any more. The error prompted by the dictionary generator will be `Warning: Unused class rule: MyTemplate<MyFwdDeclaredClass>`.
10
10
11
+
## I/O
12
+
13
+
### TTree
14
+
15
+
* Behaviour change: the behaviour of `TChain::SetBranchStatus` has been aligned to the one of `TTree::SetBranchStatus`. In particular, when `SetBranchStatus` is called to deactivate all branches, a subsequent call to `TChain::SetBranchAddress` would override the previous instruction and activate that single branch. Instead `TTree::SetBranchAddress` respects the rule imposed by `SetBranchStatus`. If a user needs to activate only one or more branches, they should call `SetBranchStatus("brName", true)` on each branch that needs to be active in the TChain, like it was already necessary for a TTree. See https://github.com/root-project/root/pull/19221 for more details.
0 commit comments