diff --git a/Simulation/DetSimAna/src/ExampleAnaElemTool.cpp b/Simulation/DetSimAna/src/ExampleAnaElemTool.cpp index adf41ea9abac10694871cc28863fa204b2e79ff1..569c968c247760189886993da50211acaf9acfc0 100644 --- a/Simulation/DetSimAna/src/ExampleAnaElemTool.cpp +++ b/Simulation/DetSimAna/src/ExampleAnaElemTool.cpp @@ -1,20 +1,22 @@ #include "ExampleAnaElemTool.h" +#include "G4Event.hh" + DECLARE_COMPONENT(ExampleAnaElemTool) void ExampleAnaElemTool::BeginOfRunAction(const G4Run*) { - + G4cout << "Begin Run of detector simultion..." << G4endl; } void ExampleAnaElemTool::EndOfRunAction(const G4Run*) { - + G4cout << "End Run of detector simultion..." << G4endl; } void -ExampleAnaElemTool::BeginOfEventAction(const G4Event*) { - +ExampleAnaElemTool::BeginOfEventAction(const G4Event* anEvent) { + msg() << "Event " << anEvent->GetEventID() << endmsg; } void diff --git a/Simulation/DetSimCore/src/EventAction.cpp b/Simulation/DetSimCore/src/EventAction.cpp index bbe00357b030b267ad3356508f7dc67823136ae6..fd8bb34781e449185d4975077ad673db3fb1c648 100644 --- a/Simulation/DetSimCore/src/EventAction.cpp +++ b/Simulation/DetSimCore/src/EventAction.cpp @@ -11,12 +11,16 @@ EventAction::~EventAction() { } void -EventAction::BeginOfEventAction(const G4Event*) { - +EventAction::BeginOfEventAction(const G4Event* anEvent) { + for (auto ana: m_anaelemtools) { + ana->BeginOfEventAction(anEvent); + } } void -EventAction::EndOfEventAction(const G4Event*) { - +EventAction::EndOfEventAction(const G4Event* anEvent) { + for (auto ana: m_anaelemtools) { + ana->EndOfEventAction(anEvent); + } } diff --git a/Simulation/DetSimCore/src/RunAction.cpp b/Simulation/DetSimCore/src/RunAction.cpp index 81699bddbfa6b6f4ad736f968e07010ffda8da02..4bf8c5bd0895877f8dd0bb5c4618344183db839a 100644 --- a/Simulation/DetSimCore/src/RunAction.cpp +++ b/Simulation/DetSimCore/src/RunAction.cpp @@ -15,13 +15,18 @@ RunAction::~RunAction() { void RunAction::BeginOfRunAction(const G4Run* aRun) { + for (auto ana: m_anaelemtools) { + ana->BeginOfRunAction(aRun); + } } void RunAction::EndOfRunAction(const G4Run* aRun) { - + for (auto ana: m_anaelemtools) { + ana->EndOfRunAction(aRun); + } } diff --git a/Simulation/DetSimCore/src/SteppingAction.cpp b/Simulation/DetSimCore/src/SteppingAction.cpp index 30ef20f65d7d90360da12856a12d694d2797a2b8..4445ee9b145e95cdaec3e25c0a250ba5f71c6183 100644 --- a/Simulation/DetSimCore/src/SteppingAction.cpp +++ b/Simulation/DetSimCore/src/SteppingAction.cpp @@ -11,6 +11,8 @@ SteppingAction::~SteppingAction() { void SteppingAction::UserSteppingAction(const G4Step* aStep) { - + for (auto ana: m_anaelemtools) { + ana->UserSteppingAction(aStep); + } } diff --git a/Simulation/DetSimCore/src/TrackingAction.cpp b/Simulation/DetSimCore/src/TrackingAction.cpp index 89b6d1ee46ee03a962b6f67643e6661ca40cc54f..42949d2e64805c70e704a5dac7078cf3ce9e2908 100644 --- a/Simulation/DetSimCore/src/TrackingAction.cpp +++ b/Simulation/DetSimCore/src/TrackingAction.cpp @@ -12,12 +12,16 @@ TrackingAction::~TrackingAction() { void TrackingAction::PreUserTrackingAction(const G4Track* aTrack) { - + for (auto ana: m_anaelemtools) { + ana->PreUserTrackingAction(aTrack); + } } void TrackingAction::PostUserTrackingAction(const G4Track* aTrack) { - + for (auto ana: m_anaelemtools) { + ana->PostUserTrackingAction(aTrack); + } }