TObject with ariable size aray.

From: Alexander Zvyagin (zvyagin@mx.ihep.su)
Date: Mon Feb 02 1998 - 04:12:38 MET


                                           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.



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:29 MET