Geant4  10.02.p03
IORTParameterMessenger Class Reference

#include <IORTParameterMessenger.hh>

Inheritance diagram for IORTParameterMessenger:
Collaboration diagram for IORTParameterMessenger:

Public Member Functions

 IORTParameterMessenger (IORTInteractionParameters *)
 
 ~IORTParameterMessenger ()
 
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
 

Private Attributes

IORTInteractionParameterspParam
 
G4UIdirectoryparamDir
 
G4UIcmdWithAStringdedxCmd
 
G4UIcmdWithAStringlistCmd
 

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 52 of file IORTParameterMessenger.hh.

Constructor & Destructor Documentation

◆ IORTParameterMessenger()

IORTParameterMessenger::IORTParameterMessenger ( IORTInteractionParameters param)

Definition at line 47 of file IORTParameterMessenger.cc.

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

◆ ~IORTParameterMessenger()

IORTParameterMessenger::~IORTParameterMessenger ( )

Definition at line 79 of file IORTParameterMessenger.cc.

80 {
81  delete paramDir;
82  delete dedxCmd;
83  delete listCmd;
84 }
G4UIcmdWithAString * listCmd
G4UIcmdWithAString * dedxCmd

Member Function Documentation

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 86 of file IORTParameterMessenger.cc.

87 {
88  if (command == dedxCmd)
89  {
90  pParam -> GetStoppingTable(vararg);
91  }
92  else if (command == listCmd)
93  {
94  pParam -> ListOfNistMaterials(vararg);
95  }
96 }
G4UIcmdWithAString * listCmd
IORTInteractionParameters * pParam
G4UIcmdWithAString * dedxCmd

Member Data Documentation

◆ dedxCmd

G4UIcmdWithAString* IORTParameterMessenger::dedxCmd
private

Definition at line 64 of file IORTParameterMessenger.hh.

◆ listCmd

G4UIcmdWithAString * IORTParameterMessenger::listCmd
private

Definition at line 64 of file IORTParameterMessenger.hh.

◆ paramDir

G4UIdirectory* IORTParameterMessenger::paramDir
private

Definition at line 63 of file IORTParameterMessenger.hh.

◆ pParam

IORTInteractionParameters* IORTParameterMessenger::pParam
private

Definition at line 61 of file IORTParameterMessenger.hh.


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