Hi all,
I am seeing the same behavior as reported in this thread,
root.cern.ch/root/roottalk/roottalk03/1792.html
i.e. the error message ’ Error reading Trees from a Chain ’
The solution in this thread, by Rene, was to create the TFile to write and then create the tree/chain you want to write:
-create the output file z
-create the Tree red
-loop on entries of the input Tree
-red->Fill(); as you do now
-red->Write();
The problem is, in this way, there is also a tree (which is my original tree, not the one I made after looping over the original and selecting only few entries) in the file. How do I prevent the original tree from being written into the file I create?
I can prevent this creation of the old tree if I do it in the order
-create the Tree red
-loop on entries of the input Tree
-red->Fill(); as you do now
-create the output file z
-red->Write();
but then I get the error I reported.
Any ideas?
Regards
Fatima Soomro