Re: [ROOT] append to TNtuple

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Dec 08 2004 - 14:44:57 MET


yes, it is possible to append new entries to a Tree. Do:

TFile *f = new TFile("myfile.root","update");
TTree *T = (TTree*)f->Get("mytree");
T->SetBranchAddress(....) //one for each top level branch
loop on
T->Fill();

T->Write();

Rene Brun

Balint Radics wrote:
> 
> Hello,
> 
> My question is: Is it possible to append new data columns to an TNtuple
> after I wrote it to a root file? I mean I would "UPDATE" the root file and
> add a plus column to my existing ntuple. Is this possible? How?
> 
> Thanx,
> 
> Balint



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:10 MET