Re: [ROOT] TTree::BuildIndex

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Mar 17 2004 - 23:16:31 MET


Hi Sue,

I hope to be able to implement a much simpler and efficient
mechanism for friends than the one proposed in your scripts.
I was originally planning to include these changes only in Root 4.01
(as announced at the workshop). What I have in mind should be
in place for the final release of 4.00 scheduled for June.
I will let you know (may be end of April) as soon as there is
a concrete implementation.

Rene Brun

On 
Tue, 16 Mar 
2004, Sue Kasahara wrote:

> Hi Rene,
> Thanks for your quick response, and sorry that I missed the documentation
> about using TTree::BuildIndex with majorname only - I see that this does
> work as you described.
> I am making use of TTree::BuildIndex in a script that I've written
> to facilitate use of TTree::AddFriend for cases in which the entries in the
> friend trees need to be synchronized by "key value" and not tree index.
> Our need to be able to make use of TTree::AddFriend in this way was first
> described in:
> http://root.cern.ch/root/roottalk/roottalk03/3814.html
> and also summarized at the recent root workshop.
>   Even though I've been able to write a script to provide the functionality
> we want, I would like to make this process simpler for our users and am
> hoping that ROOT will support the ability to use AddFriend with entries
> synchronized by key value and not tree index.
>   I'm attaching the scripts that I've written so that you can see better
> what it is that we're after.  (demo script AddFriendByKey.C makes use
> of AlignTreesByKey.C)
>   Can you please tell me if this is something root will support, and if
> so on what time scale?
> Thanks,
> -Sue
> 
> Rene Brun wrote:
> 
> > Hi Sue,
> >
> > see: http://root.cern.ch/root/htmldoc/TTree.html#TTree:BuildIndex
> >
> > I have implemented your suggestion with the return type.
> > see the doc for specifying only majorname
> >
> > Rene
> >
> > On Sat,
> > 13 Mar 2004, Sue Kasahara wrote:
> >
> > > Hi root team,
> > > I'm wondering if the method:
> > >   virtual void      BuildIndex(const char *majorname, const char *minorname);
> > > can be modified in the following ways:
> > > 1)To allow the user to specify only a majorname if desired.  Currently, doing this creates an invalid
> > >     string "majorname +*1e-9".
> > > 2)To return a value (-1?) indicating failure if the method failed to successfully build the user's index.
> > > I'm using cvs root from Feb. 10, 2004.
> > > Thanks,
> > > -Sue
> > >
> 



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET