LDMX Software
SteppingAction.h
1
6#ifndef SIMCORE_G4USER_STEPPINGACTION_H
7#define SIMCORE_G4USER_STEPPINGACTION_H
8
9/*~~~~~~~~~~~~~~~~*/
10/* C++ StdLib */
11/*~~~~~~~~~~~~~~~~*/
12#include <vector>
13
14/*~~~~~~~~~~~~*/
15/* Geant4 */
16/*~~~~~~~~~~~~*/
17#include "G4UserSteppingAction.hh"
18
19/*~~~~~~~~~~~~~*/
20/* SimCore */
21/*~~~~~~~~~~~~~*/
22#include "SimCore/UserAction.h"
23
24namespace simcore {
25namespace g4user {
26
31class SteppingAction : public G4UserSteppingAction {
32 public:
35
41 void UserSteppingAction(const G4Step* step) override;
42
48 void registerAction(UserAction* steppingAction) {
49 steppingActions_.push_back(steppingAction);
50 }
51
52 private:
54 std::vector<UserAction*> steppingActions_;
55
56}; // SteppingAction
57
58} // namespace g4user
59} // namespace simcore
60
61#endif // SIMCORE_G4USER_STEPPINGACTION_H
Interface that defines a user action.
Definition UserAction.h:42
Implements the Geant4 user stepping action.
void UserSteppingAction(const G4Step *step) override
Callback used to process a step.
std::vector< UserAction * > steppingActions_
Collection of user stepping actions.
void registerAction(UserAction *steppingAction)
Register a user action of type SteppingAction with this class.
This namespace is meant to contain all the standard user actions that allow a Geant4 user to interfac...