G4ErrorMessenger Class Reference

#include <G4ErrorMessenger.hh>

Inheritance diagram for G4ErrorMessenger:

G4UImessenger

Public Member Functions

 G4ErrorMessenger (G4ErrorStepLengthLimitProcess *lengthAct, G4ErrorMagFieldLimitProcess *magAct, G4ErrorEnergyLoss *elossAct)
 ~G4ErrorMessenger ()
void SetNewValue (G4UIcommand *, G4String)

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.

References G4UIcommand::AvailableForStates(), G4State_EventProc, G4State_GeomClosed, G4State_Idle, G4State_PreInit, G4UIcmdWithADoubleAndUnit::SetDefaultUnit(), and G4UIcommand::SetGuidance().

00049   :StepLengthAction(lengthAct),MagFieldAction(magAct),EnergyLossAction(elossAct)
00050 {
00051 
00052   myDir = new G4UIdirectory("/geant4e/");
00053   myDir->SetGuidance("GEANT4e control commands");
00054   
00055   myDirLimits = new G4UIdirectory("/geant4e/limits/");
00056   myDirLimits->SetGuidance("GEANT4e commands to limit the step");
00057 
00058 
00059   StepLengthLimitCmd = new G4UIcmdWithADoubleAndUnit("/geant4e/limits/stepLength",this);  
00060   StepLengthLimitCmd->SetGuidance("Limit the length of an step");
00061   StepLengthLimitCmd->SetDefaultUnit("mm");
00062   StepLengthLimitCmd->AvailableForStates(G4State_PreInit,G4State_Idle,G4State_GeomClosed,G4State_EventProc);
00063 
00064   MagFieldLimitCmd = new G4UIcmdWithADouble("/geant4e/limits/magField",this);  
00065   MagFieldLimitCmd->SetGuidance("Limit the length of an step");
00066   MagFieldLimitCmd->AvailableForStates(G4State_PreInit,G4State_Idle,G4State_GeomClosed,G4State_EventProc);
00067 
00068   EnergyLossCmd = new G4UIcmdWithADouble("/geant4e/limits/energyLoss",this);  
00069   EnergyLossCmd->SetGuidance("Limit the length of an step");
00070   EnergyLossCmd->AvailableForStates(G4State_PreInit,G4State_Idle,G4State_GeomClosed,G4State_EventProc);
00071 }

G4ErrorMessenger::~G4ErrorMessenger (  ) 

Definition at line 75 of file G4ErrorMessenger.cc.

00076 {
00077   delete StepLengthLimitCmd;
00078   delete MagFieldLimitCmd;
00079   delete EnergyLossCmd;
00080   delete myDir;
00081   delete myDirLimits;
00082 }


Member Function Documentation

void G4ErrorMessenger::SetNewValue ( G4UIcommand ,
G4String   
) [virtual]

Reimplemented from G4UImessenger.

Definition at line 86 of file G4ErrorMessenger.cc.

References G4cout, G4endl, G4UIcmdWithADouble::GetNewDoubleValue(), G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(), G4ErrorEnergyLoss::SetStepLimit(), G4VErrorLimitProcess::SetStepLimit(), and G4ErrorPropagatorData::verbose().

00087 {   
00088   if( command == StepLengthLimitCmd ) { 
00089 #ifdef G4VERBOSE
00090     if(G4ErrorPropagatorData::verbose() >= 3 ) { 
00091       G4cout << " G4ErrorMessenger::StepLengthAction SetStepLimit " << StepLengthLimitCmd->GetNewDoubleValue(newValue) << G4endl;
00092     }
00093 #endif
00094     StepLengthAction->SetStepLimit(StepLengthLimitCmd->GetNewDoubleValue(newValue));
00095   } else if( command == MagFieldLimitCmd ) { 
00096 #ifdef G4VERBOSE
00097     if(G4ErrorPropagatorData::verbose() >= 3 ) { 
00098       G4cout << " G4ErrorMessenger::MagFieldAction SetStepLimit " << MagFieldLimitCmd->GetNewDoubleValue(newValue) << G4endl;
00099     }
00100 #endif
00101     MagFieldAction->SetStepLimit(MagFieldLimitCmd->GetNewDoubleValue(newValue));
00102   } else if( command == EnergyLossCmd ) { 
00103 #ifdef G4VERBOSE
00104     if(G4ErrorPropagatorData::verbose() >= 3 ) { 
00105       G4cout << " G4ErrorMessenger::EnergyLossAction SetStepLimit " << EnergyLossCmd->GetNewDoubleValue(newValue) << G4endl;
00106     }
00107 #endif
00108     EnergyLossAction->SetStepLimit(EnergyLossCmd->GetNewDoubleValue(newValue));
00109   }
00110 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:55 2013 for Geant4 by  doxygen 1.4.7