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 "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
......
......@@ -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);
}
}
......@@ -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);
}
}
......@@ -11,6 +11,8 @@ SteppingAction::~SteppingAction() {
void
SteppingAction::UserSteppingAction(const G4Step* aStep) {
for (auto ana: m_anaelemtools) {
ana->UserSteppingAction(aStep);
}
}
......@@ -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);
}
}
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