Write branch data to array

Hi Rooters,

Apologies for this very basic question, but I seem to be stuck on it.

I generate a root tree by storing arrays of floats (for example, hit energy) in branches of a tree. Each branch has a single array.

I can generate histograms of each branch with no problem, but I also need direct access to the data. How do I write the data, either directly from the branch or after filling a histogram, to an array?

Many thanks in advance,


Check the User’s Guide (and other post in this forums). You can use TLeaf::GetValue or TTree::GetV1 or use the result of MakeSelector or MakeProxy,


Thanks Phillipe, GetV1() did the trick.