46 fpASCIITree(ASCIITree) {
51 fpDirectory -> SetGuidance (
"Commands for ASCIITree control.");
54 fpDirectorySet -> SetGuidance (
"Settings for ASCIITree control.");
57 fVerbosityGuidance.push_back
58 (
" < 10: notifies but does not print details of repeated volumes.");
59 fVerbosityGuidance.push_back
60 (
" >= 10: prints all physical volumes (touchables).");
61 fVerbosityGuidance.push_back
62 (
"The level of detail is given by verbosity%10:");
63 fVerbosityGuidance.push_back
64 (
" >= 0: physical volume name.");
65 fVerbosityGuidance.push_back
66 (
" >= 1: logical volume name (and names of sensitive detector"
67 " and readout geometry, if any).");
68 fVerbosityGuidance.push_back
69 (
" >= 2: solid name and type.");
70 fVerbosityGuidance.push_back
71 (
" >= 3: volume and density.");
72 fVerbosityGuidance.push_back
73 (
" >= 5: daughter-subtracted volume and mass.");
74 fVerbosityGuidance.push_back
75 (
" >= 6: physical volume dump.");
76 fVerbosityGuidance.push_back
77 (
" >= 7: polyhedron dump.");
78 fVerbosityGuidance.push_back
79 (
"and in the summary at the end of printing:");
80 fVerbosityGuidance.push_back
81 (
" >= 4: daughter-included mass of top physical volume(s) in scene"
82 " to depth specified.");
83 fVerbosityGuidance.push_back
84 (
"Note: by default, culling is switched off so all volumes are seen.");
85 fVerbosityGuidance.push_back
86 (
"Note: the mass calculation takes into account daughters, which can be"
87 " time consuming. If you want the mass of a particular subtree try:");
88 fVerbosityGuidance.push_back
89 (
" /vis/drawTree <subtree-physical-volume-name>");
90 fVerbosityGuidance.push_back
91 (
"Or if you want more control, for example:");
92 fVerbosityGuidance.push_back
94 fVerbosityGuidance.push_back
95 (
" /vis/ASCIITree/verbose 14");
96 fVerbosityGuidance.push_back
97 (
" /vis/scene/create");
98 fVerbosityGuidance.push_back
99 (
" /vis/scene/add/volume <subtree-physical-volume-name> ! <depth>");
100 fVerbosityGuidance.push_back
101 (
" /vis/sceneHandler/attach");
102 fVerbosityGuidance.push_back
103 (
" /vis/viewer/flush");
104 fVerbosityGuidance.push_back
105 (
"Note: dumping the physical volumes produces a lot of output. It is"
106 " advisable to select the volume of interest, as for a sub-tree above.");
107 for (
size_t i = 0; i < fVerbosityGuidance.size(); ++i) {
108 fpCommandVerbose -> SetGuidance(fVerbosityGuidance[i]);
110 fpCommandVerbose -> SetParameterName (
"verbosity",omitable =
true);
111 fpCommandVerbose -> SetDefaultValue(1);
115 fpCommandSetOutFile -> SetGuidance (
"Set name of output file.");
116 fpCommandSetOutFile -> SetParameterName (
"out-filename",
118 fpCommandSetOutFile -> SetDefaultValue (
"G4cout");
135 if (command == fpCommandVerbose)
137 fpASCIITree->SetVerbosity
138 (fpCommandVerbose->GetNewIntValue(newValue));
139 G4cout <<
"G4ASCIITree verbosity now "
140 << fpASCIITree->GetVerbosity()
143 else if (command == fpCommandSetOutFile)
145 fpASCIITree -> SetOutFileName (newValue);
146 G4cout <<
"G4ASCIITree out filename now "
147 << fpASCIITree -> GetOutFileName()
virtual ~G4ASCIITreeMessenger()
G4ASCIITreeMessenger(G4ASCIITree *)
G4String GetCurrentValue(G4UIcommand *command)
G4UIcmdWithAString * fpCommandSetOutFile
G4UIcommand * fpDirectorySet
void SetNewValue(G4UIcommand *command, G4String newValue)
G4GLOB_DLL std::ostream G4cout
static std::vector< G4String > fVerbosityGuidance
G4UIcmdWithAnInteger * fpCommandVerbose
G4UIcommand * fpDirectory