#include <G4NistMessenger.hh>
Inheritance diagram for G4NistMessenger:
Public Member Functions | |
G4NistMessenger (G4NistManager *) | |
virtual | ~G4NistMessenger () |
void | SetNewValue (G4UIcommand *, G4String) |
Definition at line 81 of file G4NistMessenger.hh.
G4NistMessenger::G4NistMessenger | ( | G4NistManager * | ) |
Definition at line 56 of file G4NistMessenger.cc.
References G4UIcmdWithAString::SetCandidates(), G4UIcmdWithAnInteger::SetDefaultValue(), G4UIcmdWithAString::SetDefaultValue(), G4UIcommand::SetGuidance(), G4UIcmdWithAnInteger::SetParameterName(), G4UIcmdWithAString::SetParameterName(), and G4UIcommand::SetRange().
00057 :manager(man) 00058 { 00059 matDir = new G4UIdirectory("/material/"); 00060 matDir->SetGuidance("Commands for materials"); 00061 00062 verCmd = new G4UIcmdWithAnInteger("/material/verbose",this); 00063 verCmd->SetGuidance("Set verbose level."); 00064 00065 nistDir = new G4UIdirectory("/material/nist/"); 00066 nistDir->SetGuidance("Commands for the nist dataBase"); 00067 00068 prtElmCmd = new G4UIcmdWithAString("/material/nist/printElement",this); 00069 prtElmCmd->SetGuidance("print element(s) in dataBase."); 00070 prtElmCmd->SetGuidance("symbol = element."); 00071 prtElmCmd->SetGuidance("all = all elements."); 00072 prtElmCmd->SetParameterName("symbol", true); 00073 prtElmCmd->SetDefaultValue("all"); 00074 00075 przElmCmd = new G4UIcmdWithAnInteger("/material/nist/printElementZ",this); 00076 przElmCmd->SetGuidance("print element Z in dataBase."); 00077 przElmCmd->SetGuidance("0 = all elements."); 00078 przElmCmd->SetParameterName("Z", true); 00079 przElmCmd->SetDefaultValue(0); 00080 przElmCmd->SetRange("0<=Z && Z<108"); 00081 00082 lisMatCmd = new G4UIcmdWithAString("/material/nist/listMaterials",this); 00083 lisMatCmd->SetGuidance("list materials in Geant4 dataBase."); 00084 lisMatCmd->SetGuidance("simple - simple NIST materials."); 00085 lisMatCmd->SetGuidance("compound - compound NIST materials."); 00086 lisMatCmd->SetGuidance("hep - HEP materials."); 00087 lisMatCmd->SetGuidance("biomedical - biomedical materials."); 00088 lisMatCmd->SetGuidance("all - list of all Geant4 materials."); 00089 lisMatCmd->SetParameterName("list", true); 00090 lisMatCmd->SetCandidates("simple compound hep all"); 00091 lisMatCmd->SetDefaultValue("all"); 00092 00093 g4Dir = new G4UIdirectory("/material/g4/"); 00094 g4Dir->SetGuidance("Commands for G4MaterialTable"); 00095 00096 g4ElmCmd = new G4UIcmdWithAString("/material/g4/printElement",this); 00097 g4ElmCmd->SetGuidance("print Element from G4ElementTable."); 00098 g4ElmCmd->SetGuidance("all - all elements."); 00099 g4ElmCmd->SetParameterName("elm", true); 00100 g4ElmCmd->SetDefaultValue("all"); 00101 00102 g4MatCmd = new G4UIcmdWithAString("/material/g4/printMaterial",this); 00103 g4MatCmd->SetGuidance("print Material from G4MaterialTable."); 00104 g4MatCmd->SetGuidance("all - all materials"); 00105 g4MatCmd->SetParameterName("mat", true); 00106 g4MatCmd->SetDefaultValue("all"); 00107 00108 g4DensCmd = new G4UIcmdWithAString("/material/g4/printDensityEffParam",this); 00109 g4DensCmd->SetGuidance("print Material from G4DensityEffectData."); 00110 g4DensCmd->SetGuidance("all - all materials"); 00111 g4DensCmd->SetParameterName("mat", true); 00112 g4DensCmd->SetDefaultValue("all"); 00113 }
G4NistMessenger::~G4NistMessenger | ( | ) | [virtual] |
Definition at line 117 of file G4NistMessenger.cc.
00118 { 00119 delete verCmd; 00120 delete prtElmCmd; 00121 delete przElmCmd; 00122 delete lisMatCmd; 00123 delete nistDir; 00124 00125 delete g4ElmCmd; 00126 delete g4MatCmd; 00127 delete g4DensCmd; 00128 delete g4Dir; 00129 delete matDir; 00130 }
void G4NistMessenger::SetNewValue | ( | G4UIcommand * | , | |
G4String | ||||
) | [virtual] |
Reimplemented from G4UImessenger.
Definition at line 134 of file G4NistMessenger.cc.
References G4IonisParamMat::GetDensityEffectData(), G4UIcmdWithAnInteger::GetNewIntValue(), G4NistManager::ListMaterials(), G4DensityEffectData::PrintData(), G4NistManager::PrintElement(), G4NistManager::PrintG4Element(), G4NistManager::PrintG4Material(), and G4NistManager::SetVerbose().
00135 { 00136 if (command == verCmd) 00137 { manager->SetVerbose(verCmd->GetNewIntValue(newValue));} 00138 00139 else if (command == prtElmCmd) 00140 { manager->PrintElement(newValue);} 00141 00142 else if (command == przElmCmd) { 00143 G4int Z = przElmCmd->GetNewIntValue(newValue); 00144 if(Z >= 0 && Z < 108) { manager->PrintElement(Z); } 00145 } 00146 00147 else if (command == lisMatCmd) 00148 { manager->ListMaterials(newValue);} 00149 00150 else if (command == g4ElmCmd) 00151 { manager->PrintG4Element(newValue);} 00152 00153 else if (command == g4MatCmd) 00154 { manager->PrintG4Material(newValue);} 00155 00156 else if (command == g4DensCmd) 00157 { G4IonisParamMat::GetDensityEffectData()->PrintData(newValue); } 00158 }