On Mar 10, 2008, at 4:00 PM, Rene Brun wrote:
> The CINT autoload mechanism works only with class
names, not with
> globals or typedefs.
> the following works
> TRandom r;
> r.Rndm();
>
> but not gRandom->Rndm().
Yes. I just wondered if there was some way to coerce CINT
to
treat special entries in a .rootmap file such that it
handles
globals (e.g. gRandom) in the same way as actual classes.
I guess you're saying "it's not possible".
> We are expecting to remove this limitation in a future
version of
> CINT.
If that isn't to happen all that soon, could we in the
interim just
have root.exe linked with "mathcore" by default.
-robert
> Rene Brun
>
> Robert Hatcher wrote:
>> Second try sending this ... hope it makes it
through without
>> duplication]
>>
>> With the new handling of MathCore something seems
to have gotten lost
>> in the way it handles gRandom. Now I see:
>>
>> *******************************************
>> * *
>> * W E L C O M E to R O O T *
>> * *
>> * Version 5.19/01 17 January 2008 *
>> * *
>> * You are welcome to visit our Web site *
>> * http://root.cern.ch
*
>> * *
>> *******************************************
>> ROOT 5.19/01 (trunk 22548, Mar 10 2008,
00:33:04 on linux)
>> CINT/ROOT C/C++ Interpreter version 5.16.29, Jan
08, 2008
>>
>> root [0] gRandom->Rndm()
>> Error: Symbol gRandom is not defined in current
scope (tmpfile):1:
>> Error: Failed to evaluate gRandom->Rndm()
>> *** Interpreter error recovered ***
>> root [1]
gSystem->Load("libMathCore");
>> root [2] gRandom->Rndm()
>> (Double_t)9.99741748906672001e-01
>>
>> whereas in prior versions (e.g. v5.18/00a) the
initial statement
>> worked.
>> Previously libCore.so had a reference to gRandom
but it no longer
>> does
>> and so it fails to automatically load the
libMathCore library
>> (because
>> it's not trying to resolve a TRandom class name and
it knows
>> nothing about
>> "gRandom"). This is true for both Linux
(SLF 3 & 4) and Mac OS X
>> (Tiger).
>>
>> Are users going to have to add
gSystem->Load("libMathCore") to
>> their scripts or is there some means to get the
previous behaviour
>> restored?
>> I don't fully understand the .rootmap mechanism,
but would it be
>> possible
>> to use that to get the library automatically loaded
for these sort of
>> globals?
>>
>> -robert
>>
>> Robert W. Hatcher | rhatcher fnal.gov
630-840-3102
>> FNAL CD/EXP (MINOS) | MS 220, PO Box 500, Batavia
IL 60510
>>
>
Robert W. Hatcher | rhatcher fnal.gov 630-840-3102
FNAL CD/REX (MINOS) | MS 220, PO Box 500, Batavia IL 60510
|