But it turns out I’m not completely out of the woods yet.
When I compile my code from within root (using ACLiC), and I save my plots from the canvas menu to a postscript file, I can view the file using ghostview.
When I compile my code into a standalone binary, and I save my plots from the canvas menu to ps file, I see a blank page in ghostview. That is, the plots are drawn, but directly after that the page is cleared. I traced the difference in the postscript to one of the last lines in the ps file:
When I save the ps file from the exe, I have this line:
t 0 r 0 0 m /Helvetica-Bold findfont 64 sf 0 0 m ((B\040) show gr 1 1 1 c
2383 2268 0 0 bf gr
And when I save them from within root, it looks like this:
t 0 r 0 0 m /Helvetica-Bold findfont 64 sf 0 0 m ((B\040) show gr gr
Editing the file from the exe in emacs solves the problem.
I’m attaching two tar files: One with the two different files (lxy.ps is saved from within root, lxy_exe.ps is saved from the stand-alone exe). The other tar file has the code.
To run the code from within root, unpack the tar file, cd into the dir rootproblem, and type
root compile.C
[root] char** cp
[root] main_a(0, cp)
To run the code standalone, unpack the tar file, cd into the dir “rootproblem”. Undefine “INTERACTIVE” in src/RatioNeutralsToCharged_x.cpp, gmake and run the binary in the bin directory.
Paul
rootproblem.tar (110 KB)
plots.tar (70 KB)