Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HadrontherapyParameterMessenger Class Reference

#include <HadrontherapyParameterMessenger.hh>

Inheritance diagram for HadrontherapyParameterMessenger:
Collaboration diagram for HadrontherapyParameterMessenger:

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
 
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 40 of file HadrontherapyParameterMessenger.hh.

Constructor & Destructor Documentation

HadrontherapyParameterMessenger::HadrontherapyParameterMessenger ( HadrontherapyInteractionParameters param)

Definition at line 36 of file HadrontherapyParameterMessenger.cc.

37 :pParam(param)
38 {
39  paramDir = new G4UIdirectory("/parameter/");
40  paramDir -> SetGuidance("Commands to generate stopping power and range");
41 
42  dedxCmd = new G4UIcmdWithAString("/parameter/getstopping",this);
43  dedxCmd->SetGuidance("Get mass stopping powers"
44  "\n[usage]: /parameter/getstopping Material [Emin] [Emax] [N] [Particle] [File]"
45  "\n Material:(string) Material name, like G4_H, G4_WATER,..., look at /parameter/nist"
46  "\n Emin Emax:(double) minimum and maximum kinetic energy (MeV)"
47  "\n N:(double) [number of points]"
48  "\n Particle:(string) Particle name, look at /particle/list"
49  "\n File:(string) Name for the output file."
50  "\nDefault values for parameters inside [] are respectively:"
51  "\n \"1 MeV\", \"Emin\", \"1\", \"proton\", \"stdout\"");
52  dedxCmd->SetParameterName("inputData",false);
54 
55  listCmd = new G4UIcmdWithAString("/parameter/nist",this);
56  listCmd -> SetGuidance("Print NIST elements/materials.\nParameters:"
57  "\n\t all: will print elements and compounds"
58  "\n\t simple: will print elements only"
59  "\n\t compound: will print compounds only"
60  "\n\t hep: will print hep compounds"
61  "\n\t list: will print a simple full list of all elements and compounds");
62  listCmd -> SetParameterName("String",true);
63  listCmd -> SetDefaultValue("list");
64  listCmd -> SetCandidates("all simple compound hep list");
65  listCmd ->AvailableForStates(G4State_Idle);
66  //Available G4 States (G4State_PreInit, G4State_Init, G4State_Idle,G4State_GeomClosed, G4State_EventProc);
67 }
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:240

Here is the call graph for this function:

HadrontherapyParameterMessenger::~HadrontherapyParameterMessenger ( )

Definition at line 68 of file HadrontherapyParameterMessenger.cc.

69 {
70  delete paramDir;
71  delete dedxCmd;
72  delete listCmd;
73 }

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 75 of file HadrontherapyParameterMessenger.cc.

76 {
77  if (command == dedxCmd)
78  {
79  pParam -> GetStoppingTable(vararg);
80  }
81  else if (command == listCmd)
82  {
83  pParam -> ListOfNistMaterials(vararg);
84  }
85 }

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