Hello Jayoung,
Create a TTree with two (or more) branches instead.
I recommend to create a class Event (see $ROOTSYS/test/MainEvent)
and let Root split automatically the class members in sub branches.
Rene Brun
On Fri, 19 Jan 2001, Jayoung Wu wrote:
> On Thu, 18 Jan 2001, Rene Brun wrote:
>
> > Hi Jayoung,
> >
> > A branch of a TTree can in principle be any TObject. But it must be
> > an object in memory. If your ntuple fits in memory, a TTree branch
> > may be a pointer to this TTree (use non-split mode).
> > I do not understand the problem you want to solve with this idea.
> >
> >
> > Rene Brun
> >
>
> Thanks, Rene.
>
> ------- Part of my program ------------
> TTree *my_tree = new TTree("EVENT","Event Tree");
> TNtuple *my_header = new TNtuple("my_header","EVENT HEADER","evtno:time:type");
> TNtuple *my_data = new TNtuple("my_data","Raw Data","address:value");
> ...
>
> ------ My problem ------------------------------
> Later I'll fill ntuples. Before fill those ntuples, I want to create two
> branches of my_tree. One is for my_header and the other for my_data. My
> problem is I do not know how to create the branches. I mean syntex wise.
>
> Is this right way?
> TBranch *branch1 = my_tree->Branch("Header",my_header);
>
> -------------
> Thanks a lot!
> Jayoung
>
>
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:34 MET