Re:

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Nov 04 1997 - 16:50:12 MET


Tom Moog wrote:

> I am trying to create a branch containing a TArrayS object
> in a Cint script.  The call to tree->Branch always give
> a segment violation.
>
> What is correct for the third argument to TTree::Branch ?
>
> {
> TFile   *file=new TFile("data.root","UPDATE");
> TTree   *tree=new TTree();
> TArrayS *s=new TArrayS(5);
> TBranch *b=tree->Branch("my branch","TArrayS",???,0,0);
>                                               ***
> }


TArrayS is not derived from TObject. You cannot invoke this method
Instead, create a class derived from TObject. This class can contain
a TArray object or a pointer to a TArray object.

I remind users that in the current version of Root, the automatic split
mode cannot recognized TArray objects.
We intend to implement this facility in the future.

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:22 MET