[ROOT] Splitting a pointer to a TObject

From: Carlos Muņoz Camacho (cmunoz@clipper.ens.fr)
Date: Thu Mar 06 2003 - 22:25:27 MET


Hi,

   Consider a class TEvent containing a pointer to an object
TDetectorAEvent, which contains itself TClonesArrays and some other
objects. Everything inherit from TObject. If we write a tree with a TEvent
in a branch and set maximum splitting, TDetectorAEvent will not split
because it is not an object itself but a pointer (and even if it is an
object only splits one level). This behaviour is documented. Only pointers
to TClonesArray work. The workarounds I can think of are:

1.- Manual splitting of TEvent, which may be extremely tedious if TEvent
contains many data members.

2.- Remove the pointer to the object and use an object itself. This allows
at least one level of splitting, but having objects themselves and not
pointers does not allow dynamic allocation.

Are there any other, more interesting, solutions ? Will splitting of
pointers to TObjects be supported in a near future ? Thanks!

ROOT 3.03/08 in RedHat 7.2

Carlos Muņoz
SPhN/CEA-Saclay



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET