GGS(GenericGEANT4Simulation)Software  2.7.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
Public Member Functions
GGSStatusDumpAction Class Reference

Action which dumps the simulation status on standard output. More...

#include <GGSStatusDumpAction.h>

Inheritance diagram for GGSStatusDumpAction:
Inheritance graph
[legend]
Collaboration diagram for GGSStatusDumpAction:
Collaboration graph
[legend]

Public Member Functions

 GGSStatusDumpAction ()
 Constructor.
 
virtual ~GGSStatusDumpAction ()
 Destructor.
 
void BeginOfEventAction (const G4Event *event)
 Dumps the simulation status every N events. More...
 
void BeginOfRunAction (const G4Run *run)
 Dumps the run number. More...
 
- Public Member Functions inherited from GGSUserAction
 GGSUserAction ()
 Constructor. More...
 
virtual ~GGSUserAction ()
 Destructor.
 
G4ClassificationOfNewTrack ClassifyNewTrack (const G4Track *)
 Override of the ClassifyNewTrack method. More...
 

Detailed Description

Action which dumps the simulation status on standard output.

This action dumps the status of the random generator every N events (default: N=500). N can be set by means of the/GGS/rndmPrintModulo datacard command.

Definition at line 28 of file GGSStatusDumpAction.h.

Member Function Documentation

void GGSStatusDumpAction::BeginOfEventAction ( const G4Event *  event)

Dumps the simulation status every N events.

Parameters
eventThe current event.

Definition at line 30 of file GGSStatusDumpAction.cpp.

30  {
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;
42  _lastPrinted = evtNb;
43  }
44  }
45 }
const long int * GetRandomSeedsAtBeginOfEvent()
Getter methos for random seeds at the beginning of the current event.
static GGSRunManager * GetRunManager()
Static getter function the run manager.
void GGSStatusDumpAction::BeginOfRunAction ( const G4Run *  run)

Dumps the run number.

Parameters
runThe current run.

Definition at line 49 of file GGSStatusDumpAction.cpp.

49  {
50  std::cout << "\n #### Begin of run " << run->GetRunID() << " ####" << std::endl;
51  _lastPrinted = -1;
52 }

The documentation for this class was generated from the following files: