Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // 26 // 27 // 27 // 28 // 28 // 29 // Created: Mar. 31, 2009 Akinori Kimura 29 // Created: Mar. 31, 2009 Akinori Kimura 30 // 30 // 31 #include "G4GMocrenMessenger.hh" 31 #include "G4GMocrenMessenger.hh" 32 32 33 #include "G4UIdirectory.hh" 33 #include "G4UIdirectory.hh" 34 #include "G4UIcmdWithABool.hh" 34 #include "G4UIcmdWithABool.hh" 35 #include "G4UIcmdWithAString.hh" 35 #include "G4UIcmdWithAString.hh" 36 #include "G4UIcmdWithoutParameter.hh" 36 #include "G4UIcmdWithoutParameter.hh" 37 #include "G4UIcommand.hh" 37 #include "G4UIcommand.hh" 38 #include "G4Tokenizer.hh" 38 #include "G4Tokenizer.hh" 39 39 40 #include <utility> << 41 << 42 G4GMocrenMessenger::G4GMocrenMessenger() 40 G4GMocrenMessenger::G4GMocrenMessenger() 43 : suffix (""), geometry(true), pointAttribut 41 : suffix (""), geometry(true), pointAttributes(false), solids(true), invisibles(true), 44 kgMocrenVolumeName("gMocrenVolume"), 42 kgMocrenVolumeName("gMocrenVolume"), 45 kgMocrenScoringMeshName("gMocrenScoringMes 43 kgMocrenScoringMeshName("gMocrenScoringMesh"), 46 kDrawVolumeGrid(false) { 44 kDrawVolumeGrid(false) { 47 45 48 kgMocrenDirectory = new G4UIdirectory("/vis/ 46 kgMocrenDirectory = new G4UIdirectory("/vis/gMocren/"); 49 kgMocrenDirectory->SetGuidance("gMocren comm 47 kgMocrenDirectory->SetGuidance("gMocren commands."); 50 48 51 setEventNumberSuffixCommand = new G4UIcmdWit 49 setEventNumberSuffixCommand = new G4UIcmdWithAString("/vis/gMocren/setEventNumberSuffix", this); 52 setEventNumberSuffixCommand->SetGuidance("Wr 50 setEventNumberSuffixCommand->SetGuidance("Write separate event files, appended with given suffix."); 53 setEventNumberSuffixCommand->SetGuidance("De 51 setEventNumberSuffixCommand->SetGuidance("Define the suffix with a pattern such as '-0000'."); 54 setEventNumberSuffixCommand->SetParameterNam 52 setEventNumberSuffixCommand->SetParameterName("suffix",false); 55 setEventNumberSuffixCommand->SetDefaultValue 53 setEventNumberSuffixCommand->SetDefaultValue(""); 56 setEventNumberSuffixCommand->AvailableForSta 54 setEventNumberSuffixCommand->AvailableForStates(G4State_Idle); 57 55 58 appendGeometryCommand = new G4UIcmdWithABool 56 appendGeometryCommand = new G4UIcmdWithABool("/vis/gMocren/appendGeometry", this); 59 appendGeometryCommand->SetGuidance("Appends 57 appendGeometryCommand->SetGuidance("Appends copy of geometry to every event."); 60 appendGeometryCommand->SetParameterName("fla 58 appendGeometryCommand->SetParameterName("flag",false); 61 appendGeometryCommand->SetDefaultValue(true) 59 appendGeometryCommand->SetDefaultValue(true); 62 appendGeometryCommand->AvailableForStates(G4 60 appendGeometryCommand->AvailableForStates(G4State_Idle); 63 61 64 addPointAttributesCommand = new G4UIcmdWithA 62 addPointAttributesCommand = new G4UIcmdWithABool("/vis/gMocren/addPointAttributes", this); 65 addPointAttributesCommand->SetGuidance("Adds 63 addPointAttributesCommand->SetGuidance("Adds point attributes to the points of trajectories."); 66 addPointAttributesCommand->SetParameterName( 64 addPointAttributesCommand->SetParameterName("flag",false); 67 addPointAttributesCommand->SetDefaultValue(f 65 addPointAttributesCommand->SetDefaultValue(false); 68 addPointAttributesCommand->AvailableForState 66 addPointAttributesCommand->AvailableForStates(G4State_Idle); 69 67 70 useSolidsCommand = new G4UIcmdWithABool("/vi 68 useSolidsCommand = new G4UIcmdWithABool("/vis/gMocren/useSolids", this); 71 useSolidsCommand->SetGuidance("Use GMocren S 69 useSolidsCommand->SetGuidance("Use GMocren Solids, rather than Geant4 Primitives."); 72 useSolidsCommand->SetParameterName("flag",fa 70 useSolidsCommand->SetParameterName("flag",false); 73 useSolidsCommand->SetDefaultValue(true); 71 useSolidsCommand->SetDefaultValue(true); 74 useSolidsCommand->AvailableForStates(G4State 72 useSolidsCommand->AvailableForStates(G4State_Idle); 75 73 76 /* Not Enabled Yet 74 /* Not Enabled Yet 77 writeInvisiblesCommand = new G4UIcmdWithA 75 writeInvisiblesCommand = new G4UIcmdWithABool("/vis/gMocren/writeInvisibles", this); 78 writeInvisiblesCommand->SetGuidance("Writ 76 writeInvisiblesCommand->SetGuidance("Write invisible objects."); 79 writeInvisiblesCommand->SetParameterName( 77 writeInvisiblesCommand->SetParameterName("flag",false); 80 writeInvisiblesCommand->SetDefaultValue(t 78 writeInvisiblesCommand->SetDefaultValue(true); 81 writeInvisiblesCommand->AvailableForState 79 writeInvisiblesCommand->AvailableForStates(G4State_Idle); 82 */ 80 */ 83 81 84 kSetgMocrenVolumeNameCommand = new G4UIcmdWi 82 kSetgMocrenVolumeNameCommand = new G4UIcmdWithAString("/vis/gMocren/setVolumeName", this); 85 kSetgMocrenVolumeNameCommand->SetGuidance("d 83 kSetgMocrenVolumeNameCommand->SetGuidance("detector name for a volume data in gMocren data."); 86 kSetgMocrenVolumeNameCommand->SetParameterNa 84 kSetgMocrenVolumeNameCommand->SetParameterName("kgMocrenVolumeName",false); 87 kSetgMocrenVolumeNameCommand->SetDefaultValu 85 kSetgMocrenVolumeNameCommand->SetDefaultValue("gMocrenVolume"); 88 kSetgMocrenVolumeNameCommand->AvailableForSt 86 kSetgMocrenVolumeNameCommand->AvailableForStates(G4State_Idle); 89 87 90 kAddgMocrenHitNameCommand = new G4UIcmdWithA 88 kAddgMocrenHitNameCommand = new G4UIcmdWithAString("/vis/gMocren/addHitName", this); 91 kAddgMocrenHitNameCommand->SetGuidance("hit 89 kAddgMocrenHitNameCommand->SetGuidance("hit name for a dose distribution in gMocren data."); 92 kAddgMocrenHitNameCommand->SetParameterName( 90 kAddgMocrenHitNameCommand->SetParameterName("kgMocrenHitName",false); 93 kAddgMocrenHitNameCommand->AvailableForState 91 kAddgMocrenHitNameCommand->AvailableForStates(G4State_Idle); 94 92 95 kResetgMocrenHitNameCommand = new G4UIcmdWit 93 kResetgMocrenHitNameCommand = new G4UIcmdWithoutParameter("/vis/gMocren/resetHitNames", this); 96 kResetgMocrenHitNameCommand->SetGuidance("re 94 kResetgMocrenHitNameCommand->SetGuidance("reset all hit names."); 97 kResetgMocrenHitNameCommand->AvailableForSta 95 kResetgMocrenHitNameCommand->AvailableForStates(G4State_Idle); 98 96 99 kSetgMocrenScoringMeshNameCommand = new G4UI 97 kSetgMocrenScoringMeshNameCommand = new G4UIcmdWithAString("/vis/gMocren/setScoringMeshName", this); 100 kSetgMocrenScoringMeshNameCommand->SetGuidan 98 kSetgMocrenScoringMeshNameCommand->SetGuidance("scoring mesh name for a dose distribution in gMocren data."); 101 kSetgMocrenScoringMeshNameCommand->SetParame 99 kSetgMocrenScoringMeshNameCommand->SetParameterName("kgMocrenScoringMeshName",false); 102 kSetgMocrenScoringMeshNameCommand->SetDefaul 100 kSetgMocrenScoringMeshNameCommand->SetDefaultValue("gMocrenScoringMesh"); 103 kSetgMocrenScoringMeshNameCommand->Available 101 kSetgMocrenScoringMeshNameCommand->AvailableForStates(G4State_Idle); 104 102 105 kAddgMocrenHitScorerNameCommand = new G4UIcm 103 kAddgMocrenHitScorerNameCommand = new G4UIcmdWithAString("/vis/gMocren/addHitScorerName", this); 106 kAddgMocrenHitScorerNameCommand->SetGuidance 104 kAddgMocrenHitScorerNameCommand->SetGuidance("hit scorer name for a dose distribution in gMocren data."); 107 kAddgMocrenHitScorerNameCommand->SetParamete 105 kAddgMocrenHitScorerNameCommand->SetParameterName("kgMocrenHitScorerNames",false); 108 kAddgMocrenHitScorerNameCommand->AvailableFo 106 kAddgMocrenHitScorerNameCommand->AvailableForStates(G4State_Idle); 109 107 110 kResetgMocrenHitScorerNameCommand = new G4UI 108 kResetgMocrenHitScorerNameCommand = new G4UIcmdWithoutParameter("/vis/gMocren/resetHitScorerName", this); 111 kResetgMocrenHitScorerNameCommand->SetGuidan 109 kResetgMocrenHitScorerNameCommand->SetGuidance("reset all hit scorer names."); 112 kResetgMocrenHitScorerNameCommand->Available 110 kResetgMocrenHitScorerNameCommand->AvailableForStates(G4State_Idle); 113 111 114 kSetgMocrenNoVoxelsCommand = new G4UIcommand 112 kSetgMocrenNoVoxelsCommand = new G4UIcommand("/vis/gMocren/setNumberOfVoxels", this); 115 kSetgMocrenNoVoxelsCommand->SetGuidance("set 113 kSetgMocrenNoVoxelsCommand->SetGuidance("set number of voxels."); 116 kSetgMocrenNoVoxelsCommand->AvailableForStat 114 kSetgMocrenNoVoxelsCommand->AvailableForStates(G4State_Idle); 117 G4UIparameter * param = new G4UIparameter("n 115 G4UIparameter * param = new G4UIparameter("nX", 'i', false); 118 param->SetDefaultValue("1"); 116 param->SetDefaultValue("1"); 119 param->SetParameterRange("nX>0"); 117 param->SetParameterRange("nX>0"); 120 kSetgMocrenNoVoxelsCommand->SetParameter(par 118 kSetgMocrenNoVoxelsCommand->SetParameter(param); 121 param = new G4UIparameter("nY", 'i', false); 119 param = new G4UIparameter("nY", 'i', false); 122 param->SetDefaultValue("1"); 120 param->SetDefaultValue("1"); 123 param->SetParameterRange("nY>0"); 121 param->SetParameterRange("nY>0"); 124 kSetgMocrenNoVoxelsCommand->SetParameter(par 122 kSetgMocrenNoVoxelsCommand->SetParameter(param); 125 param = new G4UIparameter("nZ", 'i', false); 123 param = new G4UIparameter("nZ", 'i', false); 126 param->SetDefaultValue("1"); 124 param->SetDefaultValue("1"); 127 param->SetParameterRange("nZ>0"); 125 param->SetParameterRange("nZ>0"); 128 kSetgMocrenNoVoxelsCommand->SetParameter(par 126 kSetgMocrenNoVoxelsCommand->SetParameter(param); 129 127 130 kListgMocrenCommand = new G4UIcmdWithoutPara 128 kListgMocrenCommand = new G4UIcmdWithoutParameter("/vis/gMocren/list", this); 131 kListgMocrenCommand->SetGuidance("list gMocr 129 kListgMocrenCommand->SetGuidance("list gMocren command parameters."); 132 kListgMocrenCommand->AvailableForStates(G4St 130 kListgMocrenCommand->AvailableForStates(G4State_Idle); 133 131 134 kDrawVolumeGridCommand = new G4UIcmdWithABoo 132 kDrawVolumeGridCommand = new G4UIcmdWithABool("/vis/gMocren/drawVolumeGrid", this); 135 kDrawVolumeGridCommand->SetGuidance("Add gri 133 kDrawVolumeGridCommand->SetGuidance("Add grid of the volume."); 136 kDrawVolumeGridCommand->SetParameterName("kD 134 kDrawVolumeGridCommand->SetParameterName("kDrawVolumeGrid",false); 137 kDrawVolumeGridCommand->SetDefaultValue(fals 135 kDrawVolumeGridCommand->SetDefaultValue(false); 138 kDrawVolumeGridCommand->AvailableForStates(G 136 kDrawVolumeGridCommand->AvailableForStates(G4State_Idle); 139 137 140 } 138 } 141 139 142 G4GMocrenMessenger::~G4GMocrenMessenger() { 140 G4GMocrenMessenger::~G4GMocrenMessenger() { 143 delete setEventNumberSuffixCommand; 141 delete setEventNumberSuffixCommand; 144 delete appendGeometryCommand; 142 delete appendGeometryCommand; 145 delete addPointAttributesCommand; 143 delete addPointAttributesCommand; 146 delete useSolidsCommand; 144 delete useSolidsCommand; 147 // delete writeInvisiblesCommand; 145 // delete writeInvisiblesCommand; 148 delete kSetgMocrenVolumeNameCommand; 146 delete kSetgMocrenVolumeNameCommand; 149 delete kAddgMocrenHitNameCommand; 147 delete kAddgMocrenHitNameCommand; 150 delete kResetgMocrenHitNameCommand; 148 delete kResetgMocrenHitNameCommand; 151 // 149 // 152 delete kSetgMocrenScoringMeshNameCommand; 150 delete kSetgMocrenScoringMeshNameCommand; 153 delete kAddgMocrenHitScorerNameCommand; 151 delete kAddgMocrenHitScorerNameCommand; 154 delete kResetgMocrenHitScorerNameCommand; 152 delete kResetgMocrenHitScorerNameCommand; 155 // 153 // 156 delete kSetgMocrenNoVoxelsCommand; 154 delete kSetgMocrenNoVoxelsCommand; 157 // 155 // 158 delete kgMocrenDirectory; 156 delete kgMocrenDirectory; 159 // 157 // 160 delete kDrawVolumeGridCommand; 158 delete kDrawVolumeGridCommand; 161 } 159 } 162 160 163 G4String G4GMocrenMessenger::GetCurrentValue(G 161 G4String G4GMocrenMessenger::GetCurrentValue(G4UIcommand * command) { 164 if (command==setEventNumberSuffixCommand) { 162 if (command==setEventNumberSuffixCommand) { 165 return suffix; 163 return suffix; 166 } else if (command==appendGeometryCommand) { 164 } else if (command==appendGeometryCommand) { 167 return appendGeometryCommand->ConvertToStr 165 return appendGeometryCommand->ConvertToString(geometry); 168 } else if (command==addPointAttributesComman 166 } else if (command==addPointAttributesCommand) { 169 return addPointAttributesCommand->ConvertT 167 return addPointAttributesCommand->ConvertToString(pointAttributes); 170 } else if (command==useSolidsCommand) { 168 } else if (command==useSolidsCommand) { 171 return useSolidsCommand->ConvertToString(s 169 return useSolidsCommand->ConvertToString(solids); 172 // } else if (command==writeInvisiblesC 170 // } else if (command==writeInvisiblesCommand) { 173 // return writeInvisiblesCommand->C 171 // return writeInvisiblesCommand->ConvertToString(invisibles); 174 } else if (command == kSetgMocrenVolumeNameC 172 } else if (command == kSetgMocrenVolumeNameCommand) { 175 return kgMocrenVolumeName; 173 return kgMocrenVolumeName; 176 } else if (command == kAddgMocrenHitNameComm 174 } else if (command == kAddgMocrenHitNameCommand) { 177 G4String strval; 175 G4String strval; 178 std::vector<G4String>::iterator itr = kgMo 176 std::vector<G4String>::iterator itr = kgMocrenHitNames.begin(); 179 for(; itr != kgMocrenHitNames.end(); itr++ 177 for(; itr != kgMocrenHitNames.end(); itr++) { 180 strval += *itr; 178 strval += *itr; 181 strval += " "; 179 strval += " "; 182 } 180 } 183 return strval; 181 return strval; 184 } else if (command == kSetgMocrenScoringMesh 182 } else if (command == kSetgMocrenScoringMeshNameCommand) { 185 return kgMocrenScoringMeshName; 183 return kgMocrenScoringMeshName; 186 } else if (command == kAddgMocrenHitScorerNa 184 } else if (command == kAddgMocrenHitScorerNameCommand) { 187 G4String strval; 185 G4String strval; 188 std::vector<G4String>::iterator itr = kgMo 186 std::vector<G4String>::iterator itr = kgMocrenHitScorerNames.begin(); 189 for(; itr != kgMocrenHitScorerNames.end(); 187 for(; itr != kgMocrenHitScorerNames.end(); itr++) { 190 strval += *itr; 188 strval += *itr; 191 strval += " "; 189 strval += " "; 192 } 190 } 193 return strval; 191 return strval; 194 } else if (command==kDrawVolumeGridCommand) 192 } else if (command==kDrawVolumeGridCommand) { 195 return kDrawVolumeGridCommand->ConvertToSt 193 return kDrawVolumeGridCommand->ConvertToString(kDrawVolumeGrid); 196 } else { 194 } else { 197 return ""; 195 return ""; 198 } 196 } 199 } 197 } 200 198 201 void G4GMocrenMessenger::SetNewValue(G4UIcomma 199 void G4GMocrenMessenger::SetNewValue(G4UIcommand * command, G4String newValue) { 202 if (command==setEventNumberSuffixCommand) { 200 if (command==setEventNumberSuffixCommand) { 203 suffix = std::move(newValue); << 201 suffix = newValue; 204 } else if (command==appendGeometryCommand) { 202 } else if (command==appendGeometryCommand) { 205 geometry = appendGeometryCommand->GetNewBo 203 geometry = appendGeometryCommand->GetNewBoolValue(newValue); 206 } else if (command==addPointAttributesComman 204 } else if (command==addPointAttributesCommand) { 207 pointAttributes = addPointAttributesComman 205 pointAttributes = addPointAttributesCommand->GetNewBoolValue(newValue); 208 } else if (command==useSolidsCommand) { 206 } else if (command==useSolidsCommand) { 209 solids = useSolidsCommand->GetNewBoolValue 207 solids = useSolidsCommand->GetNewBoolValue(newValue); 210 // } else if (command==writeInvisiblesC 208 // } else if (command==writeInvisiblesCommand) { 211 // invisibles = writeInvisiblesComm 209 // invisibles = writeInvisiblesCommand->GetNewBoolValue(newValue); 212 } else if (command == kSetgMocrenVolumeNameC 210 } else if (command == kSetgMocrenVolumeNameCommand) { 213 kgMocrenVolumeName = std::move(newValue); << 211 kgMocrenVolumeName = newValue; 214 } else if (command == kAddgMocrenHitNameComm 212 } else if (command == kAddgMocrenHitNameCommand) { 215 kgMocrenHitNames.push_back(std::move(newVa << 213 kgMocrenHitNames.push_back(newValue); 216 } else if (command == kResetgMocrenHitNameCo 214 } else if (command == kResetgMocrenHitNameCommand) { 217 kgMocrenHitNames.clear(); 215 kgMocrenHitNames.clear(); 218 } else if (command == kSetgMocrenScoringMesh 216 } else if (command == kSetgMocrenScoringMeshNameCommand) { 219 kgMocrenScoringMeshName = std::move(newVal << 217 kgMocrenScoringMeshName = newValue; 220 } else if (command == kAddgMocrenHitScorerNa 218 } else if (command == kAddgMocrenHitScorerNameCommand) { 221 kgMocrenHitScorerNames.push_back(std::move << 219 kgMocrenHitScorerNames.push_back(newValue); 222 } else if (command == kResetgMocrenHitScorer 220 } else if (command == kResetgMocrenHitScorerNameCommand) { 223 kgMocrenHitScorerNames.clear(); 221 kgMocrenHitScorerNames.clear(); 224 } else if (command == kListgMocrenCommand) { 222 } else if (command == kListgMocrenCommand) { 225 list(); 223 list(); 226 } else if (command == kSetgMocrenNoVoxelsCom 224 } else if (command == kSetgMocrenNoVoxelsCommand) { 227 G4Tokenizer next(newValue); 225 G4Tokenizer next(newValue); 228 for(int i = 0; i < 3; i++) { 226 for(int i = 0; i < 3; i++) { 229 kgMocrenNoVoxels[i] = StoI(next()); 227 kgMocrenNoVoxels[i] = StoI(next()); 230 } 228 } 231 } else if (command==kDrawVolumeGridCommand) 229 } else if (command==kDrawVolumeGridCommand) { 232 kDrawVolumeGrid = kDrawVolumeGridCommand-> 230 kDrawVolumeGrid = kDrawVolumeGridCommand->GetNewBoolValue(newValue); 233 } 231 } 234 } 232 } 235 233 236 G4String G4GMocrenMessenger::getEventNumberSuf 234 G4String G4GMocrenMessenger::getEventNumberSuffix() { 237 return suffix; 235 return suffix; 238 } 236 } 239 237 240 G4bool G4GMocrenMessenger::appendGeometry() { 238 G4bool G4GMocrenMessenger::appendGeometry() { 241 return geometry; 239 return geometry; 242 } 240 } 243 241 244 G4bool G4GMocrenMessenger::addPointAttributes( 242 G4bool G4GMocrenMessenger::addPointAttributes() { 245 return pointAttributes; 243 return pointAttributes; 246 } 244 } 247 245 248 G4bool G4GMocrenMessenger::useSolids() { 246 G4bool G4GMocrenMessenger::useSolids() { 249 return solids; 247 return solids; 250 } 248 } 251 249 252 G4bool G4GMocrenMessenger::writeInvisibles() { 250 G4bool G4GMocrenMessenger::writeInvisibles() { 253 return invisibles; 251 return invisibles; 254 } 252 } 255 253 256 G4String G4GMocrenMessenger::getVolumeName() { 254 G4String G4GMocrenMessenger::getVolumeName() { 257 return kgMocrenVolumeName; 255 return kgMocrenVolumeName; 258 } 256 } 259 257 260 std::vector<G4String> G4GMocrenMessenger::getH 258 std::vector<G4String> G4GMocrenMessenger::getHitNames() { 261 return kgMocrenHitNames; 259 return kgMocrenHitNames; 262 } 260 } 263 261 264 G4String G4GMocrenMessenger::getScoringMeshNam 262 G4String G4GMocrenMessenger::getScoringMeshName() { 265 return kgMocrenScoringMeshName; 263 return kgMocrenScoringMeshName; 266 } 264 } 267 265 268 std::vector<G4String> G4GMocrenMessenger::getH 266 std::vector<G4String> G4GMocrenMessenger::getHitScorerNames() { 269 return kgMocrenHitScorerNames; 267 return kgMocrenHitScorerNames; 270 } 268 } 271 269 272 void G4GMocrenMessenger::list() { 270 void G4GMocrenMessenger::list() { 273 G4cout << " Current valuess of gMocren comm 271 G4cout << " Current valuess of gMocren command parameters:" << G4endl; 274 // 272 // 275 G4cout << " volume name: " << kgMo 273 G4cout << " volume name: " << kgMocrenVolumeName << G4endl; 276 // 274 // 277 G4cout << " hit names: "; 275 G4cout << " hit names: "; 278 if(kgMocrenHitNames.size() > 0) { 276 if(kgMocrenHitNames.size() > 0) { 279 std::vector<G4String>::iterator itr = kgMo 277 std::vector<G4String>::iterator itr = kgMocrenHitNames.begin(); 280 for(; itr != kgMocrenHitNames.end(); itr++ 278 for(; itr != kgMocrenHitNames.end(); itr++) 281 G4cout << *itr << " " << G4endl; 279 G4cout << *itr << " " << G4endl; 282 } else { 280 } else { 283 G4cout << G4endl; 281 G4cout << G4endl; 284 } 282 } 285 // 283 // 286 G4cout << " scoring mesh name: " << kgMo 284 G4cout << " scoring mesh name: " << kgMocrenScoringMeshName << G4endl; 287 // 285 // 288 G4cout << " scorer names: "; 286 G4cout << " scorer names: "; 289 if(kgMocrenHitScorerNames.size() > 0) { 287 if(kgMocrenHitScorerNames.size() > 0) { 290 std::vector<G4String>::iterator itr = kgMo 288 std::vector<G4String>::iterator itr = kgMocrenHitScorerNames.begin(); 291 for(; itr != kgMocrenHitScorerNames.end(); 289 for(; itr != kgMocrenHitScorerNames.end(); itr++) 292 G4cout << *itr << " " << G4endl; 290 G4cout << *itr << " " << G4endl; 293 } else { 291 } else { 294 G4cout << G4endl; 292 G4cout << G4endl; 295 } 293 } 296 G4cout << G4endl; 294 G4cout << G4endl; 297 } 295 } 298 296 299 void G4GMocrenMessenger::getNoVoxels(G4int & n 297 void G4GMocrenMessenger::getNoVoxels(G4int & nx, G4int & ny, G4int & nz) const { 300 nx = kgMocrenNoVoxels[0]; 298 nx = kgMocrenNoVoxels[0]; 301 ny = kgMocrenNoVoxels[1]; 299 ny = kgMocrenNoVoxels[1]; 302 nz = kgMocrenNoVoxels[2]; 300 nz = kgMocrenNoVoxels[2]; 303 } 301 } 304 302