(1) Run the following code:
tree_in = TFile.Open("InputFile.root","read").Get("InputTree")
file_out = TFile.Open("OutputFile.root","RECREATE")
tree_in.CopyTree("").Write("NewName")
file_out.Close()
(2) You will see the “InputTree” in the outputfile with a totally random number of entries. The “NewName” tree has the correct number of entries which equals to tree_in.
Is that a bug or feature?