Re: implications of unsorted TChain indices

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Wed, 10 Mar 2010 13:04:59 -0600


Hi Robert,

The error message indicates that BuildIndex thinks that the range of value for metakey overlap across some of the files (i.e the index is not strictly growing
from file to file).

The error message (and the return code) of BuildIndex indicate that _no_ index was created.

In this case:

    fMetaChain->GetEntryWithIndex(metakey) should return -1;

Cheers,
Philippe.

On 3/10/10 9:05 AM, Robert Hatcher wrote:
> Hi all,
> I have a TChain that I create from a series of TTrees. I then use:
>
> fMetaChain->BuildIndex("metakey");
>
> so that I can later pull the right entry by using:
>
> fMetaChain->GetEntryWithIndex(metakey);
>
> When constructing the indices I'm getting:
>
> Error in <TChainIndex::TChainIndex>: The indices in files of this
> chain aren't sorted.
>
> I can believe that the indices aren't sorted relative to the order
> that trees are added to the chain. I'm wondering though whether this
> is just a warning indicative of possible poor performance or will the
> GetEntryWithIndex() fail to deliver the right entry? The chain is
> relatively short (~100's to ~1000's at max) and new entries aren't
> fetched very frequently so falling back to a straight linear search
> would be acceptable. But what the application can't abide would be
> to not get the right entry.
>
> So, what is this "error" telling me?
>
> Thanks,
> -robert
>
> Robert W. Hatcher | rhatcher_at_fnal.gov
> <mailto:rhatcher_at_fnal.gov> 630-840-3102
> FNAL CD/REX (MINOS) | MS 220, PO Box 500, Batavia IL 60510
>
>
>
>
Received on Wed Mar 10 2010 - 20:05:06 CET

This archive was generated by hypermail 2.2.0 : Thu Mar 11 2010 - 11:50:01 CET