Hi Thomas,
It should be possible to just do
tree->SetName("newname");
file->Write()
However the original tree meta-data will still be present on the disk
and I am not sure you can safely remove it.
An alternative is to create a friend tree.
new TTree("newname");
tree->AddFriend(oldtree);
file->Write();
Cheers,
Philippe.
-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Thomas Bretz
Sent: Thursday, March 04, 2004 3:47 AM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] Rename Tree
Dear all,
is it possible to rename a tree in an existing file?
Thanks,
Thomas.
#################################################################
#################################################################
#################################################################
#####
#####
#####
#################################################################
#################################################################
#################################################################
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET