#include <G4ASCIITreeMessenger.hh>
Inheritance diagram for G4ASCIITreeMessenger:
Public Member Functions | |
G4ASCIITreeMessenger (G4ASCIITree *) | |
virtual | ~G4ASCIITreeMessenger () |
G4String | GetCurrentValue (G4UIcommand *command) |
void | SetNewValue (G4UIcommand *command, G4String newValue) |
Static Public Attributes | |
static std::vector< G4String > | fVerbosityGuidance |
Definition at line 47 of file G4ASCIITreeMessenger.hh.
G4ASCIITreeMessenger::G4ASCIITreeMessenger | ( | G4ASCIITree * | ) |
Definition at line 45 of file G4ASCIITreeMessenger.cc.
00045 : 00046 fpASCIITree(ASCIITree) { 00047 00048 G4bool omitable; 00049 00050 fpDirectory = new G4UIdirectory ("/vis/ASCIITree/"); 00051 fpDirectory -> SetGuidance ("Commands for ASCIITree control."); 00052 00053 fpDirectorySet = new G4UIdirectory ("/vis/ASCIITree/set/"); 00054 fpDirectorySet -> SetGuidance ("Settings for ASCIITree control."); 00055 00056 fpCommandVerbose = new G4UIcmdWithAnInteger ("/vis/ASCIITree/verbose", this); 00057 fVerbosityGuidance.push_back 00058 (" < 10: - does not print daughters of repeated placements," 00059 " does not repeat replicas."); 00060 fVerbosityGuidance.push_back 00061 (" >= 10: prints all physical volumes."); 00062 fVerbosityGuidance.push_back 00063 ("The level of detail is given by verbosity%10:"); 00064 fVerbosityGuidance.push_back 00065 ("for each volume:"); 00066 fVerbosityGuidance.push_back 00067 (" >= 0: physical volume name."); 00068 fVerbosityGuidance.push_back 00069 (" >= 1: logical volume name (and names of sensitive detector" 00070 " and readout geometry, if any)."); 00071 fVerbosityGuidance.push_back 00072 (" >= 2: solid name and type."); 00073 fVerbosityGuidance.push_back 00074 (" >= 3: volume and density."); 00075 fVerbosityGuidance.push_back 00076 (" >= 5: daughter-subtracted volume and mass."); 00077 fVerbosityGuidance.push_back 00078 ("and in the summary at the end of printing:"); 00079 fVerbosityGuidance.push_back 00080 (" >= 4: daughter-included mass of top physical volume(s) in scene" 00081 " to depth specified."); 00082 fVerbosityGuidance.push_back 00083 ("Note: by default, culling is switched off so all volumes are seen."); 00084 fVerbosityGuidance.push_back 00085 ("Note: the mass calculation takes into account daughters, which can be" 00086 " time consuming. If you want the mass of a particular subtree to a" 00087 " particular depth:"); 00088 fVerbosityGuidance.push_back 00089 (" /vis/open ATree"); 00090 fVerbosityGuidance.push_back 00091 (" /vis/ASCIITree/verbose 14"); 00092 fVerbosityGuidance.push_back 00093 (" /vis/scene/create"); 00094 fVerbosityGuidance.push_back 00095 (" /vis/scene/add/volume <subtree-physical-volume> ! <depth>"); 00096 fVerbosityGuidance.push_back 00097 (" /vis/sceneHandler/attach"); 00098 fVerbosityGuidance.push_back 00099 (" /vis/viewer/flush"); 00100 for (size_t i = 0; i < fVerbosityGuidance.size(); ++i) { 00101 fpCommandVerbose -> SetGuidance(fVerbosityGuidance[i]); 00102 } 00103 fpCommandVerbose -> SetParameterName ("verbosity",omitable = true); 00104 fpCommandVerbose -> SetDefaultValue(0); 00105 00106 fpCommandSetOutFile = new G4UIcmdWithAString ("/vis/ASCIITree/set/outFile", this 00107 ); 00108 fpCommandSetOutFile -> SetGuidance ("Set name of output file."); 00109 fpCommandSetOutFile -> SetParameterName ("out-filename", 00110 omitable = true); 00111 fpCommandSetOutFile -> SetDefaultValue ("G4cout"); 00112 }
G4ASCIITreeMessenger::~G4ASCIITreeMessenger | ( | ) | [virtual] |
Definition at line 114 of file G4ASCIITreeMessenger.cc.
00114 { 00115 delete fpCommandSetOutFile; 00116 delete fpDirectorySet; 00117 delete fpCommandVerbose; 00118 delete fpDirectory; 00119 }
G4String G4ASCIITreeMessenger::GetCurrentValue | ( | G4UIcommand * | command | ) | [virtual] |
void G4ASCIITreeMessenger::SetNewValue | ( | G4UIcommand * | command, | |
G4String | newValue | |||
) | [virtual] |
Reimplemented from G4UImessenger.
Definition at line 126 of file G4ASCIITreeMessenger.cc.
References G4cout, and G4endl.
00127 { 00128 if (command == fpCommandVerbose) 00129 { 00130 fpASCIITree->SetVerbosity 00131 (fpCommandVerbose->GetNewIntValue(newValue)); 00132 G4cout << "G4ASCIITree verbosity now " 00133 << fpASCIITree->GetVerbosity() 00134 << G4endl; 00135 } 00136 else if (command == fpCommandSetOutFile) 00137 { 00138 fpASCIITree -> SetOutFileName (newValue); 00139 G4cout << "G4ASCIITree out filename now " 00140 << fpASCIITree -> GetOutFileName() 00141 << G4endl; 00142 } 00143 }
std::vector< G4String > G4ASCIITreeMessenger::fVerbosityGuidance [static] |
Definition at line 53 of file G4ASCIITreeMessenger.hh.
Referenced by G4ASCIITreeSceneHandler::WriteHeader().