13 #include "G4GenericMessenger.hh"
18 _messenger =
new G4GenericMessenger(
this,
"/GGS/");
19 _messenger->DeclareProperty(
"rndmPrintModulo", _printModulo,
20 "Set the number of events between two dumps on screen of the random engine status "
21 "(set to 0 to disable the dump).");
31 if (_printModulo != 0) {
32 G4int evtNb =
event->GetEventID();
33 if (evtNb % _printModulo == 0 && evtNb > _lastPrinted) {
34 std::cout <<
"\n---> Begin of event: " << evtNb << std::endl;
35 std::cout <<
"\n--------- Random engine status --------- " << std::endl;
36 std::cout <<
" Seeds at begin of event generation = "
39 std::cout <<
" Seeds at begin of event tracking = " << CLHEP::HepRandom::getTheSeeds()[0] <<
", "
40 << CLHEP::HepRandom::getTheSeeds()[1] << std::endl;
41 std::cout <<
"---------------------------------------- " << std::endl;
50 std::cout <<
"\n #### Begin of run " << run->GetRunID() <<
" ####" << std::endl;
void BeginOfRunAction(const G4Run *run)
Dumps the run number.
const long int * GetRandomSeedsAtBeginOfEvent()
Getter methos for random seeds at the beginning of the current event.
virtual ~GGSStatusDumpAction()
Destructor.
void BeginOfEventAction(const G4Event *event)
Dumps the simulation status every N events.
GGSStatusDumpAction()
Constructor.
static GGSRunManager * GetRunManager()
Static getter function the run manager.