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

#include <BrachyDetectorMessenger.hh>

Inheritance diagram for BrachyDetectorMessenger:
G4UImessenger

Public Member Functions

 BrachyDetectorMessenger (BrachyDetectorConstruction *)
 
 ~BrachyDetectorMessenger ()
 
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 BrachyDetectorMessenger.hh.

Constructor & Destructor Documentation

BrachyDetectorMessenger::BrachyDetectorMessenger ( BrachyDetectorConstruction Det)

Definition at line 47 of file BrachyDetectorMessenger.cc.

References G4State_Idle, and G4State_PreInit.

47  : detector(Det)
48 {
49  detectorDir = new G4UIdirectory("/phantom/");
50  detectorDir -> SetGuidance(" phantom control.");
51 
52  phantomMaterialCmd = new G4UIcmdWithAString("/phantom/selectMaterial",this);
53  phantomMaterialCmd -> SetGuidance("Select Material of the phantom.");
54  phantomMaterialCmd -> SetParameterName("choice",false);
55  phantomMaterialCmd -> AvailableForStates(G4State_Idle);
56 
57  sourceCmd = new G4UIcmdWithAString("/source/switch",this);
58  sourceCmd -> SetGuidance("Assign the selected geometry to G4RunManager.");
59  sourceCmd -> SetParameterName("choice",true);
60  sourceCmd -> SetDefaultValue(" ");
61  sourceCmd -> SetCandidates("Iridium Iodium Leipzig ");
62  sourceCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
63  }
BrachyDetectorMessenger::~BrachyDetectorMessenger ( )

Definition at line 65 of file BrachyDetectorMessenger.cc.

66 {
67  delete sourceCmd;
68  delete phantomMaterialCmd;
69  delete detectorDir;
70 }

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 72 of file BrachyDetectorMessenger.cc.

73 {
74  // Change the material of the phantom
75  if( command == phantomMaterialCmd )
76  { detector -> SetPhantomMaterial(newValue);}
77 
78  // Switch the source in the phantom
79  if( command == sourceCmd )
80  {
81  if(newValue=="Iodium" || newValue=="Iridium"|| newValue=="Leipzig")
82  {
83  detector -> SelectBrachytherapicSeed(newValue);
84  detector -> SwitchBrachytherapicSeed();
85  }
86  }
87 }

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