Re: Using SetBranchAddress when all branches are leaves.

From: Rene BRUN <brun_at_mail.cern.ch>
Date: Wed, 9 Feb 2005 22:47:07 +0100 (MET)


Brett,

Use the code generated by TTree::MakeClass as an example to fill your structure.
One could also imagine a small utility using the struct/class dictionary and looping on all members to set the address for all branches with similar names in the tree.

Rene Brun

On Wed, 9
Feb 2005, Brett Viren wrote:

> Hi,
>
> I have an hbook CWN converted to root with h2root. The result has no
> main branches, that is, each variable in the ntuple is a top level
> branch.
>
> I also have a struct which has data memebers coresponding to all the
> variables from the CWN. I'd like to create an instance of this struct
> and use that with SetBranchAddress() like in the Event example in the
> user manual.
>
> However, since all variables are in their same branch, this seems
> impossible. Do I miss something?
>
> Thanks,
> -Brett.
>
Received on Wed Feb 09 2005 - 22:47:12 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:04 MET