Re: TTrees and TClonesArray

From: Rene Brun <brun_at_pcroot.cern.ch>
Date: Fri, 10 Jun 2005 12:41:14 +0200 (MEST)


Alberto,

I suggest to look at our standard example using a TClonesArray in the $ROOTSYS/test/Event.h,cxx file and the calling program MainEvent.

In case you already looked at it, please send the shortest possible RUNNING system illustrating your problem.

Rene Brun

On
Thu, 9
Jun 2005, Alberto Pulvirenti wrote:

> Dear all,
>
> I have tries in many ways to define a TTree branch of the type TClonesArray,
> because I nees to fill each branch with a different number of entries
> (specifically, each TTree entry must be an event, and the branch is a
> TClonesArray containing all tracks in the event).
> I compiled a shared library with a unique class which I made inherit from
> TObject, and I try to fill the TClonesArray with objects of this kind, and
> then fill the TTree.
>
> It seems not to have problems, but when I try to recorvery the TTree and read
> branches, I get errors of segmentation fault, and the root session alerts me
> as if the current version of the class object I defines was mewer thant the
> one I used to save the file (which is not true, I did not make any change).
>
> Is there some particular trick to operate with TTree branches of the
> TClonesArray type (or TObjArray, if possible)?
>
> Thanks
>
> Alberto
>
Received on Fri Jun 10 2005 - 12:41:18 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:09 MET