Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
WLSSteppingActionMessenger Class Reference

#include <WLSSteppingActionMessenger.hh>

Inheritance diagram for WLSSteppingActionMessenger:
G4UImessenger

Public Member Functions

 WLSSteppingActionMessenger (WLSSteppingAction *)
 
virtual ~WLSSteppingActionMessenger ()
 
virtual 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
 

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
 

Detailed Description

Definition at line 45 of file WLSSteppingActionMessenger.hh.

Constructor & Destructor Documentation

WLSSteppingActionMessenger::WLSSteppingActionMessenger ( WLSSteppingAction steppingaction)

Definition at line 42 of file WLSSteppingActionMessenger.cc.

References G4UIcommand::AvailableForStates(), G4State_Idle, G4UIcommand::SetGuidance(), G4UIcmdWithAnInteger::SetParameterName(), and G4UIcommand::SetRange().

43  : fSteppingAction (steppingaction)
44 {
45  fSteppingDir = new G4UIdirectory("/stepping/");
46  fSteppingDir->SetGuidance("stepping control");
47 
48  fSetBounceLimitCmd =
49  new G4UIcmdWithAnInteger("/stepping/setBounceLimit", this);
50  fSetBounceLimitCmd->
51  SetGuidance("Select the maximum number of allowed bounce");
52  fSetBounceLimitCmd->
53  SetGuidance("Set this number to zero if you don't want to limit");
54  fSetBounceLimitCmd->SetParameterName("limit",false);
55  fSetBounceLimitCmd->SetRange("limit>=0");
56  fSetBounceLimitCmd->AvailableForStates(G4State_Idle);
57 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:225
WLSSteppingActionMessenger::~WLSSteppingActionMessenger ( )
virtual

Definition at line 61 of file WLSSteppingActionMessenger.cc.

62 {
63  delete fSteppingDir;
64  delete fSetBounceLimitCmd;
65 }

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 69 of file WLSSteppingActionMessenger.cc.

References G4UIcmdWithAnInteger::GetNewIntValue().

71 {
72  if ( command == fSetBounceLimitCmd ) {
73 
74  fSteppingAction->
75  SetBounceLimit(G4UIcmdWithAnInteger::GetNewIntValue(newValue));
76  }
77 }
static G4int GetNewIntValue(const char *paramString)

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