Problem with SetBranchAddress()

Dear all,

I have a simple TTree with a number of leaves in a branch, filled from a structure. If I read it while retriving a TBranch from the TTree and then setting the address to point to a structure object with TBranch::SetAddress(), the values retrieved are OK. If I do the same using TTree::SetBranchAddress() the values are wrong. I attach both the tree and a sample reading code. Please uncomment lines 40 and 41, and comment 43 to see the difference.

Am I doing something wrong?
test_tree.root (6.07 KB)
read_tree.C (801 Bytes)

t->SetMakeClass(1);

Thanks. Somehow I never needed to use it beforeā€¦