Hi Thomas,
The gROOT->Reset() in your rootlogon.C very likely removes
the definitions of cout & co.
So, in case you really need gROOT->Reset(), just invokes
it in your root macros instead of in your rootlogon.C
Cheers,
Nick.
> Hello,
>
> in ROOT 4.02/00 on slc3, I have a problem when using gROOT->Reset();
> in the rootlogon.C script.
> I can do
>
> root [0] gROOT->Reset();
> root [1] cout << "Hello World" << endl;
> Hello World
>
> without problem. But as soon as I move the Reset command into
> my rootlogon.C script, cout is corrupted:
>
> root [0] cout << "Hello World" << endl;
> Error: Symbol cout is not defined in current scope FILE:(tmpfile) LINE:1
> Error: << Illegal operator for pointer 3 FILE:(tmpfile) LINE:1
> Error: << Illegal operator for pointer 3 FILE:(tmpfile) LINE:1
> *** Interpreter error recovered ***
> root [1]
>
> This was produced with the following simple rootlogon.C script:
> tschieti_at_lxplus009_525>cat rootlogon.C
> {
> gROOT->Reset();
> }
>
> A simple workaround is to use printf() instead of cout, but that's
> not a good solution as many pre-existing macros contain cout statments.
>
> Thanks for any help,
>
> Thomas
>
> --
>
Received on Thu Apr 07 2005 - 15:38:54 MEST
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:06 MET