I'm trying to figure out how to copy a TTree from one TFile to another.
TFile::Copy doesn't seem to be implemented yet, and the following doesn't
seem to work either:
f1 = new TFile("f:/data/G2T076_076.root","update");
f1.Delete("traceback;*"); // deleting old TTree object
f2 = new TFile("f:/data/G2T076_076;1.root"); // file containing newest TTree
object
f1.cd();
TTree *traceback = (TTree *) f2.Get("traceback"); // retrieve updated TTree
object
traceback.Write(); // write to f1
f1.Write();
f1.Close();
Any suggestions?
William
deninger@uiuc.edu