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

Event action class. More...

#include <Doxymodules_parallel.h>

Inheritance diagram for B2EventAction:
G4UserEventAction

Public Member Functions

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

Detailed Description

Event action class.

Definition at line 95 of file Doxymodules_parallel.h.

Constructor & Destructor Documentation

◆ B2EventAction()

B2EventAction::B2EventAction ( )

Definition at line 40 of file B2EventAction.cc.

◆ ~B2EventAction()

B2EventAction::~B2EventAction ( )
virtual

Definition at line 46 of file B2EventAction.cc.

47{}

Member Function Documentation

◆ BeginOfEventAction()

void B2EventAction::BeginOfEventAction ( const G4Event )
virtual

Definition at line 51 of file B2EventAction.cc.

52{}

◆ EndOfEventAction()

void B2EventAction::EndOfEventAction ( const G4Event event)
virtual

Definition at line 56 of file B2EventAction.cc.

57{
58 // get number of stored trajectories
59
60 G4TrajectoryContainer* trajectoryContainer = event->GetTrajectoryContainer();
61 G4int n_trajectories = 0;
62 if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
63
64 // periodic printing
65
66 G4int eventID = event->GetEventID();
67 if ( eventID < 100 || eventID % 100 == 0) {
68 G4cout << ">>> Event: " << eventID << G4endl;
69 if ( trajectoryContainer ) {
70 G4cout << " " << n_trajectories
71 << " trajectories stored in this event." << G4endl;
72 }
73 G4VHitsCollection* hc = event->GetHCofThisEvent()->GetHC(0);
74 G4cout << " "
75 << hc->GetSize() << " hits stored in this event" << G4endl;
76 }
77}

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

Applications | User Support | Publications | Collaboration