TTrees and TClonesArray

From: Alberto Pulvirenti <alberto.pulvirenti_at_ct.infn.it>
Date: Thu, 09 Jun 2005 16:27:37 +0200


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 Thu Jun 09 2005 - 16:20:48 MEST

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