Re: problem with Reset in rootlogon file

From: Simioni Eduard <eduard.simioni_at_pd.infn.it>
Date: Thu, 7 Apr 2005 15:45:05 +0200 (MET DST)


Hi!

try to include this standard library:

{
gROOT->Reset();

#include "Riostream.h"

   cout << "Hello World" << endl;

}

Ed.


On Thu, 7 Apr 2005, Thomas Schietinger wrote:

> 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:45:15 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:06 MET