00001
00002
00003 #include "VisExamples/VisG4ExN02/src/VisG4ExampleEventAction.h"
00004 #include <G4Event.hh>
00005 #include <G4TrajectoryContainer.hh>
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 void
00018 VisG4ExampleEventAction::EndOfEventAction (const G4Event *event)
00019 {
00020 int eventId = event->GetEventID ();
00021 G4TrajectoryContainer *trajs = event->GetTrajectoryContainer ();
00022 int n = trajs ? trajs->entries () : 0;
00023
00024 if (eventId < 100 || eventId % 100 == 0)
00025 std::cout << "*** Event " << eventId << ": "
00026 << n << " trajectories stored in this event.\n";
00027 }