LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
SteppingActionBase.hh
Go to the documentation of this file.
1 // This file is the header for the @SteppingActionBase@ class.
2 
3 // Base class for Geant user stepping action
4 
5 // When you create an action object, you have the option to overload the
6 // following methods:
7 
8 // @UserSteppingAction@ - This method, which takes a pointer to a constant
9 // @G4Step@ object, is called at the end of each step (I think - the
10 // documentation is a little vague). Putting code in this method of an action
11 // object is equivalent to putting it in the @UserSteppingAction@ method of
12 // the simulation's stepping action class.
13 
14 #ifndef artg4tk_actionBase_SteppingActionBase_hh
15 #define artg4tk_actionBase_SteppingActionBase_hh
16 
17 #include <string>
18 
20 
21 // Declarations of types we use as input parameters
22 class G4Step;
23 
24 // Everything goes in the Art G4 namespace
25 namespace artg4tk {
26 
27  class SteppingActionBase : public ActionBase {
28  public:
29  // Constructor. The derived class must call this constructor. It takes a
30  // single string for the name of the action object.
31  explicit SteppingActionBase(std::string name);
32 
33  // Destructor
34  virtual ~SteppingActionBase();
35 
36  // h3. The interesting methods.
37  // All of these are defined to do nothing by default. Users can override
38  // them if desired, and if they're not overloaded, they do nothing.
39 
40  // Called at the end of each step
41  virtual void
42  userSteppingAction(const G4Step*)
43  {}
44  };
45 }
46 
47 #endif /* artg4tk_actionBase_SteppingActionBase_hh */
SteppingActionBase(std::string name)
virtual void userSteppingAction(const G4Step *)