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