Re: [ROOT] append data to existing tree

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Dec 11 2002 - 09:48:30 MET


Hi Martin,

To add new output to an existing Tree, do:
 - open old file in "update" mode
 - Get the Tree from the file
     TTree *tree = (TTree*)f.Get("tree");
 - set tree branch address(es)
 - fill
 - tree->Write()
 - close file

Rene Brun

On Wed, 11 Dec 2002, Martin Brueckel wrote:

> Hallo all,
> 
> I have processed a data file and stored the output in a tree.
> Now I want to process more data and somehow append the root output to 
> the existing tree.
> How can that be done ?
> 
> Thanks,
> Martin
> 
> 
> 
> 
> 
> Martin Brueckel
> Institut fuer Experimentelle Kernphysik
> Universitaet Karlsruhe
> Tel.: 07247 / 82-3712
> mail: brueckel@iekp.fzk.de
> 
> 
> 
> 
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:23 MET