File indexing completed on 2025-10-30 07:59:08
0001 
0002 
0003 
0004 
0005 
0006 
0007 
0008 
0009 
0010 
0011 
0012 
0013 
0014 
0015 
0016 
0017 
0018 
0019 
0020 
0021 
0022 
0023 
0024 
0025 
0026 
0027 
0028 
0029 #include "ICRP110PhantomMessenger.hh"
0030 #include "ICRP110PhantomConstruction.hh"
0031 #include "G4UIdirectory.hh"
0032 #include "G4UIcmdWithAString.hh"
0033 
0034 ICRP110PhantomMessenger::ICRP110PhantomMessenger(ICRP110PhantomConstruction* myUsrPhtm)
0035   :fUserPhantom(myUsrPhtm)
0036 { 
0037   fPhantomDir = new G4UIdirectory("/phantom/");
0038   fPhantomDir -> SetGuidance("Set Your Phantom.");
0039   
0040   fSexCmd = new G4UIcmdWithAString("/phantom/setPhantomSex",this);
0041   fSexCmd -> SetGuidance("Set sex of Phantom: Male or Female.");
0042   fSexCmd -> SetParameterName("phantomSex",true);
0043   fSexCmd -> SetDefaultValue("female");
0044   fSexCmd -> SetCandidates("male female");
0045   fSexCmd -> AvailableForStates(G4State_PreInit,G4State_Idle); 
0046   
0047   fSectionCmd = new G4UIcmdWithAString("/phantom/setPhantomSection",this);
0048   fSectionCmd -> SetGuidance("Set section of Phantom: head, trunk or full");
0049   fSectionCmd -> SetParameterName("phantomSection",true);
0050   fSectionCmd -> SetDefaultValue("head");
0051   fSectionCmd -> SetCandidates("head trunk full");
0052   fSectionCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);  
0053 }
0054 
0055 ICRP110PhantomMessenger::~ICRP110PhantomMessenger()
0056 {
0057   delete  fSexCmd;
0058   delete  fSectionCmd;
0059   delete  fPhantomDir;
0060 }
0061 
0062 void ICRP110PhantomMessenger::SetNewValue(G4UIcommand* command,G4String newValue){ 
0063      
0064   if( command == fSexCmd )
0065     { 
0066       fUserPhantom -> SetPhantomSex(newValue);
0067       
0068     }
0069   if( command == fSectionCmd )
0070     {
0071       fUserPhantom -> SetPhantomSection(newValue);
0072       
0073     }
0074 }
0075 
0076 
0077