TTree::Print() - what is Instance?

Sometimes when I call TTree::Print() I get an extra column called “Instance” - this is not one of my branches. What does this mean? Why would a TTree have more than one instance of a row?

[code]root [12] nt->Scan("",“tofx==79814”)


  • Row * Instance * nx0 * nx1 * ny0 * ny1 * nu0 * nu1 * x0 * x1 *

  • 111987 * 0 * 1 * 1 * 1 * 1 * 1 * 1 * 40184 * 39630 *
  • 240371 * 0 * 1 * 1 * 1 * 1 * 1 * 1 * 39596 * 40218 *
  • 539192 * 0 * 1 * 1 * 1 * 1 * 1 * 1 * 40169 * 39645 *
  • 662719 * 0 * 1 * 1 * 1 * 1 * 1 * 1 * 40249 * 39565 *
  • 733381 * 0 * 1 * 1 * 1 * 1 * 1 * 1 * 40382 * 39432 *
  • 864472 * 0 * 1 * 1 * 1 * 1 * 1 * 1 * 39686 * 40128 *
  • 885525 * 0 * 1 * 1 * 1 * 1 * 1 * 1 * 39806 * 40008 *
  • 892703 * 0 * 1 * 1 * 1 * 1 * 1 * 1 * 40091 * 39723 *
  • 987997 * 0 * 1 * 1 * 1 * 1 * 1 * 1 * 39956 * 39858 *
  • 987998 * 0 * 1 * 1 * 1 * 1 * 1 * 1 * 39956 * 39858 *
  • 987999 * 0 * 1 * 1 * 1 * 1 * 1 * 1 * 39956 * 39858 *
  • 988000 * 0 * 2 * 2 * 2 * 2 * 2 * 2 * 39956 * 39858 *
  • 988000 * 1 * 2 * 2 * 2 * 2 * 2 * 2 * 56117 * 56109 *[/code]In the TTree above, x0 and x1 are arrrays and tofx is an alias = x0[0]+x1[0]. The last line (Instance=1)does not even satisfy the selection.

I am using root 5.06/00 on windows XP

Thanks

Ed

Each time the expression refers to an array of the event.

[quote]I get an extra column called “Instance”[/quote]This is the ‘index’ within the (implied) array of the expression.
So in your case if you didnt->Scan("x0") for each entry of the TTree you would get several line with instance ranging from 0 to the maximum index valid for x0 (aka x0[0]. x0[1], x0[2].

[quote]In the TTree above, x0 and x1 are arrrays and tofx is an alias = x0[0]+x1[0].[/quote]Since there is no guarantee that x0[0] exist for each entry, TTree::Scan consider this to be an array and hence you see the Instance columns.

[quote]The last line (Instance=1)does not even satisfy the selection. [/quote]Humm this is weird. Try:"(tofx)==79814"(but this should be the default). Otherwise send me an example root file.

Cheers,
Philippe