Possible bugs/updating my version of root

Hello,

I am having a couple of strange problems. The first problem I was having is that if I try to save a TCanvas as a postscript file, root crashes. This happens in a macro as well as from the file menu on the canvas. I am able to save the canvas as a pdf or gif file, though, with no problems. I looked briefly at the development notes for the root version I have (4.00/03) and it looks like this is a bug in this version.

The other problem is the following. I have a macro that I can run from a root prompt with no problems (with rootn.exe), but when I use a TApplication and try to run this macro through a TTimer variable, it executes the macro ok, but I get the following error:

Error: class,struct,union or type ios not defined FILE:/usr/local/bin/root/cint/include/iostream.h LINE:-1
*** Interpreter error recovered ***

I didn’t notice this in the release notes, but that doesn’t mean it’s not there. Does anyone know what could be causing this? Also, could this cause other problems or make my program eventually crash?

Also, how can I fix these two problems (assuming there is a solution)?

Thanks.
Kenneth

Please send a small example of a script crashing.

Looks like you use an obsolete form in iostream (ios is obolete)

Rene

Hello,

The script does not crash. When I run the macro from the command line, the program runs fine. Also, when I execute it from the TApplication with a TTimer variable it runs fine. The macro executes all the way through in either case. The only problem is that every time the macro is executed with the TApplication/TTimer combination it gives me that error message. I can send you a copy of the macro if you would like…

Thanks.
Kenneth

Did you remove the “ios” specifier.
It is obsolete

Rene

no, this was the original problem. I have done nothing. I can change the header file, but the error message gives a line of ‘-1’ which I thought was a little strange.

Hello,

I tried downloading the latest version of root (4.00/04) and it has the same problems. I tried to comment out everywhere I saw ‘ios’ in the iostream.h file, but it does not help. Is there somewhere I can download the latest root cint package that doesn’t have this problem? Or can you suggest a way to fix this?

Thanks.
Kenneth

It would be much simpler if you could send the shortest possible script reproducing your problem.

Rene

I have included a much simplier version of what I am trying to do. When I run the macro file in an interactive mode ( by starting rootn.exe and then issuing the command ‘.x refreshPlot.cpp’ ) I get no errors. If I compile the code ( with g++ -Wno-deprecated root-config --cflags --glibs --libs -L$ROOTSYS/lib -lNew refreshPlot.cpp’ ) and then run the a.out executable from the terminal I get the error message. Hope this better quantifies my problem. I am using root version 4.00/03 and gcc version:
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)

You will need a TMapFile somewhere with a TH1F in it in order to run the code ( and you will need to set the file and histogram names in the macro also ).

Thanks.
Kenneth
refreshPlot.cpp (929 Bytes)

Hi,

In order to be able to access the function refreshPlot from CINT (as in:

myTimer->SetCommand(".x refreshPlot.cc");
you need to generate, compile and link a dictionary (see rootcint).

Cheers,
Philippe.

The problem I am having is not that the macro will not execute at all, my problem is that it executes the macro, but gives me an error message. As far as I can tell the error message is not bad enough to not be able to execute the macro. The macro executes to completion, but there are errors. It seems strange, I would think that if it was really an error it should stop the macro from executing.

Anyways, it is no longer a problem because I am using a class derived from TTimer to accomplish the same thing and consume less memory.

Thanks.