Visual Display in Batch Mode

Is it possible to bring the visual display up from a run in batch mode? In example B2a, I attempted the modify the macro file run2.mac by inserting the following line:

/control/execute vis.mac
I then issued the command “./exampleB2a run2.mac” on the command line to run the program. It ran, but there was no visual display that came up.

1 Like

Mmmm. “Batch” and “visual” are a sort of contradiction in terms. If you want to watch what’s happening just use the “interactive mode” and type “exit” when you’ve finished watching. Anyway, in batch you’d usually be simulating a very large number of events, which, if you were drawing trajectories, would overwhelm the vis system. Use interactive on a relatively few events to verify the setup, then switch to batch.

There are some good reasons for wanting to run in interactive mode with a large number of events. You can ask the event manager to keep events of your choice, say rare events of some sort, and at end of run you can view them. You can “/vis/drawOnlyToBeKeptEvents” or “/vis/disable”. Also, with 11.1-beta, if you make plots with the analysis manager, you can view them with the TSG driver - again I would “/vis/disable” during the run.

The vis manager is still alive during a batch run. You can draw to a file-writing driver, such as DAWNFILE, HepRepFile or VRMLFILE.

But, actually, there’s no reason why it shouldn’t work the way you tried. It works for me. It draws 500 events, then exits an closes the graphics window. You have to put “/control/execute vis.mac” after “/run/initialize” - if you put it before it would have given a lot of warnings. Look on the output stream for warnings. Was that the problem?

Hope this helps


1 Like


It worked like you said it would, thanks! I think the problem yesterday was either that 1) the graphics window did open and close, but was hidden behind other open windows, or 2) more likely, that I updated run2.mac in the wrong directory.