Re: gRandom access in SVN HEAD

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Mon, 10 Mar 2008 22:00:08 +0100


Robert,

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().

We are expecting to remove this limitation in a future version of CINT.

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_at_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_at_fnal.gov 630-840-3102
> FNAL CD/EXP (MINOS) | MS 220, PO Box 500, Batavia IL 60510
>
Received on Mon Mar 10 2008 - 22:00:19 CET

This archive was generated by hypermail 2.2.0 : Tue Mar 11 2008 - 05:50:03 CET