I had allready tried what you suggest. I can "see" the branch in the tree
but I cannot read it back because of a segmentation fault when it tries to
expand the array. Splitlevel=1 works fine and TObjArray with split level=0
works fine too.
Yves
__________________________________________________________________
|Yves SCHUTZ (IN2P3 - CNRS) collaboration TAPS/WA98/ALICE |
|SUBATECH |
|Ecole des Mines de Nantes Telephone: (+33/0) 2 51 85 84 71 |
|4, rue Alfred Kastler Fax : (+33/0) 2 51 85 84 24 |
|F-44070 Nantes cedex 03 e-mail : yves.schutz@subatech.in2p3.fr|
|__________________________________________________________________|
On Mon, 20 Mar 2000, Christian Holm Christensen wrote:
> Hi Yves,
>
> On Mon, 20 Mar 2000 18:27:12 +0100 Yves SCHUTZ <schutz@in2p3.fr> wrote:
> > Hi,
> >
> > How can I write a TClonesArray in NON SPLIT
> > MODE to a branc in tree. Doing
> >
> > TClonesArray * list = new TClonesArray( ...
> > T->Branch(branchname, "TClonesArray" &list,
> > fBufferSize,0) ;
>
> When writting a branch of "TClonesArray" objects, you shouldn't use
> the method
>
> TTree::Branch(const char* name,
> const char* classname,
> void* addobj,
> Int_t bufsize = 32000,
> Int_t splitlevel = 1)
>
> Rather, you should use
>
> TTree::Branch(const char* name,
> void* clonesaddress,
> Int_t bufsize = 32000,
> Int_t splitlevel = 1)
>
>
> So that your example will be:
>
> Int_t FOO_Split = 0;
> TClonesArray *FOO_list = new TClonesArray("FOO_Class");
> FOO_Tree->Branch("FOO_Branch", &FOO_list, FOO_BufferSize,FOO_Split);
>
> I should think that would help you out. Otherwise, try a TObjArray,
> like
>
> Int_t BAR_Split = 0;
> TObjArray *BAR_list = 0;
> BAR_Tree->Branch("BAR_Branch", "TObjArray", &BAR_list,
> BAR_BufferSize,BAR_Split);
>
> Hope that was of some help.
>
> Cheers,
>
> Christian -----------------------------------------------------------
> Holm Christensen Phone: (+45) 35 35 96 91
> Sankt Hansgade 23, 1. th. Office: (+45) 353 25 305
> DK-2200 Copenhagen N Web: www.nbi.dk/~cholm
> Denmark Email: cholm@nbi.dk
>
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:21 MET