41 : suffix (
""), geometry(true), pointAttributes(false), solids(true), invisibles(true),
42 kgMocrenVolumeName(
"gMocrenVolume"),
43 kgMocrenScoringMeshName(
"gMocrenScoringMesh"),
44 kDrawVolumeGrid(false) {
47 kgMocrenDirectory->
SetGuidance(
"gMocren commands.");
49 setEventNumberSuffixCommand =
new G4UIcmdWithAString(
"/vis/gMocren/setEventNumberSuffix",
this);
50 setEventNumberSuffixCommand->
SetGuidance(
"Write separate event files, appended with given suffix.");
51 setEventNumberSuffixCommand->
SetGuidance(
"Define the suffix with a pattern such as '-0000'.");
56 appendGeometryCommand =
new G4UIcmdWithABool(
"/vis/gMocren/appendGeometry",
this);
57 appendGeometryCommand->
SetGuidance(
"Appends copy of geometry to every event.");
62 addPointAttributesCommand =
new G4UIcmdWithABool(
"/vis/gMocren/addPointAttributes",
this);
63 addPointAttributesCommand->
SetGuidance(
"Adds point attributes to the points of trajectories.");
69 useSolidsCommand->
SetGuidance(
"Use GMocren Solids, rather than Geant4 Primitives.");
82 kSetgMocrenVolumeNameCommand =
new G4UIcmdWithAString(
"/vis/gMocren/setVolumeName",
this);
83 kSetgMocrenVolumeNameCommand->
SetGuidance(
"detector name for a volume data in gMocren data.");
89 kAddgMocrenHitNameCommand->
SetGuidance(
"hit name for a dose distribution in gMocren data.");
94 kResetgMocrenHitNameCommand->
SetGuidance(
"reset all hit names.");
97 kSetgMocrenScoringMeshNameCommand =
new G4UIcmdWithAString(
"/vis/gMocren/setScoringMeshName",
this);
98 kSetgMocrenScoringMeshNameCommand->
SetGuidance(
"scoring mesh name for a dose distribution in gMocren data.");
99 kSetgMocrenScoringMeshNameCommand->
SetParameterName(
"kgMocrenScoringMeshName",
false);
100 kSetgMocrenScoringMeshNameCommand->
SetDefaultValue(
"gMocrenScoringMesh");
103 kAddgMocrenHitScorerNameCommand =
new G4UIcmdWithAString(
"/vis/gMocren/addHitScorerName",
this);
104 kAddgMocrenHitScorerNameCommand->
SetGuidance(
"hit scorer name for a dose distribution in gMocren data.");
105 kAddgMocrenHitScorerNameCommand->
SetParameterName(
"kgMocrenHitScorerNames",
false);
109 kResetgMocrenHitScorerNameCommand->
SetGuidance(
"reset all hit scorer names.");
112 kSetgMocrenNoVoxelsCommand =
new G4UIcommand(
"/vis/gMocren/setNumberOfVoxels",
this);
113 kSetgMocrenNoVoxelsCommand->
SetGuidance(
"set number of voxels.");
129 kListgMocrenCommand->
SetGuidance(
"list gMocren command parameters.");
132 kDrawVolumeGridCommand =
new G4UIcmdWithABool(
"/vis/gMocren/drawVolumeGrid",
this);
133 kDrawVolumeGridCommand->
SetGuidance(
"Add grid of the volume.");
141 delete setEventNumberSuffixCommand;
142 delete appendGeometryCommand;
143 delete addPointAttributesCommand;
144 delete useSolidsCommand;
146 delete kSetgMocrenVolumeNameCommand;
147 delete kAddgMocrenHitNameCommand;
148 delete kResetgMocrenHitNameCommand;
150 delete kSetgMocrenScoringMeshNameCommand;
151 delete kAddgMocrenHitScorerNameCommand;
152 delete kResetgMocrenHitScorerNameCommand;
154 delete kSetgMocrenNoVoxelsCommand;
156 delete kgMocrenDirectory;
158 delete kDrawVolumeGridCommand;
162 if (command==setEventNumberSuffixCommand) {
164 }
else if (command==appendGeometryCommand) {
166 }
else if (command==addPointAttributesCommand) {
168 }
else if (command==useSolidsCommand) {
172 }
else if (command == kSetgMocrenVolumeNameCommand) {
173 return kgMocrenVolumeName;
174 }
else if (command == kAddgMocrenHitNameCommand) {
176 std::vector<G4String>::iterator itr = kgMocrenHitNames.begin();
177 for(; itr != kgMocrenHitNames.end(); itr++) {
182 }
else if (command == kSetgMocrenScoringMeshNameCommand) {
183 return kgMocrenScoringMeshName;
184 }
else if (command == kAddgMocrenHitScorerNameCommand) {
186 std::vector<G4String>::iterator itr = kgMocrenHitScorerNames.begin();
187 for(; itr != kgMocrenHitScorerNames.end(); itr++) {
192 }
else if (command==kDrawVolumeGridCommand) {
200 if (command==setEventNumberSuffixCommand) {
202 }
else if (command==appendGeometryCommand) {
204 }
else if (command==addPointAttributesCommand) {
205 pointAttributes = addPointAttributesCommand->
GetNewBoolValue(newValue);
206 }
else if (command==useSolidsCommand) {
210 }
else if (command == kSetgMocrenVolumeNameCommand) {
211 kgMocrenVolumeName = newValue;
212 }
else if (command == kAddgMocrenHitNameCommand) {
213 kgMocrenHitNames.push_back(newValue);
214 }
else if (command == kResetgMocrenHitNameCommand) {
215 kgMocrenHitNames.clear();
216 }
else if (command == kSetgMocrenScoringMeshNameCommand) {
217 kgMocrenScoringMeshName = newValue;
218 }
else if (command == kAddgMocrenHitScorerNameCommand) {
219 kgMocrenHitScorerNames.push_back(newValue);
220 }
else if (command == kResetgMocrenHitScorerNameCommand) {
221 kgMocrenHitScorerNames.clear();
222 }
else if (command == kListgMocrenCommand) {
224 }
else if (command == kSetgMocrenNoVoxelsCommand) {
226 for(
int i = 0; i < 3; i++) {
227 kgMocrenNoVoxels[i] =
StoI(next());
229 }
else if (command==kDrawVolumeGridCommand) {
243 return pointAttributes;
255 return kgMocrenVolumeName;
259 return kgMocrenHitNames;
263 return kgMocrenScoringMeshName;
267 return kgMocrenHitScorerNames;
271 G4cout <<
" Current valuess of gMocren command parameters:" <<
G4endl;
273 G4cout <<
" volume name: " << kgMocrenVolumeName <<
G4endl;
276 if(kgMocrenHitNames.size() > 0) {
277 std::vector<G4String>::iterator itr = kgMocrenHitNames.begin();
278 for(; itr != kgMocrenHitNames.end(); itr++)
284 G4cout <<
" scoring mesh name: " << kgMocrenScoringMeshName <<
G4endl;
286 G4cout <<
" scorer names: ";
287 if(kgMocrenHitScorerNames.size() > 0) {
288 std::vector<G4String>::iterator itr = kgMocrenHitScorerNames.begin();
289 for(; itr != kgMocrenHitScorerNames.end(); itr++)
298 nx = kgMocrenNoVoxels[0];
299 ny = kgMocrenNoVoxels[1];
300 nz = kgMocrenNoVoxels[2];
G4GLOB_DLL std::ostream G4cout
virtual G4bool useSolids()
virtual std::vector< G4String > getHitNames()
virtual std::vector< G4String > getHitScorerNames()
virtual void getNoVoxels(G4int &nx, G4int &ny, G4int &nz) const
virtual G4bool appendGeometry()
virtual G4String GetCurrentValue(G4UIcommand *command)
virtual G4bool writeInvisibles()
virtual G4String getVolumeName()
virtual G4bool addPointAttributes()
virtual G4String getScoringMeshName()
virtual G4String getEventNumberSuffix()
virtual ~G4GMocrenMessenger()
virtual void SetNewValue(G4UIcommand *command, G4String newValue)
static G4bool GetNewBoolValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4bool defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(const char *defVal)
static G4String ConvertToString(G4bool boolVal)
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
void AvailableForStates(G4ApplicationState s1)
void SetDefaultValue(const char *theDefaultValue)
void SetParameterRange(const char *theRange)