Hi,
you can have a look to this very complete post: Operation: SetBranchAddress
In general, the way we suggest to read trees is via the TTreeReader:
root.cern/doc/master/hsimpleReader_8C.html
It has several advantages for example type safety and a more high level interface.
I hope this helps,
Danilo