Re: allowed classes in a TClonesArray

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Thu Nov 27 1997 - 16:20:37 MET


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



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