// In the following, 'events' is a tree that is copied from 'b0.root' to the new file 'new.root' TFile f("b0.root") TFile g("new.root", "RECREATE") ((TTree*)f.Get("events"))->Write() g.Close();