Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ErrorMessenger Class Reference

#include <G4ErrorMessenger.hh>

+ Inheritance diagram for G4ErrorMessenger:

Public Member Functions

 G4ErrorMessenger (G4ErrorStepLengthLimitProcess *lengthAct, G4ErrorMagFieldLimitProcess *magAct, G4ErrorEnergyLoss *elossAct)
 
 ~G4ErrorMessenger ()
 
void SetNewValue (G4UIcommand *, G4String)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
G4bool operator== (const G4UImessenger &messenger) const
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 

Detailed Description

Definition at line 53 of file G4ErrorMessenger.hh.

Constructor & Destructor Documentation

◆ G4ErrorMessenger()

G4ErrorMessenger::G4ErrorMessenger ( G4ErrorStepLengthLimitProcess lengthAct,
G4ErrorMagFieldLimitProcess magAct,
G4ErrorEnergyLoss elossAct 
)

Definition at line 48 of file G4ErrorMessenger.cc.

49 :StepLengthAction(lengthAct),MagFieldAction(magAct),EnergyLossAction(elossAct)
50{
51
52 myDir = new G4UIdirectory("/geant4e/");
53 myDir->SetGuidance("GEANT4e control commands");
54
55 myDirLimits = new G4UIdirectory("/geant4e/limits/");
56 myDirLimits->SetGuidance("GEANT4e commands to limit the step");
57
58
59 StepLengthLimitCmd = new G4UIcmdWithADoubleAndUnit("/geant4e/limits/stepLength",this);
60 StepLengthLimitCmd->SetGuidance("Limit the length of an step");
61 StepLengthLimitCmd->SetDefaultUnit("mm");
63
64 MagFieldLimitCmd = new G4UIcmdWithADouble("/geant4e/limits/magField",this);
65 MagFieldLimitCmd->SetGuidance("Limit the length of an step");
67
68 EnergyLossCmd = new G4UIcmdWithADouble("/geant4e/limits/energyLoss",this);
69 EnergyLossCmd->SetGuidance("Limit the length of an step");
71}
@ G4State_EventProc
@ G4State_Idle
@ G4State_GeomClosed
@ G4State_PreInit
void SetDefaultUnit(const char *defUnit)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:156
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:219

◆ ~G4ErrorMessenger()

G4ErrorMessenger::~G4ErrorMessenger ( )

Definition at line 75 of file G4ErrorMessenger.cc.

76{
77 delete StepLengthLimitCmd;
78 delete MagFieldLimitCmd;
79 delete EnergyLossCmd;
80 delete myDir;
81 delete myDirLimits;
82}

Member Function Documentation

◆ SetNewValue()

void G4ErrorMessenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 86 of file G4ErrorMessenger.cc.

87{
88 if( command == StepLengthLimitCmd ) {
89#ifdef G4VERBOSE
91 G4cout << " G4ErrorMessenger::StepLengthAction SetStepLimit " << StepLengthLimitCmd->GetNewDoubleValue(newValue) << G4endl;
92 }
93#endif
94 StepLengthAction->SetStepLimit(StepLengthLimitCmd->GetNewDoubleValue(newValue));
95 } else if( command == MagFieldLimitCmd ) {
96#ifdef G4VERBOSE
98 G4cout << " G4ErrorMessenger::MagFieldAction SetStepLimit " << MagFieldLimitCmd->GetNewDoubleValue(newValue) << G4endl;
99 }
100#endif
101 MagFieldAction->SetStepLimit(MagFieldLimitCmd->GetNewDoubleValue(newValue));
102 } else if( command == EnergyLossCmd ) {
103#ifdef G4VERBOSE
104 if(G4ErrorPropagatorData::verbose() >= 3 ) {
105 G4cout << " G4ErrorMessenger::EnergyLossAction SetStepLimit " << EnergyLossCmd->GetNewDoubleValue(newValue) << G4endl;
106 }
107#endif
108 EnergyLossAction->SetStepLimit(EnergyLossCmd->GetNewDoubleValue(newValue));
109 }
110}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
void SetStepLimit(G4double val)
static G4double GetNewDoubleValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
void SetStepLimit(G4double val)

The documentation for this class was generated from the following files: