Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
 

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 ( 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 }
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:240
void SetDefaultUnit(const char *defUnit)

Here is the call graph for this function:

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

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
94  StepLengthAction->SetStepLimit(StepLengthLimitCmd->GetNewDoubleValue(newValue));
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
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 }
static G4double GetNewDoubleValue(const char *paramString)
void SetStepLimit(G4double val)
G4GLOB_DLL std::ostream G4cout
static G4double GetNewDoubleValue(const char *paramString)
#define G4endl
Definition: G4ios.hh:61
void SetStepLimit(G4double val)

Here is the call graph for this function:


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