Geant4
10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VUserActionInitialization.hh
Go to the documentation of this file.
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
//
27
//
28
29
#ifndef G4VUserActionInitialization_h
30
#define G4VUserActionInitialization_h 1
31
32
// class description:
33
//
34
// This is the abstract base class for instantiating all the user action
35
// classes.
36
// It has a pure virtual method Build() which is invoked by G4RunManager for
37
// sequential execution and G4WorkerRunManager for multi-threaded execution.
38
// The additional virtual method BuildForMaster() will be invoked from
39
// G4MTRunManager for multi-threaded execution.
40
//
41
// Note that these virtual methods are const. It means the user may construct
42
// user action objects, but should not store the pointers of these objects as
43
// data members of the derived class.
44
//
45
// Note for multi-threaded mode:
46
// The only action class the user may set to G4MTRunManager is a run action. It
47
// is
48
// then used at the beginning and the end of a run. It may be the same class or
49
// a dedicated class different from the run action instantiated for
50
// G4WorkerRunManager.
51
//
52
53
class
G4VUserPrimaryGeneratorAction
;
54
class
G4UserRunAction
;
55
class
G4UserEventAction
;
56
class
G4UserStackingAction
;
57
class
G4UserTrackingAction
;
58
class
G4UserSteppingAction
;
59
class
G4VSteppingVerbose
;
60
61
class
G4VUserActionInitialization
62
{
63
public
:
64
G4VUserActionInitialization
();
65
virtual
~G4VUserActionInitialization
();
66
67
public
:
// with description
68
virtual
void
Build
()
const
= 0;
69
// Virtual method to be implemented by the user to instantiate user action
70
// class objects.
71
virtual
void
BuildForMaster
()
const
;
72
// Virtual method to be implemented by the user to instantiate user run action
73
// class object to be used by G4MTRunManager. This method is not invoked in
74
// the sequential mode. The user should not use this method to instantiate
75
// user action classes rather than user run action.
76
virtual
G4VSteppingVerbose
*
InitializeSteppingVerbose
()
const
;
77
// Virtual method to be implemented by the user if (s)he has a concrete
78
// SteppingVerbose class to be used by the worker thread. In this case
79
// (s)he should instantiate her/his SteppingVerbose in the concrete
80
// implementation of this method and return its pointer. If this method is
81
// not implemented, the default G4SteppingVerbose will be used. Please note
82
// that this method affects only for the worker thread.
83
84
protected
:
// with description
85
void
SetUserAction
(
G4VUserPrimaryGeneratorAction
*)
const
;
86
void
SetUserAction
(
G4UserRunAction
*)
const
;
87
void
SetUserAction
(
G4UserEventAction
*)
const
;
88
void
SetUserAction
(
G4UserStackingAction
*)
const
;
89
void
SetUserAction
(
G4UserTrackingAction
*)
const
;
90
void
SetUserAction
(
G4UserSteppingAction
*)
const
;
91
// These methods should be used to define user's action classes.
92
};
93
94
#endif
G4UserEventAction
Definition:
G4UserEventAction.hh:49
G4UserRunAction
Definition:
G4UserRunAction.hh:52
G4UserStackingAction
Definition:
G4UserStackingAction.hh:45
G4UserSteppingAction
Definition:
G4UserSteppingAction.hh:45
G4UserTrackingAction
Definition:
G4UserTrackingAction.hh:45
G4VSteppingVerbose
Definition:
G4VSteppingVerbose.hh:63
G4VUserActionInitialization
Definition:
G4VUserActionInitialization.hh:62
G4VUserActionInitialization::BuildForMaster
virtual void BuildForMaster() const
Definition:
G4VUserActionInitialization.cc:33
G4VUserActionInitialization::SetUserAction
void SetUserAction(G4VUserPrimaryGeneratorAction *) const
Definition:
G4VUserActionInitialization.cc:35
G4VUserActionInitialization::G4VUserActionInitialization
G4VUserActionInitialization()
Definition:
G4VUserActionInitialization.cc:29
G4VUserActionInitialization::Build
virtual void Build() const =0
G4VUserActionInitialization::~G4VUserActionInitialization
virtual ~G4VUserActionInitialization()
Definition:
G4VUserActionInitialization.cc:31
G4VUserActionInitialization::InitializeSteppingVerbose
virtual G4VSteppingVerbose * InitializeSteppingVerbose() const
Definition:
G4VUserActionInitialization.cc:69
G4VUserPrimaryGeneratorAction
Definition:
G4VUserPrimaryGeneratorAction.hh:49
geant4-v10.7.0
source
run
include
G4VUserActionInitialization.hh
Generated by
1.9.6