Geant4  10.02.p03
G4ASCIITreeMessenger Class Reference

#include <G4ASCIITreeMessenger.hh>

Inheritance diagram for G4ASCIITreeMessenger:
Collaboration diagram for G4ASCIITreeMessenger:

Public Member Functions

 G4ASCIITreeMessenger (G4ASCIITree *)
 
virtual ~G4ASCIITreeMessenger ()
 
G4String GetCurrentValue (G4UIcommand *command)
 
void SetNewValue (G4UIcommand *command, G4String newValue)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Static Public Attributes

static std::vector< G4StringfVerbosityGuidance
 

Private Attributes

G4ASCIITreefpASCIITree
 
G4UIcommandfpDirectory
 
G4UIcommandfpDirectorySet
 
G4UIcmdWithAnIntegerfpCommandVerbose
 
G4UIcmdWithAStringfpCommandSetOutFile
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 

Detailed Description

Definition at line 47 of file G4ASCIITreeMessenger.hh.

Constructor & Destructor Documentation

◆ G4ASCIITreeMessenger()

G4ASCIITreeMessenger::G4ASCIITreeMessenger ( G4ASCIITree ASCIITree)

Definition at line 45 of file G4ASCIITreeMessenger.cc.

45  :
46  fpASCIITree(ASCIITree) {
47 
48  G4bool omitable;
49 
50  fpDirectory = new G4UIdirectory ("/vis/ASCIITree/");
51  fpDirectory -> SetGuidance ("Commands for ASCIITree control.");
52 
53  fpDirectorySet = new G4UIdirectory ("/vis/ASCIITree/set/");
54  fpDirectorySet -> SetGuidance ("Settings for ASCIITree control.");
55 
56  fpCommandVerbose = new G4UIcmdWithAnInteger ("/vis/ASCIITree/verbose", this);
57  fVerbosityGuidance.push_back
58  (" < 10: - does not print daughters of repeated placements,"
59  " does not repeat replicas.");
60  fVerbosityGuidance.push_back
61  (" >= 10: prints all physical volumes.");
62  fVerbosityGuidance.push_back
63  ("The level of detail is given by verbosity%10:");
64  fVerbosityGuidance.push_back
65  ("for each volume:");
66  fVerbosityGuidance.push_back
67  (" >= 0: physical volume name.");
68  fVerbosityGuidance.push_back
69  (" >= 1: logical volume name (and names of sensitive detector"
70  " and readout geometry, if any).");
71  fVerbosityGuidance.push_back
72  (" >= 2: solid name and type.");
73  fVerbosityGuidance.push_back
74  (" >= 3: volume and density.");
75  fVerbosityGuidance.push_back
76  (" >= 5: daughter-subtracted volume and mass.");
77  fVerbosityGuidance.push_back
78  (" >= 6: physical volume dump.");
79  fVerbosityGuidance.push_back
80  (" >= 7: polyhedron dump.");
81  fVerbosityGuidance.push_back
82  ("and in the summary at the end of printing:");
83  fVerbosityGuidance.push_back
84  (" >= 4: daughter-included mass of top physical volume(s) in scene"
85  " to depth specified.");
86  fVerbosityGuidance.push_back
87  ("Note: by default, culling is switched off so all volumes are seen.");
88  fVerbosityGuidance.push_back
89  ("Note: the mass calculation takes into account daughters, which can be"
90  " time consuming. If you want the mass of a particular subtree to a"
91  " particular depth:");
92  fVerbosityGuidance.push_back
93  (" /vis/open ATree");
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> ! <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]);
109  }
110  fpCommandVerbose -> SetParameterName ("verbosity",omitable = true);
111  fpCommandVerbose -> SetDefaultValue(0);
112 
113  fpCommandSetOutFile = new G4UIcmdWithAString ("/vis/ASCIITree/set/outFile", this
114 );
115  fpCommandSetOutFile -> SetGuidance ("Set name of output file.");
116  fpCommandSetOutFile -> SetParameterName ("out-filename",
117  omitable = true);
118  fpCommandSetOutFile -> SetDefaultValue ("G4cout");
119 }
static std::vector< G4String > fVerbosityGuidance
bool G4bool
Definition: G4Types.hh:79
G4UIcmdWithAnInteger * fpCommandVerbose
G4UIcmdWithAString * fpCommandSetOutFile

◆ ~G4ASCIITreeMessenger()

G4ASCIITreeMessenger::~G4ASCIITreeMessenger ( )
virtual

Definition at line 121 of file G4ASCIITreeMessenger.cc.

121  {
122  delete fpCommandSetOutFile;
123  delete fpDirectorySet;
124  delete fpCommandVerbose;
125  delete fpDirectory;
126 }
G4UIcmdWithAnInteger * fpCommandVerbose
G4UIcmdWithAString * fpCommandSetOutFile

Member Function Documentation

◆ GetCurrentValue()

G4String G4ASCIITreeMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 128 of file G4ASCIITreeMessenger.cc.

128  {
129  return "";
130 }
Here is the call graph for this function:

◆ SetNewValue()

void G4ASCIITreeMessenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 133 of file G4ASCIITreeMessenger.cc.

134  {
135  if (command == fpCommandVerbose)
136  {
138  (fpCommandVerbose->GetNewIntValue(newValue));
139  G4cout << "G4ASCIITree verbosity now "
141  << G4endl;
142  }
143  else if (command == fpCommandSetOutFile)
144  {
145  fpASCIITree -> SetOutFileName (newValue);
146  G4cout << "G4ASCIITree out filename now "
147  << fpASCIITree -> GetOutFileName()
148  << G4endl;
149  }
150 }
static G4int GetNewIntValue(const char *paramString)
G4int GetVerbosity() const
Definition: G4ASCIITree.hh:47
void SetVerbosity(G4int verbosity)
Definition: G4ASCIITree.hh:49
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4UIcmdWithAnInteger * fpCommandVerbose
G4UIcmdWithAString * fpCommandSetOutFile
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fpASCIITree

G4ASCIITree* G4ASCIITreeMessenger::fpASCIITree
private

Definition at line 55 of file G4ASCIITreeMessenger.hh.

◆ fpCommandSetOutFile

G4UIcmdWithAString* G4ASCIITreeMessenger::fpCommandSetOutFile
private

Definition at line 59 of file G4ASCIITreeMessenger.hh.

◆ fpCommandVerbose

G4UIcmdWithAnInteger* G4ASCIITreeMessenger::fpCommandVerbose
private

Definition at line 58 of file G4ASCIITreeMessenger.hh.

◆ fpDirectory

G4UIcommand* G4ASCIITreeMessenger::fpDirectory
private

Definition at line 56 of file G4ASCIITreeMessenger.hh.

◆ fpDirectorySet

G4UIcommand* G4ASCIITreeMessenger::fpDirectorySet
private

Definition at line 57 of file G4ASCIITreeMessenger.hh.

◆ fVerbosityGuidance

std::vector< G4String > G4ASCIITreeMessenger::fVerbosityGuidance
static

Definition at line 53 of file G4ASCIITreeMessenger.hh.


The documentation for this class was generated from the following files: