Re: allowed classes in a TClonesArray

Fons Rademakers (Fons.Rademakers@cern.ch)
Thu, 27 Nov 1997 16:20:37 +0100


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