I try to add trees in many files together. Here I do:
TChain *tree=new TChain("MyTree");
When I loop entries in the added tree to do something, my code always crashed at the end of the first file. It seems the left trees cannot be added together. All the root files have the same structure. I don’t know why the code always crashed at the end of the first file (maybe at the beginning of the 2nd file).
Sorry for my unclear question above.
In order to re-produce my problem, I change my question. I try to merge some root files together. I use:
TChain *tree=new TChain("RjetTree");
ROOT version: v4_04_02b_v2_eh
RjetTree-aj.root (42.2 KB)
You seem to have an inconsistency in your file. When I execute your statements to merge the two copies of the same file, I get a complaint
I would need the class to make progress.
I think that you should check what you are doing with somebody from D0
Jeroen Hegeman has given me a test case (thanks, Jeroen!), which does work for ROOT’s current CVS version, but not for D0’s v4_04_02b_v2_eh-GCC_3_4_3-opt. So whatever it was - it got fixed.