Hi,
I’m trying to add entries to a tree:
{
gROOT->Reset();
TFile *oldfile = new TFile(“clasnt_049669_00.root”);
TTree oldtree = (TTree)oldfile->Get(“h10”);
TFile *newfile = new TFile(“out.root”,“update”);
TTree newtree = (TTree)newfile->Get(“h10”);
Int_t nentries = newtree->GetEntries();
cout << "nentries " << nentries <GetEntry(223);
newtree->Fill();
oldtree->Show(223);
newtree->Show(nentries);
oldtree->Delete();
newtree->Delete();
oldfile->Close();
newfile->Close();
delete newfile;
delete oldfile;
}
The GetEntry - Fill combination is how I initially created the “newtree”, but when I open the file with it and try to add new entries, it doesn’t seem to work. Could you, please, tell me what is wrong here.
Thank you.