problem with Reset in rootlogon file

From: Thomas Schietinger <tschieti_at_mail.cern.ch>
Date: Thu, 7 Apr 2005 14:00:33 +0200 (CEST)


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 - 14:00:38 MEST

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