Skip to content

Commit 5de0d99

Browse files
ferdymercurypcanal
andauthored
[tree] Copy adresses instead of resetting all
If we just reset the addresses of the clone, the address are now valid but the current tree and the clone are still separated. [As a side note calling ResetBranchAddresses actually does too much because it also reset branch address that are unrelated to the original, for example branches that have been added to the clone). Co-authored-by: Philippe Canal <[email protected]>
1 parent 39337e3 commit 5de0d99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tree/tree/src/TTree.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8262,7 +8262,7 @@ void TTree::ResetBranchAddresses()
82628262
for (TObjLink *lnk = GetListOfClones()->FirstLink(); lnk; lnk = lnk->Next()) {
82638263
TTree *clone = (TTree *)lnk->GetObject();
82648264
if (clone)
8265-
clone->ResetBranchAddresses();
8265+
CopyAddresses(clone);
82668266
}
82678267
}
82688268
}

0 commit comments

Comments
 (0)