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

Event action for the persistency example. More...

#include <ExP01EventAction.hh>

Inheritance diagram for ExP01EventAction:
Collaboration diagram for ExP01EventAction:

Public Member Functions

 ExP01EventAction ()
 
 ~ExP01EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
- 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 for the persistency example.

Definition at line 46 of file ExP01EventAction.hh.

Constructor & Destructor Documentation

ExP01EventAction::ExP01EventAction ( )

Definition at line 45 of file ExP01EventAction.cc.

ExP01EventAction::~ExP01EventAction ( )

Definition at line 51 of file ExP01EventAction.cc.

52 {}

Member Function Documentation

void ExP01EventAction::BeginOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

Definition at line 56 of file ExP01EventAction.cc.

57 {}
void ExP01EventAction::EndOfEventAction ( const G4Event evt)
virtual

Reimplemented from G4UserEventAction.

Definition at line 61 of file ExP01EventAction.cc.

62 {
63  G4int event_id = evt->GetEventID();
64 
65  // get number of stored trajectories
66  //
67  G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
68  G4int n_trajectories = 0;
69  if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
70 
71  // periodic printing
72  //
73  if (event_id < 100 || event_id%100 == 0) {
74  G4cout << ">>> Event " << evt->GetEventID() << G4endl;
75  G4cout << " " << n_trajectories
76  << " trajectories stored in this event." << G4endl;
77  }
78 }
int G4int
Definition: G4Types.hh:78
G4TrajectoryContainer * GetTrajectoryContainer() const
Definition: G4Event.hh:189
G4int GetEventID() const
Definition: G4Event.hh:151
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:


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