TObject with ariable size aray.

Alexander Zvyagin (zvyagin@mx.ihep.su)
Mon, 02 Feb 1998 12:09:18 GMT+03:00


IHEP, Protvino, Russia, 2-FEB-1998

I'd like to create TTree of EVENTs in a root-file.
Each EVENT should has subobject of variable size array of basic type
(Short_t, for example). Something like this:

class EVENT : public TObject
{
public:
// ...
UInt_t var_length; // length of the array var.
Short_t *var; // pointer to the array.
// ...
};

Sure, this is incorrect. What is correct and elegant method to do such thing?

I have tryed to change member function Streamer, but it looked like ROOT
did not use my Streamer function.

Thanks in advance,
Alexander Zvyagin.