RE: strange bug ?

From: Christian Holm Christensen <>
Date: Wed, 26 Jul 2006 01:22:44 +0200


On Tue, 2006-07-25 at 14:46 -0500, Philippe Canal wrote:
> Hi Boris,
> This is a bad interaction with another feature of TTree::Draw,
> which can use the content of a source file as the selection.
> Currently this feature does not require the file to have an
> extension ....

... and it shouldn't require that the file has an `extension' (brr, bad Windoze/Doz term). On most reasonable system, what matters is not the file name but the file _content_, and CINT/ROOT should respect that tradition.

Another place where CINT has a huge (in my mind) problem with this, is when loading libraries. Currently it requires that the file name ends in `.so', `.sl', `.a' or `.dll', but a great man number of very reasonable libraries have file names that append an interface number to this, like `/usr/lib/'. Since CINT _requires_ one of the above endings, it forces people to install development packages of all sorts of stuff, even though they technically don't need it. If CINT would allow interface numbers at the end of the file name of loadable modules, one could easier make a clean version specific/sensitive plug-in architecture in say ROOT. Also, insisting on just the above endings is counter productive. For example, one should be able to `load' the libtool library files that end in `.la', not to mention MacOSX's `.dylib' files.

The best thing for all this, is to use file magic. That is, inspect the actual content. For example, in ROOT files, the first four bytes are always `R' `O' `O' and `T'. Insisting on C++ source files to end in `.C', `.cxx', or `.cpp' is silly, especially because people may be tempted to put `.cc', `.c++', `.CC' or the like instead. Similar for declaration files.

It would be better if TTree::Draw accepted a std::istream. Then the input could be _any_ kind of stream, and normal C++ extraction operators could be used. Or at least require that you pass some URI, like `file:e', `file:/home/foo/bar',

My two cents.


 ___  |  Christian Holm Christensen 
  |_| |  -------------------------------------------------------------
    | |  Address: Sankt Hansgade 23, 1. th.  Phone:  (+45) 35 35 96 91
     _|           DK-2200 Copenhagen N       Cell:   (+45) 24 61 85 91
    _|            Denmark                    Office: (+45) 353  25 404
 ____|   Email:               Web:
 | |
Received on Wed Jul 26 2006 - 01:23:14 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:00 MET