Skip to content
Snippets Groups Projects
Commit b9cdb003 authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn
Browse files

WIP: Enable all user actions.

parent 872029dc
No related branches found
No related tags found
No related merge requests found
#include "ExampleAnaElemTool.h" #include "ExampleAnaElemTool.h"
#include "G4Event.hh"
DECLARE_COMPONENT(ExampleAnaElemTool) DECLARE_COMPONENT(ExampleAnaElemTool)
void void
ExampleAnaElemTool::BeginOfRunAction(const G4Run*) { ExampleAnaElemTool::BeginOfRunAction(const G4Run*) {
G4cout << "Begin Run of detector simultion..." << G4endl;
} }
void void
ExampleAnaElemTool::EndOfRunAction(const G4Run*) { ExampleAnaElemTool::EndOfRunAction(const G4Run*) {
G4cout << "End Run of detector simultion..." << G4endl;
} }
void void
ExampleAnaElemTool::BeginOfEventAction(const G4Event*) { ExampleAnaElemTool::BeginOfEventAction(const G4Event* anEvent) {
msg() << "Event " << anEvent->GetEventID() << endmsg;
} }
void void
......
...@@ -11,12 +11,16 @@ EventAction::~EventAction() { ...@@ -11,12 +11,16 @@ EventAction::~EventAction() {
} }
void void
EventAction::BeginOfEventAction(const G4Event*) { EventAction::BeginOfEventAction(const G4Event* anEvent) {
for (auto ana: m_anaelemtools) {
ana->BeginOfEventAction(anEvent);
}
} }
void void
EventAction::EndOfEventAction(const G4Event*) { EventAction::EndOfEventAction(const G4Event* anEvent) {
for (auto ana: m_anaelemtools) {
ana->EndOfEventAction(anEvent);
}
} }
...@@ -15,13 +15,18 @@ RunAction::~RunAction() { ...@@ -15,13 +15,18 @@ RunAction::~RunAction() {
void void
RunAction::BeginOfRunAction(const G4Run* aRun) RunAction::BeginOfRunAction(const G4Run* aRun)
{ {
for (auto ana: m_anaelemtools) {
ana->BeginOfRunAction(aRun);
}
} }
void void
RunAction::EndOfRunAction(const G4Run* aRun) RunAction::EndOfRunAction(const G4Run* aRun)
{ {
for (auto ana: m_anaelemtools) {
ana->EndOfRunAction(aRun);
}
} }
...@@ -11,6 +11,8 @@ SteppingAction::~SteppingAction() { ...@@ -11,6 +11,8 @@ SteppingAction::~SteppingAction() {
void void
SteppingAction::UserSteppingAction(const G4Step* aStep) { SteppingAction::UserSteppingAction(const G4Step* aStep) {
for (auto ana: m_anaelemtools) {
ana->UserSteppingAction(aStep);
}
} }
...@@ -12,12 +12,16 @@ TrackingAction::~TrackingAction() { ...@@ -12,12 +12,16 @@ TrackingAction::~TrackingAction() {
void void
TrackingAction::PreUserTrackingAction(const G4Track* aTrack) { TrackingAction::PreUserTrackingAction(const G4Track* aTrack) {
for (auto ana: m_anaelemtools) {
ana->PreUserTrackingAction(aTrack);
}
} }
void void
TrackingAction::PostUserTrackingAction(const G4Track* aTrack) { TrackingAction::PostUserTrackingAction(const G4Track* aTrack) {
for (auto ana: m_anaelemtools) {
ana->PostUserTrackingAction(aTrack);
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment