Re: allowed classes in a TClonesArray

Manuel Sanchez Garcia (manuel@fpddux.usc.es)
Thu, 27 Nov 1997 18:33:36 +0100 (MET)


Hi Rooters,

I am new with Root and maybe this is a naive question:

Can i store objects containing a TClonesArray into another
TClonesArray.

I have tried to do that and put the information in Tree with
split=1 and write it to a file. When i try to read the file the
ClonesArrays aren't recovered.

After i changed my TClonesArray to TList and everything was Ok.

Thanks in advance, Manuel.

On Thu, 27 Nov 1997, Fons Rademakers wrote:

> Hi Jobst,
>
> you can only store TObject derived classes in TClonesArrays.
> This does not break the principle that classes should behave like
> builtin types, since builtin type don't have to be accepted as
> argument everywhere. In the case of basic types use the TArrayX
> classes.
>
> Cheers, Fons.
>
>
> Jobst Heinrich Koehne wrote:
> >
> > Dear Fons and Rene,
> >
> > look at this innocent statement:
> > gHdbd = new TClonesArray("ULong_t",100);
> > at runtime one gets:
> > Error in <TClonesArray::TClonesArray>: ULong_t is not a valid class name
> >
> > Why is ULong_t not an allowed class for the TClonesArray?
> > This contradicts the paradigm that classes should behave like built in
> > types somehow. Is it that it would have to inherit from TObject ?
> >
> > ahoi
> > Jobst
> > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> > Jobst Heinrich Koehne
> > MPI fuer Physik Muenchen
> > c/o DESY FH1
> > H1 collaboration
> > e-mail: kohne@desy.de
> > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>
> --
> Org: CERN, European Laboratory for Particle Physics.
> Mail: 1211 Geneve 23, Switzerland Phone: +41 22 7679248
> E-Mail: Fons.Rademakers@cern.ch Fax: +41 22 7677910
>