Re: Copy branch/leaf

From: Hovhannes Khandanyan <khandan_at_cern.ch>
Date: Fri, 18 Feb 2011 16:11:46 +0100


Dear Marcello,

This could be an elegant solution, although I have no experience with using TEventList/TEntryList created by one tree and used for another.

Thanks,
Hovhannes

On Feb 18, 2011, at 3:56 PM, Marcelo Zimbres wrote:

> Dear Hovhannes,
>
> > I have a large analysis NTuple out of which I create a light-weight one which stored eg parameter flagging good events ...
>
> wouldn't it be enough to store good entries in an TEventList or TEntryList?
>
> Cheers,
> Marcelo
>
>
>
> 2011/2/18 Hovhannes Khandanyan <khandan_at_cern.ch>
> Hi Pilippe,
>
>
> >> What I need is to copy branch1.leaf1 from Tree2 to Tree1.
> >
> > Why? What you goal/aim?
>
> I have a large analysis NTuple out of which I create a light-weight one which stored eg parameter flagging good events. What I need is to be able to use this flag to look into parameters stored in the original ntuple.
>
>
> >
> > 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);
>
> This is exactly what I needed.
>
> Thanks,
> Hovhannes
>
>
> >
> > 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 - 16:11:50 CET

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