Re: Access to data in Trees

Nicolo de Groot (nicolo@SLAC.stanford.edu)
Mon, 02 Mar 1998 23:12:02 -0800 (PST)


On Tue, 3 Mar 1998, Norbert Danneberg wrote:

> Hi,
>
> how can I access individual datas in a tree which was converted form a
> paw ntuple ? Lets say the name of one ntuple variable is "energy" and I
> want to know the value of "energy" for the i-th ntuple.
>
>
> Thanks, Norbert
>
Suppose your ntuple ID was 10, the tree will be h10
Use h10.MakeCode() to generate a macro that will give you access to
all your variables. The energy will be "Energy" and inside the loop
you can just access it with:

m = Energy / ( c * c );
>
>
Nicolo