Hello ROOTers,
the problem of 2-level TCloneArrays was discussed here already, but unfortunately I did not find a solution for my problem.
I have a user defined class TC containing a TClonesArray of user defined class TB, which contains another TClonesArray of user defined class TA.
When filling TC by TBs and TBs by TAs and reading the data again, I see that TBs (and their simple scalar variables) contain originally stored values. But the lowest level is strange: all TAs within one TB are the same.
I attach a simple running example, tested with ROOT 5.24
run.cxx - starts the example
Test2Class.cxx - the example itself, filling one TC with TBs and TCs and reading the data out again. They do not agree (last column)
Ttcl.cxx, Ttcl.h - definition of classes TA, TB and TC
Later it should be possible to store these classes in a TFile and in a TTree.
What do I do wrong?
Thanks for any help!
TClonessArray2level.zip (1.78 KB)