RE: TClonesArray and TTree

From: Vito Palladino <Vito.Palladino_at_cern.ch>
Date: Wed, 27 Jul 2011 18:50:16 +0000

Thank you for your help,

my code is in my public folder:

/afs/cern.ch/user/v/vpalladi/public/RawDecoder

I do not think you will be able to run it but the command to execute is

./Decoder Dummy.raw Dummy.root

Vito Palladino



________________________________________
From: Axel Naumann
Sent: 27 July 2011 19:22
To: Vito Palladino
Cc: roottalk_at_root.cern.ch
Subject: Re: [ROOT] TClonesArray and TTree

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 - 20:50:22 CEST

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