Re: Copy branch/leaf

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Fri, 18 Feb 2011 06:37:37 -0600


> What I need is to copy branch1.leaf1 from Tree2 to Tree1.

Why? What you goal/aim?

To associate 2 TTree with related information, we recommend using the TTree Friend concept.

I.e. the simple way to achieve some similar to what you want is:

    Tree1->AddFriend(Tree2);

Cheers,
Philippe.

On 2/15/11 9:23 AM, Hovhannes Khandanyan wrote:
> Dear ROOTers,
>
> I have 2 trees that were created from the same data file i.e both tress contain the exact same number of events.:
>
> Tree1 - leaf1, leaf2, ...
>
> Tree2 - branch1.leaf1, branch1.leaf2..., branch2.leaf1....
>
> What I need is to copy branch1.leaf1 from Tree2 to Tree1. Please let em know if this is doable and if so where I can find reference/example code.
>
> Thank you,
> Hovhannes
>
Received on Fri Feb 18 2011 - 13:37:44 CET

This archive was generated by hypermail 2.2.0 : Fri Feb 18 2011 - 17:50:01 CET