Loading...
Searching...
No Matches
Public Member Functions | List of all members
ExP01EventAction Class Reference

Event action for the persistency example. More...

#include <Doxymodules_persistency.h>

Inheritance diagram for ExP01EventAction:
G4UserEventAction

Public Member Functions

 ExP01EventAction ()
 
 ~ExP01EventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 

Detailed Description

Event action for the persistency example.

Definition at line 82 of file Doxymodules_persistency.h.

Constructor & Destructor Documentation

◆ ExP01EventAction()

ExP01EventAction::ExP01EventAction ( )

Definition at line 44 of file ExP01EventAction.cc.

◆ ~ExP01EventAction()

ExP01EventAction::~ExP01EventAction ( )

Definition at line 50 of file ExP01EventAction.cc.

51{}

Member Function Documentation

◆ BeginOfEventAction()

void ExP01EventAction::BeginOfEventAction ( const G4Event )
virtual

Definition at line 55 of file ExP01EventAction.cc.

56{}

◆ EndOfEventAction()

void ExP01EventAction::EndOfEventAction ( const G4Event evt)
virtual

Definition at line 60 of file ExP01EventAction.cc.

61{
62 G4int event_id = evt->GetEventID();
63
64 // get number of stored trajectories
65 //
66 G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
67 G4int n_trajectories = 0;
68 if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
69
70 // periodic printing
71 //
72 if (event_id < 100 || event_id%100 == 0) {
73 G4cout << ">>> Event " << evt->GetEventID() << G4endl;
74 G4cout << " " << n_trajectories
75 << " trajectories stored in this event." << G4endl;
76 }
77}

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

Applications | User Support | Publications | Collaboration