Hello,
I am running a Geant4 code for the simulation of a HPGe array for gamma-ray spectroscopy. I want to see if the array is built correctly, therefore I want a visualization.
I use a macro and I receive the following error:
***** COMMAND NOT FOUND </vis/open OGL 600x600-0+0> *****
***** Batch is interrupted!! *****
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Command aborted (100)
Error code : 100
In the Geant4 forum I found that I have to build Geant4 with -DGEANT4_USE_OPENGL_X11=ON and so I did, indeed I have “GEANT4_USE_OPENGL_X11:BOOL=ON” in CMakeCache.txt
I tried also to use B1 example and there the visualization works properly.
Do you UImanager->ApplyCommand("/control/execute xxx.mac") before or after instantiating the vis manager? (By xxx.mac, I mean the macro that includes /vis/open or includes another file that does it. In exampleB1.cc it’s init_vis.mac.)
And while executing I write ./name macro.mac rootfile, where name is the executable, macro.mac the macro in which there is /vis/open, and rootfile is the name of an output file for histo.
There’s something funny here. You are running in “batch mode”, yet you want graphics? Graphics is usually in “interactive mode”. What does your code do if argc==1? Following exampleB1, you should open a session, and you can type in the /control/execute command. (You would also have to instantiate your RunAction somehow.)
In “batch mode”, i.e., without an interactive session, you may have graphics but the window would simply close at end of job. Or you could write to a file-writing driver - e.g., DAWNFILE, VRML2FILE, HepRepFile - and view offline.