Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExG4EventAction01 Class Reference

#include <ExG4EventAction01.hh>

Inheritance diagram for ExG4EventAction01:
Collaboration diagram for ExG4EventAction01:

Public Member Functions

 ExG4EventAction01 ()
 
virtual ~ExG4EventAction01 ()
 
virtual void BeginOfEventAction (const G4Event *event)
 
virtual void EndOfEventAction (const G4Event *event)
 
void SetVerboseLevel (G4int level)
 
void SetSaveRndm (G4bool value)
 
void SetDrawFlag (G4String value)
 
 ExG4EventAction01 ()
 
virtual ~ExG4EventAction01 ()
 
virtual void BeginOfEventAction (const G4Event *event)
 
virtual void EndOfEventAction (const G4Event *event)
 
void SetVerboseLevel (G4int level)
 
void SetSaveRndm (G4bool value)
 
void SetDrawFlag (G4String value)
 
 ExG4EventAction01 ()
 
virtual ~ExG4EventAction01 ()
 
virtual void BeginOfEventAction (const G4Event *event)
 
virtual void EndOfEventAction (const G4Event *event)
 
void SetVerboseLevel (G4int level)
 
void SetSaveRndm (G4bool value)
 
void SetDrawFlag (G4String value)
 
- Public Member Functions inherited from G4UserEventAction
 G4UserEventAction ()
 
virtual ~G4UserEventAction ()
 
virtual void SetEventManager (G4EventManager *value)
 

Additional Inherited Members

- Protected Attributes inherited from G4UserEventAction
G4EventManagerfpEventManager
 

Detailed Description

Event action class

It provides:

  • setting verbose level and event modulo pronting
  • option to save random number status at the end of event

Definition at line 45 of file ExG4EventAction01.hh.

Constructor & Destructor Documentation

ExG4EventAction01::ExG4EventAction01 ( )

Standard constructor

Definition at line 50 of file ExG4EventAction01.cc.

52  fMessenger(this),
53  fVerboseLevel(fgkDefaultVerboseLevel),
54  fSaveRndm(false)
55 {
57 }
ExG4EventAction01::~ExG4EventAction01 ( )
virtual

Destructor

Definition at line 61 of file ExG4EventAction01.cc.

62 {
64 }
ExG4EventAction01::ExG4EventAction01 ( )
virtual ExG4EventAction01::~ExG4EventAction01 ( )
virtual
ExG4EventAction01::ExG4EventAction01 ( )
virtual ExG4EventAction01::~ExG4EventAction01 ( )
virtual

Member Function Documentation

void ExG4EventAction01::BeginOfEventAction ( const G4Event event)
virtual

Reimplemented from G4UserEventAction.

Definition at line 68 of file ExG4EventAction01.cc.

69 {
70  // Print event info
71  //
72  G4int eventNumber = event->GetEventID();
73 
74  // Print verbose info
75  //
76  if ( fVerboseLevel > 1 ) {
77  G4cout << "<<< Event " << eventNumber << " started." << G4endl;
78  }
79 }
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
virtual void ExG4EventAction01::BeginOfEventAction ( const G4Event event)
virtual

Reimplemented from G4UserEventAction.

virtual void ExG4EventAction01::BeginOfEventAction ( const G4Event event)
virtual

Reimplemented from G4UserEventAction.

void ExG4EventAction01::EndOfEventAction ( const G4Event event)
virtual

Reimplemented from G4UserEventAction.

Definition at line 83 of file ExG4EventAction01.cc.

84 {
85  // Print verbose info
86  //
87  if ( fVerboseLevel > 1 ) {
88  G4cout << "<<< Event " << event->GetEventID() << " ended." << G4endl;
89  }
90 
91  // Save rndm status
92  //
93  if ( fSaveRndm ) {
95  G4int runNumber = run->GetRunID();
96  G4int eventNumber = event->GetEventID();
97  std::ostringstream fileName;
98  fileName << "run" << runNumber << "event" << eventNumber << ".rndm";
99  CLHEP::HepRandom::saveEngineStatus(fileName.str().c_str());
100  }
101 }
int G4int
Definition: G4Types.hh:78
const G4Run * GetCurrentRun() const
G4GLOB_DLL std::ostream G4cout
G4int GetRunID() const
Definition: G4Run.hh:76
Definition: G4Run.hh:46
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
static void saveEngineStatus(const char filename[]="Config.conf")
Definition: Random.cc:275
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

virtual void ExG4EventAction01::EndOfEventAction ( const G4Event event)
virtual

Reimplemented from G4UserEventAction.

virtual void ExG4EventAction01::EndOfEventAction ( const G4Event event)
virtual

Reimplemented from G4UserEventAction.

void ExG4EventAction01::SetDrawFlag ( G4String  value)
void ExG4EventAction01::SetDrawFlag ( G4String  value)
void ExG4EventAction01::SetDrawFlag ( G4String  value)
void ExG4EventAction01::SetSaveRndm ( G4bool  value)
void ExG4EventAction01::SetSaveRndm ( G4bool  value)
inline

Definition at line 78 of file ExG4EventAction01.hh.

78  {
79  fSaveRndm = value;
80 }
const XML_Char int const XML_Char * value
Definition: expat.h:331

Here is the caller graph for this function:

void ExG4EventAction01::SetSaveRndm ( G4bool  value)
void ExG4EventAction01::SetVerboseLevel ( G4int  level)
inline

Definition at line 74 of file ExG4EventAction01.hh.

74  {
75  fVerboseLevel = level;
76 }

Here is the caller graph for this function:

void ExG4EventAction01::SetVerboseLevel ( G4int  level)
void ExG4EventAction01::SetVerboseLevel ( G4int  level)

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