Re: merging trees

From: Rene BRUN <brun_at_mail.cern.ch>
Date: Thu, 24 Feb 2005 21:22:04 +0100 (MET)


Use $ROOTSYS/bin/hadd to merge files containing Trees

  hadd result.root file1.root file2.root filen.root

Rene Brun

On Thu, 24 Feb 2005,
Zdenko van Kesteren wrote:

> Hi Rooters,
>
> I'm trying to merge TTrees using TChain::Merge() as follows:
>
>
> TChain* chain = new TChain("CBNT/t4444");
> chain->Add("subfile_1.root");
> chain->Add("subfile_2.root");
> chain->Merge("chainedFile.root");
>
> Then, if I look at chainedFile with a TBrowser it appears to have stored
> the tree in
> chainedFile.root/t4444
> rather than
> chainedFile.root/CBNT/t4444
>
> How can I merge trees without losing my directory-structure?
>
> Thanks, Zdenko van Kesteren
>
>
Received on Thu Feb 24 2005 - 21:22:08 MET

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