Hello roottalk,
I have a TTree which includes an integer value, Length, and an integer array
Array, with 'Length' elements.
In the way it is created (to save space), Array[i] is only written if
Length>=i.
When I try to project (or draw, or...) from this tree the following
>tree->Draw("somevariable","(Length>0 && Array[0]==-1)||(Length>1 &&
Array[0]==1 && Array[1]==-1)
only the entries for which there exists an Array[1] element are selected.
(In other words, ROOT does check the existence of all elements making up the
varexp for validity, irrespective of the "local logic" validity). Then only
the AND of the two expressions instead of the OR is returned.
I think this is the correct thing to do (it would be dangerous to assume the
existence of all variables), but I am not sure how to circumvent this
problem...Should I revert to a fixed array length?
Thanks,
PS
Received on Wed Jan 19 2011 - 08:11:47 CET
This archive was generated by hypermail 2.2.0 : Wed Jan 19 2011 - 11:50:01 CET