Re: Fixed Size Array of (TClonesArray *) in a TTree

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Mar 29 1999 - 17:49:46 MEST


Olivier,
I suggest you build a TList of TClonesArray to be more general.
You can then loop on the TList to create a branch for each
TClonesArray.
There is an example in the ATLFast package.

Rene Brun

On Mon, 29 Mar 1999, Olivier Dormond wrote:

> Hi Rooters,
> 
>   How can I manage to have a fixed size Array of (TClonesArray *) in a
> TTree being written correctly to disk ? It is able to write up to ~50
> events containing 2 (TClonesArray *)[7] and than it does a segfault.
> If I stop at, say, 20 events it writes the file out to disk but than
> accessing the TTree within root produces an
> 
>  "Error in <TList::AddLast>: argument is a null pointer"
> 
> and than segfaulting.
> 
> Cheers,
> 
> 		Odie
> 
> P.S. I DON'T want to have 14 ugly (TClonesArray *) instead of my to
> arrays!
> 
> -- 
> +----------------------------------------------------------------------+
> | Olivier Dormond                 EMail : Olivier.Dormond@iphe.unil.ch |
> | IPHE - BSP - UNIL               WWW   : iphedec2.unil.ch/~odie       |
> | CH-1015 Dorigny                 Phone : (++41 21) 692 3739           |
> | Switzerland                     Fax   : (++41 21) 692 3605           |
> +----------------------------------------------------------------------+
> 



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