I’m trying to add branches to a copy of a tree using CloneTree(0), with an event loop and Fill.
It works well except for scalar branches (single integers, floats, etc.) that I read using SetBranchAddress from the original tree. The values of those branches get corrupted in the copied tree.
I wasn’t able to replicate this behavior in a simple small example though.
Any thoughts?
thanks,
Raz
EDIT: It took a while but with some help I realized if I change the branch address of the original tree I need to change it also for the copied tree.
[quote]EDIT: It took a while but with some help I realized if I change the branch address of the original tree I need to change it also for the copied tree.[/quote]Which way (SetBranchAddress or branch->SetAddress) did you use to set the addresses?