Re: TClonesArray and TTree

From: Axel Naumann <Axel.Naumann_at_cern.ch>
Date: Wed, 27 Jul 2011 19:22:30 +0200


Hi,

Your code snippet looks okay. Can we have working code that reproduces this problem, i.e. something we can run to see the crash you are referring to?

Cheers, Axel.

On 07/27/2011 07:17 PM, Vito Palladino wrote:
> Dear Rooters,
>
> I'm trying to store in a tree own objects that contains TConesArray. I
> followed the examples into the guide.
> My Event class has the member:
>
> WFM* Event::AddWFM(){
>
> TClonesArray &WFMs = *fWFMs;
> WFM* waveform = new(WFMs[Nwfms++]) WFM();
> return waveform;
>
> }
>
> It seems equal to the method used to fill the TClonesArray but when I
> try to use the class filling a TTree segmentation violation occurs.
>
> Where I'm wrong?!
>
> I'm using root 5.30/00.
>
> Thank you for you help
> Vito Palladino
Received on Wed Jul 27 2011 - 19:22:34 CEST

This archive was generated by hypermail 2.2.0 : Wed Jul 27 2011 - 23:50:01 CEST