Geant4 VMC
Version 6.7
Toggle main menu visibility
Main Page
Topics
Namespaces
Namespace List
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
~
Variables
c
d
e
f
g
i
l
m
n
p
r
s
t
y
z
Typedefs
Enumerations
Enumerator
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
k
o
s
t
Functions
Variables
Typedefs
Enumerations
Enumerator
f
k
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
source
event
src
TG4SteppingActionMessenger.cxx
Go to the documentation of this file.
1
//------------------------------------------------
2
// The Geant4 Virtual Monte Carlo package
3
// Copyright (C) 2007 - 2014 Ivana Hrivnacova
4
// All rights reserved.
5
//
6
// For the licensing terms see geant4_vmc/LICENSE.
7
// Contact: root-vmc@cern.ch
8
//-------------------------------------------------
9
14
15
#include "
TG4SteppingActionMessenger.h
"
16
#include "
TG4Globals.h
"
17
#include "
TG4SteppingAction.h
"
18
19
#include <G4UIcmdWithAnInteger.hh>
20
21
//_____________________________________________________________________________
22
TG4SteppingActionMessenger::TG4SteppingActionMessenger
(
23
TG4SteppingAction
* steppingAction)
24
:
G4UImessenger
(),
25
fSteppingAction
(steppingAction),
26
fLoopVerboseCmd
(0),
27
fMaxNofStepsCmd
(0)
28
{
30
31
fLoopVerboseCmd
=
new
G4UIcmdWithAnInteger(
"/mcTracking/loopVerbose"
,
this
);
32
fLoopVerboseCmd
->SetGuidance(
33
"Set tracking verbose level for detected looping tracks."
);
34
fLoopVerboseCmd
->SetParameterName(
"LoopVerboseLevel"
,
true
);
35
fLoopVerboseCmd
->SetDefaultValue(1);
36
fLoopVerboseCmd
->SetRange(
"LoopVerboseLevel >= 0 && LoopVerboseLevel <= 5"
);
37
fLoopVerboseCmd
->AvailableForStates(
38
G4State_PreInit, G4State_Init, G4State_Idle);
39
40
fMaxNofStepsCmd
=
new
G4UIcmdWithAnInteger(
"/mcTracking/maxNofSteps"
,
this
);
41
fMaxNofStepsCmd
->SetGuidance(
"Set maximum number of steps allowed."
);
42
fMaxNofStepsCmd
->SetParameterName(
"MaxNofSteps"
,
false
);
43
fMaxNofStepsCmd
->SetRange(
"MaxNofSteps >= 0"
);
44
fMaxNofStepsCmd
->AvailableForStates(
45
G4State_PreInit, G4State_Init, G4State_Idle);
46
}
22
TG4SteppingActionMessenger::TG4SteppingActionMessenger
( {
…
}
47
48
//_____________________________________________________________________________
49
TG4SteppingActionMessenger::~TG4SteppingActionMessenger
()
50
{
52
53
delete
fLoopVerboseCmd
;
54
delete
fMaxNofStepsCmd
;
55
}
49
TG4SteppingActionMessenger::~TG4SteppingActionMessenger
() {
…
}
56
57
//
58
// public methods
59
//
60
61
//_____________________________________________________________________________
62
void
TG4SteppingActionMessenger::SetNewValue
(
63
G4UIcommand
* command, G4String newValue)
64
{
66
67
if
(command ==
fLoopVerboseCmd
) {
68
fSteppingAction
->SetLoopVerboseLevel(
69
fLoopVerboseCmd
->GetNewIntValue(newValue));
70
}
71
else
if
(command ==
fMaxNofStepsCmd
) {
72
fSteppingAction
->SetMaxNofSteps(
fMaxNofStepsCmd
->GetNewIntValue(newValue));
73
}
74
}
62
void
TG4SteppingActionMessenger::SetNewValue
( {
…
}
TG4Globals.h
Definition of the TG4Globals class and basic container types.
TG4SteppingActionMessenger.h
Definition of the TG4SteppingActionMessenger class.
TG4SteppingAction.h
Definition of the TG4SteppingAction class.
G4UIcommand
G4UImessenger
TG4SteppingActionMessenger::SetNewValue
virtual void SetNewValue(G4UIcommand *command, G4String string)
Definition
TG4SteppingActionMessenger.cxx:62
TG4SteppingActionMessenger::TG4SteppingActionMessenger
TG4SteppingActionMessenger()
Not implemented.
TG4SteppingActionMessenger::~TG4SteppingActionMessenger
virtual ~TG4SteppingActionMessenger()
Definition
TG4SteppingActionMessenger.cxx:49
TG4SteppingActionMessenger::fMaxNofStepsCmd
G4UIcmdWithAnInteger * fMaxNofStepsCmd
command: maxNofSteps
Definition
TG4SteppingActionMessenger.h:56
TG4SteppingActionMessenger::fSteppingAction
TG4SteppingAction * fSteppingAction
associated class
Definition
TG4SteppingActionMessenger.h:54
TG4SteppingActionMessenger::fLoopVerboseCmd
G4UIcmdWithAnInteger * fLoopVerboseCmd
command: loopVerbose
Definition
TG4SteppingActionMessenger.h:55
TG4SteppingAction
Actions at each step.
Definition
TG4SteppingAction.h:47
Generated on Tue Apr 1 2025 13:04:46 for Geant4 VMC by
1.13.2