Hi Ole,
The syntax with eg, //[NChannels]
is only supported for pointers to basic types, not pointers
to classes.
Use a TObjArray instead.
Rene Brun
On Tue, 27 Aug 2002, Ole Streicher wrote:
> Hi!
>
> I have some problems to store a variable length array in a Root Tree.
>
> I have the following:
>
> class AdcChannelData: public TObject {
> private:
> int Channel;
> int Value;
> //...
> };
>
> class SubDetectorData: public TObject {
> private:
> int NChannels;
> AdcChannelData *Data; //[NChannels]
> //...
> };
>
> The program runs without errors, but I can't access the AdcChannelData
> of the array when I open the produced tree with root. The tree browser
> shows me Data as a variable, not as an array.
>
> What can I do?
>
> Ole
>
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:08 MET