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