TRefArray
An array of references to TObjects. The array expands automatically
when objects are added (shrinking can be done by hand using Expand()
The TRefArray can be filled with:
array.Add(obj)
array.AddAt(obj,i)
but not array[i] = obj !!!
The array elements can be retrieved with:
TObject *obj = array.At(i);
When a TRefArray is Streamed, only the pointer unique id is written,
not the referenced object. TRefArray may be assigned to different
branches of one Tree or several Trees.
The branch containing the TRefArray can be read before or after the
array (eg TClonesArray, STL vector,..) of the referenced objects.
See an example in $ROOTSYS/test/Event.h
RESTRICTIONS when using TRefArray
---------------------------------
- Elements in a TRefArray cannot point to a TFile or TDirectory.
- All elements of a TRefArray must be set in the same process,
In particular, one cannot modify some elements of the array in
a different process.
Use an array of TRef when one of the above restrictions is met.