Re: Consolidating different TTrees into one

From: Axel Naumann <Axel.Naumann_at_cern.ch>
Date: Tue, 2 Nov 2010 11:44:45 +0100


Hi,

you could create a new tree with one branch: the weight for each event. Then you add that as friend to the original trees, and you merge the trees. See $ROOTSYS/tutorials/copytree*.C for the latter.

Cheers, Axel.

Suvayu Ali wrote on 11/02/2010 10:49 AM:
> Hi ROOTers,
>
> I'm in bit of a predicament. I have several different TNtuples in a ROOT
> file with the exact same branches but different number of events. I want
> to add all these TNtuples into one consolidated TNtuple with a different
> weight for each TNtuple.
>
> At first I thought of friending them but then I realised that won't
> work, as that will treat those "identical" branches as different
> branches. Is their any way do this other than an event by event copy?
> Even if I go with that, how do I use weights?
>
> Any clues would be helpful. Thanks in advance for your thoughts.
>
Received on Tue Nov 02 2010 - 11:44:55 CET

This archive was generated by hypermail 2.2.0 : Tue Nov 02 2010 - 11:50:01 CET