GGS(GenericGEANT4Simulation)Software  2.6.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 500 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.

Currently, this action dumps the status of the random generator every 500 events. It inherits from G4UserEventAction since it only does per-event action.

Definition at line 29 of file GGSStatusDumpAction.h.

Member Function Documentation

void GGSStatusDumpAction::BeginOfEventAction ( const G4Event *  event)

Dumps the simulation status every 500 events.

Parameters
eventThe current event.

Definition at line 33 of file GGSStatusDumpAction.cpp.

33  {
34  if (_printModulo != 0) {
35  G4int evtNb = event->GetEventID();
36  if (evtNb % _printModulo == 0 && evtNb > _lastPrinted) {
37  std::cout << "\n---> Begin of event: " << evtNb << std::endl;
38  std::cout << "\n--------- Random engine status --------- " << std::endl;
39  std::cout << " Seeds at begin of event generation = "
42  std::cout << " Seeds at begin of event tracking = "
43  << CLHEP::HepRandom::getTheSeeds()[0] << ", "
44  << CLHEP::HepRandom::getTheSeeds()[1] << std::endl;
45  std::cout << "---------------------------------------- " << std::endl;
46  _lastPrinted = evtNb;
47  }
48  }
49 }
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 53 of file GGSStatusDumpAction.cpp.

53  {
54  std::cout << "\n #### Begin of run " << run->GetRunID() << " ####" << std::endl;
55  _lastPrinted = -1;
56 }

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