#include "G4Timer.hh" #include "G4Run.hh" #include "G4ios.hh" #include "FCALRunAction.hh" #include "FCALEventAction.hh" #include "FCALDetectorConstruction.hh" FCALRunAction::FCALRunAction(FCALDetectorConstruction* detector_Con, FCALEventAction* event_Act) : timer(new G4Timer), detector_Construction(detector_Con), event_Action(event_Act) {} FCALRunAction::~FCALRunAction() { delete timer; } void FCALRunAction::BeginOfRunAction(const G4Run* aRun) { event_Action->resetCounters(); // reset both 'total_Photons' and 'detected_Photons' per every event G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl; // print the run id timer->Start(); } void FCALRunAction::EndOfRunAction(const G4Run* aRun) { timer->Stop(); G4cout << "Number of event = " << aRun->GetNumberOfEvent() << G4endl; }