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

#include <HadrontherapyParameterMessenger.hh>

Inheritance diagram for HadrontherapyParameterMessenger:
G4UImessenger

Public Member Functions

 HadrontherapyParameterMessenger (HadrontherapyInteractionParameters *)
 
 ~HadrontherapyParameterMessenger ()
 
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 47 of file HadrontherapyParameterMessenger.hh.

Constructor & Destructor Documentation

HadrontherapyParameterMessenger::HadrontherapyParameterMessenger ( HadrontherapyInteractionParameters param)

Definition at line 42 of file HadrontherapyParameterMessenger.cc.

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

43 :pParam(param)
44 {
45  paramDir = new G4UIdirectory("/parameter/");
46  paramDir -> SetGuidance("Commands to generate stopping power and range");
47 
48  dedxCmd = new G4UIcmdWithAString("/parameter/getstopping",this);
49  dedxCmd->SetGuidance("Get mass stopping powers"
50  "\n[usage]: /parameter/getstopping Material [Emin] [Emax] [N] [Particle] [File]"
51  "\n Material:(string) Material name, like G4_H, G4_WATER,..., look at /parameter/nist"
52  "\n Emin Emax:(double) minimum and maximum kinetic energy (MeV)"
53  "\n N:(double) [number of points]"
54  "\n Particle:(string) Particle name, look at /particle/list"
55  "\n File:(string) Name for the output file."
56  "\nDefault values for parameters inside [] are respectively:"
57  "\n \"1 MeV\", \"Emin\", \"1\", \"proton\", \"stdout\"");
58  dedxCmd->SetParameterName("inputData",false);
60 
61  listCmd = new G4UIcmdWithAString("/parameter/nist",this);
62  listCmd -> SetGuidance("Print NIST elements/materials.\nParameters:"
63  "\n\t all: will print elements and compounds"
64  "\n\t simple: will print elements only"
65  "\n\t compound: will print compounds only"
66  "\n\t hep: will print hep compounds"
67  "\n\t list: will print a simple full list of all elements and compounds");
68  listCmd -> SetParameterName("String",true);
69  listCmd -> SetDefaultValue("list");
70  listCmd -> SetCandidates("all simple compound hep list");
71  listCmd ->AvailableForStates(G4State_Idle);
72  //Available G4 States (G4State_PreInit, G4State_Init, G4State_Idle,G4State_GeomClosed, G4State_EventProc);
73 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:225
HadrontherapyParameterMessenger::~HadrontherapyParameterMessenger ( )

Definition at line 74 of file HadrontherapyParameterMessenger.cc.

75 {
76  delete paramDir;
77  delete dedxCmd;
78  delete listCmd;
79 }

Member Function Documentation

void HadrontherapyParameterMessenger::SetNewValue ( G4UIcommand command,
G4String  vararg 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 81 of file HadrontherapyParameterMessenger.cc.

82 {
83  if (command == dedxCmd)
84  {
85  pParam -> GetStoppingTable(vararg);
86  }
87  else if (command == listCmd)
88  {
89  pParam -> ListOfNistMaterials(vararg);
90  }
91 }

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