TTree with a "fixed" branch

Thanks a lot again!

Sorry if I’m bothering you so much but there’s something not clear for me, yet…

I have N (for the following exercise let’s this N being 2) files with, each, one “normal” tree (“fast”) with a lot of entries and one tree (“slow”) with just one entry.

I put “slow” trees into a chain (the pointer is “slow”) (for the “fast” ones is the same in a chain with the pointer “slow”) and I have:

[code]root [37] slow->Scan(“Entry$:This->GetTreeNumber()”)


  • Row * Entry$ * This->Get *

  •    0 *         0 *         0 *
    
  •    1 *         1 *         1 *
    

(Long64_t)2[/code]

Then I try to Build the Index based on TreeNumber since then I would like Add this as Friend of the “fast” chain and getting the entry trough the GetTreeNumber(): when the “fast” chain changes file and so tree I want also the “slow” one changing tree and then giving back always its “fixed” values.

root [38] slow->BuildIndex("This->GetTreeNumber()") (Int_t)2 root [39] slow->GetEntryNumberWithIndex(0) (const Long64_t)1 root [40] slow->GetEntryNumberWithIndex(1) (const Long64_t)0 root [41] slow->GetEntryNumberWithIndex(2) (const Long64_t)0

I’m failing in understanding the result or the entry number I get back are wrong?! I should obtain 0, 1 and then always 0 or 1 or, better some “error” number (like -1…), isn’t it?

Ciao,
Matteo