Printing of event log

Hi, I am currently trying to lower the verbosity of my output and have been mostly successful with the exception of stopping what seems like an event log, it prints : “Event starts with initial seeds ()” for every event. I can’t seem to find where this originates from. There is no print statement for this in any of the files so I figured it must be a default setting of something.
The simulation is based off example B4a. The verbosity commands I currently have in my macro are:
/process/had/verbose 0
/process/em/verbose 0
/control/verbose 0
/run/verbose 0
/event/verbose 0
/tracking/verbose 0
/process/verbose 0

I’ve found out that even setting all these verbose settings to 0 many things are still printed out by Geant4. Therefore, in my own code I decided to just disable stdout output temporarily when I don’t want the output. Below are the functions I use to do that. I hope you find them useful.

static int outfd = STDOUT_FILENO;

void disable_stdout()
	FILE* tmp = fopen("/dev/null", "a+");


	outfd = dup(STDOUT_FILENO);

	if (outfd == -1 || dup2(fileno(tmp), STDOUT_FILENO) == -1)
		errx(1, "failed to disable stdout");


void enable_stdout()

	if (dup2(outfd, STDOUT_FILENO) == -1)
		errx(1, "failed to enable stdout");


Thank you for the fast reply. This was very helpful.

you could try to set /run/printProgress -1

and in principle, there is also a verbosity build option:

  • If set to ON, build Geant4 libraries with extra verbosity. It can be switched to OFF to give a degree of performance improvement, but you will not have as much information output should you run into problems or need to debug.