Re: [ROOT] problem with tree->BuildIndex()

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Aug 31 2000 - 22:00:37 MEST


Hi HP,
Thanks for sending me your file. I found the problem.
The way the buffer siwe was estimated in BuildIndex was not correct
in a few cases. I have fixed the problem in the source now.
You can nevertheless use the following workaround:
  TFile f("file.root")
  int n = T.GetEntries()
  T.SetEstimate(n)
  T.BuildIndex("ntic","ndate")

Rene Brun

On Thu, 31 Aug 2000, HP Wei wrote:

> Hi Rooters,
>    I have a root file with a tree in there.
>    Number of entries is about 1 million.
>    4 branches, two Int_t, two Double_t.
>    
>    Machine: Sun Solaris
>    Root/Cint 2.25.00; 5.14.40
>    
>    In ROOT/Cint, I connect to this root file.
>    Get the tree.
>    Now I do:
>    tree->BuildIndex("branch1", "branch2");
>    (note: branch1 and branch2 are Int_t).
>    
>    After a few seconds,
>    CINT replies:
>    break -- segmentation violation.
>    
>    What went wrong??
> HP
> 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:32 MET