I have a set of .root files, each containing a single tree. Each tree contains a single branch of a user-defined event type. One of the data members of the event is a TClonesArray* of tracks.
I have always used the hadd executable in root4 to merge these files successfully (thanks for the large file support, by the way!). However, when I try to merge the same files using v5.08, I run into a problem with the TClonesArray. hadd appears to work fine, but when I call TTree.GetEntry() for an event containing more than 7 tracks I get the message
Error in TBranchElement::ReadLeaves: Incorrect size read for the container in mPionCandidates
The size read is 8 while the maximum is 7
The size is reset to 0 for this entry (0)
where mPionCandidates is of type TClonesArray*. A few things I have noticed:
–I am able to analyze these events containing more than 7 tracks if I open the inidividual files without merging in v5.08.
–I am also able to analyze them if I merge the files using v4.04 and then read the resulting file using v5.08.
–merging the files using an haddDir.C script (a slightly modified hadd.C) in v5.08 is also successful.
–the maximum size available seems to be dependent on the maximum number of tracks in the first file that is merged
A selection of root files and the haddDir.C script should be accessible at
Thanks in advance,