[ROOT] TTree::Draw and arrays

From: David Bailey (Antares Post Graduate) (d.bailey2@physics.ox.ac.uk)
Date: Thu Jul 06 2000 - 17:25:25 MEST


Hi,

  I've been trying to use the TTree::Draw method to loop over different
TClonesArrays and compare the values of data members of the objects in each
array. Reading the release notes for v2.25, as I understand it, it will only
loop over the number of entries in each array corresponding to the smaller
of the two array sizes and will only compare entries with the same index.
What I would like to be able to do is a double loop over all entries in both
arrays and compare the values for each possible pair of entries:

e.g.

t->Draw("hit.t","hit.id == hit_list.id");

where: hit is a TClonesArray of "hits" ( with members "t" and "id" )
       hit_list is a TClonesArray of some "hit_id" object which has a member
"id" giving the corresponding value of hit.id.

i.e. What I want is to be able to draw some property of "hit" iff its "id"
corresponds to one in the "hit_list". Clearly, I could write a macro with
the loops explicitly to do this but it would be nice to be able to do it
automatically... Is this possible with the current release or can it be
easily added?

  Thanks for your help,

    Cheers, Dave

/------------------------------------------/
  David Bailey : Antares post-Graduate    /
  Nuclear and Astrophysics Laboratory    /
  Keble Road, Oxford OX1 3RH    /-------/
  (01865) 273395  /------------/
-----------------/ d.bailey2@physics.ox.ac.uk



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