Hi Rene,
In version 2.25, TTree::Scan used floats internally to compute all the
variables. With floats you cannot get more than 6 or 7 significative digits in
precision.
Your integers have 9 digits.
Your example will work correctly with version 3.00. We changed all internals
of Root to use double.
Rene Brun
Rene Wilhelm wrote:
>
> Hi,
>
> I'm trying to locate specific events in our data set, but somehow a
> strict equality test in TTree::Scan() doesn't find them. Could it be
> there's a loss of precision in the decoding of the *selection
> character string?
>
> Following snapshot illustrates my problem:
>
> root [1] T.Scan("PacketId:TargetId", "PacketId==985011665")
> ************************************
> * Row * PacketId * TargetId *
> ************************************
> * 42548 * 985011648 * 26 *
> ************************************
> ==> 1 selected entry
>
> root [2] T.Scan("PacketId:TargetId", "TargetId==16 && PacketId==985011665")
> ************************************
> * Row * PacketId * TargetId *
> ************************************
> ************************************
> ==> 0 selected entries
>
> root [3] T.Scan("PacketId:TargetId", "TargetId==16 && PacketId>985011600 &&
> PacketId <985011700")
> ************************************
> * Row * PacketId * TargetId *
> ************************************
> * 42529 * 985011626 * 16 *
> * 42561 * 985011665 * 16 *
> * 42594 * 985011703 * 16 *
> ************************************
> ==> 3 selected entries
>
>
> First command returns false match (985011648 != 985011665), second command
> with additional boundary condition suggests the requested event does not exist,
> but the third command, with less strict boundary conditions shows it *does*
> exist (row 42561). Any idea what's going on?
>
> This is with ROOT version 2.25/03.
>
> Kind regards,
>
> -- Rene
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Rene Wilhelm RIPE Network Coordination Centre
> Email: wilhelm@ripe.net Test Traffic Measurements
> Phone: +31 20 535 4417 Amsterdam, the Netherlands
> Fax: +31 20 535 4445 http://www.ripe.net/test-traffic/
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:41 MET