-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Copy link
Labels
Milestone
Description
Check duplicate issues.
- Checked for duplicates
Description
As discovered in https://root-forum.cern.ch/t/possible-issue-when-cloning-trees/63873/15, neither TChain::ResetBranchAddresses
nor TTree::ResetBranchAddresses
seems to reset the address of their current list of clones.
Reproducer
In pseudo code.
auto newtree = chain->CloneTree(0);
chain->SetBranchAddress(branchname, &ptr);
chain->ResetBranchAdress();
assert( chain->GetBranch(branchname)->GetAddress() == newtree->GetBranch(branchname)->GetAddress() );
The current code will fail the assert and 'worse' we have newtree->GetBranch(branchname)->GetAddress() == &ptr
ROOT version
master, v6.36, v6.32
Installation method
any
Operating system
any
Additional context
No response