Geant4  10.02.p03
G4ErrorMessenger Class Reference

#include <G4ErrorMessenger.hh>

Inheritance diagram for G4ErrorMessenger:
Collaboration 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, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Private Attributes

G4ErrorStepLengthLimitProcessStepLengthAction
 
G4ErrorMagFieldLimitProcessMagFieldAction
 
G4ErrorEnergyLossEnergyLossAction
 
G4UIdirectorymyDir
 
G4UIdirectorymyDirLimits
 
G4UIcmdWithADoubleAndUnitStepLengthLimitCmd
 
G4UIcmdWithADoubleMagFieldLimitCmd
 
G4UIcmdWithADoubleEnergyLossCmd
 

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, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 

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");
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 }
G4ErrorEnergyLoss * EnergyLossAction
G4ErrorMagFieldLimitProcess * MagFieldAction
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
G4ErrorStepLengthLimitProcess * StepLengthAction
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
G4UIdirectory * myDirLimits
G4UIcmdWithADouble * MagFieldLimitCmd
void SetDefaultUnit(const char *defUnit)
G4UIcmdWithADoubleAndUnit * StepLengthLimitCmd
G4UIcmdWithADouble * EnergyLossCmd
G4UIdirectory * myDir
Here is the call graph for this function:

◆ ~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 }
G4UIdirectory * myDirLimits
G4UIcmdWithADouble * MagFieldLimitCmd
G4UIcmdWithADoubleAndUnit * StepLengthLimitCmd
G4UIcmdWithADouble * EnergyLossCmd
G4UIdirectory * myDir

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
90  if(G4ErrorPropagatorData::verbose() >= 3 ) {
91  G4cout << " G4ErrorMessenger::StepLengthAction SetStepLimit " << StepLengthLimitCmd->GetNewDoubleValue(newValue) << G4endl;
92  }
93 #endif
95  } else if( command == MagFieldLimitCmd ) {
96 #ifdef G4VERBOSE
97  if(G4ErrorPropagatorData::verbose() >= 3 ) {
98  G4cout << " G4ErrorMessenger::MagFieldAction SetStepLimit " << MagFieldLimitCmd->GetNewDoubleValue(newValue) << G4endl;
99  }
100 #endif
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
109  }
110 }
G4ErrorEnergyLoss * EnergyLossAction
G4ErrorMagFieldLimitProcess * MagFieldAction
static G4double GetNewDoubleValue(const char *paramString)
void SetStepLimit(G4double val)
G4GLOB_DLL std::ostream G4cout
static G4double GetNewDoubleValue(const char *paramString)
G4ErrorStepLengthLimitProcess * StepLengthAction
G4UIcmdWithADouble * MagFieldLimitCmd
#define G4endl
Definition: G4ios.hh:61
G4UIcmdWithADoubleAndUnit * StepLengthLimitCmd
void SetStepLimit(G4double val)
G4UIcmdWithADouble * EnergyLossCmd
Here is the call graph for this function:

Member Data Documentation

◆ EnergyLossAction

G4ErrorEnergyLoss* G4ErrorMessenger::EnergyLossAction
private

Definition at line 68 of file G4ErrorMessenger.hh.

◆ EnergyLossCmd

G4UIcmdWithADouble* G4ErrorMessenger::EnergyLossCmd
private

Definition at line 75 of file G4ErrorMessenger.hh.

◆ MagFieldAction

G4ErrorMagFieldLimitProcess* G4ErrorMessenger::MagFieldAction
private

Definition at line 67 of file G4ErrorMessenger.hh.

◆ MagFieldLimitCmd

G4UIcmdWithADouble* G4ErrorMessenger::MagFieldLimitCmd
private

Definition at line 74 of file G4ErrorMessenger.hh.

◆ myDir

G4UIdirectory* G4ErrorMessenger::myDir
private

Definition at line 70 of file G4ErrorMessenger.hh.

◆ myDirLimits

G4UIdirectory* G4ErrorMessenger::myDirLimits
private

Definition at line 71 of file G4ErrorMessenger.hh.

◆ StepLengthAction

G4ErrorStepLengthLimitProcess* G4ErrorMessenger::StepLengthAction
private

Definition at line 66 of file G4ErrorMessenger.hh.

◆ StepLengthLimitCmd

G4UIcmdWithADoubleAndUnit* G4ErrorMessenger::StepLengthLimitCmd
private

Definition at line 73 of file G4ErrorMessenger.hh.


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