Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4NistMessenger Class Reference

#include <G4NistMessenger.hh>

+ Inheritance diagram for G4NistMessenger:

Public Member Functions

 G4NistMessenger (G4NistManager *)
 
 ~G4NistMessenger () override
 
void SetNewValue (G4UIcommand *, G4String) final
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()=default
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool CommandsShouldBeInMaster () const
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String LtoS (G4long l)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (const G4String &s)
 
G4long StoL (const G4String &s)
 
G4double StoD (const 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 = nullptr
 
G4String baseDirName = ""
 
G4bool commandsShouldBeInMaster = false
 

Detailed Description

Definition at line 70 of file G4NistMessenger.hh.

Constructor & Destructor Documentation

◆ G4NistMessenger()

G4NistMessenger::G4NistMessenger ( G4NistManager * man)
explicit

Definition at line 48 of file G4NistMessenger.cc.

48 : manager(man)
49{
50 matDir = new G4UIdirectory("/material/");
51 matDir->SetGuidance("Commands for materials");
52
53 verCmd = new G4UIcmdWithAnInteger("/material/verbose", this);
54 verCmd->SetGuidance("Set verbose level.");
55
56 nistDir = new G4UIdirectory("/material/nist/");
57 nistDir->SetGuidance("Commands for the nist dataBase");
58
59 prtElmCmd = new G4UIcmdWithAString("/material/nist/printElement", this);
60 prtElmCmd->SetGuidance("print element(s) in dataBase.");
61 prtElmCmd->SetGuidance("symbol = element.");
62 prtElmCmd->SetGuidance("all = all elements.");
63 prtElmCmd->SetParameterName("symbol", true);
64 prtElmCmd->SetDefaultValue("all");
65
66 przElmCmd = new G4UIcmdWithAnInteger("/material/nist/printElementZ", this);
67 przElmCmd->SetGuidance("print element Z in dataBase.");
68 przElmCmd->SetGuidance("0 = all elements.");
69 przElmCmd->SetParameterName("Z", true);
70 przElmCmd->SetDefaultValue(0);
71 przElmCmd->SetRange("0<=Z && Z<108");
72
73 lisMatCmd = new G4UIcmdWithAString("/material/nist/listMaterials", this);
74 lisMatCmd->SetGuidance("Materials in Geant4 dataBase.");
75 lisMatCmd->SetGuidance("simple - simple NIST materials.");
76 lisMatCmd->SetGuidance("compound - compound NIST materials.");
77 lisMatCmd->SetGuidance("hep - HEP materials.");
78 lisMatCmd->SetGuidance("bio - biomedical materials.");
79 lisMatCmd->SetGuidance("all - list of all Geant4 materials.");
80 lisMatCmd->SetParameterName("matlist", true);
81 // lisMatCmd->SetCandidates("simple compound hep bio all");
82 lisMatCmd->SetDefaultValue("all");
83
84 g4Dir = new G4UIdirectory("/material/g4/");
85 g4Dir->SetGuidance("Commands for G4MaterialTable");
86
87 g4ElmCmd = new G4UIcmdWithAString("/material/g4/printElement", this);
88 g4ElmCmd->SetGuidance("print Element from G4ElementTable.");
89 g4ElmCmd->SetGuidance("all - all elements.");
90 g4ElmCmd->SetParameterName("elm", true);
91 g4ElmCmd->SetDefaultValue("all");
92
93 g4MatCmd = new G4UIcmdWithAString("/material/g4/printMaterial", this);
94 g4MatCmd->SetGuidance("print Material from G4MaterialTable.");
95 g4MatCmd->SetGuidance("all - all materials");
96 g4MatCmd->SetParameterName("pmat", true);
97 g4MatCmd->SetDefaultValue("all");
98
99 g4DensCmd = new G4UIcmdWithAString("/material/g4/printDensityEffParam", this);
100 g4DensCmd->SetGuidance("print Material from G4DensityEffectData.");
101 g4DensCmd->SetGuidance("all - all materials");
102 g4DensCmd->SetParameterName("dmat", true);
103 g4DensCmd->SetDefaultValue("all");
104
105 densCmd = new G4UIcmdWithAString("/material/g4/enableDensityEffOnFly", this);
106 densCmd->SetGuidance("enable accurate computation of density effect.");
107 densCmd->SetGuidance("all - all materials.");
108 densCmd->SetParameterName("dens", true);
109 densCmd->SetDefaultValue("all");
110
111 adensCmd = new G4UIcmdWithAString("/material/g4/disableDensityEffOnFly", this);
112 adensCmd->SetGuidance("disable accurate computation of density effect.");
113 adensCmd->SetGuidance("all - all materials.");
114 adensCmd->SetParameterName("dens", true);
115 adensCmd->SetDefaultValue("all");
116}
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(const char *defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4int defVal)
void SetGuidance(const char *aGuidance)
void SetRange(const char *rs)

◆ ~G4NistMessenger()

G4NistMessenger::~G4NistMessenger ( )
override

Definition at line 120 of file G4NistMessenger.cc.

121{
122 delete verCmd;
123 delete prtElmCmd;
124 delete przElmCmd;
125 delete lisMatCmd;
126 delete nistDir;
127
128 delete g4ElmCmd;
129 delete g4MatCmd;
130 delete g4DensCmd;
131 delete densCmd;
132 delete adensCmd;
133 delete g4Dir;
134 delete matDir;
135}

Member Function Documentation

◆ SetNewValue()

void G4NistMessenger::SetNewValue ( G4UIcommand * command,
G4String newValue )
finalvirtual

Reimplemented from G4UImessenger.

Definition at line 139 of file G4NistMessenger.cc.

140{
141 // G4cout << "G4NistMessenger::SetNewValue <" << newValue << ">" << G4endl;
142 if (command == verCmd) {
143 manager->SetVerbose(verCmd->GetNewIntValue(newValue));
144 }
145 else if (command == prtElmCmd) {
146 manager->PrintElement(newValue);
147 }
148 else if (command == przElmCmd) {
149 G4int Z = przElmCmd->GetNewIntValue(newValue);
150 if (Z >= 0 && Z < 108) {
151 manager->PrintElement(Z);
152 }
153 }
154 else if (command == lisMatCmd) {
155 manager->ListMaterials(newValue);
156 }
157 else if (command == g4ElmCmd) {
158 manager->PrintG4Element(newValue);
159 }
160 else if (command == g4MatCmd) {
161 manager->PrintG4Material(newValue);
162 }
163 else if (command == g4DensCmd) {
165 }
166 else if (command == densCmd) {
167 manager->SetDensityEffectCalculatorFlag(newValue, true);
168 }
169 else if (command == adensCmd) {
170 manager->SetDensityEffectCalculatorFlag(newValue, false);
171 }
172}
int G4int
Definition G4Types.hh:85
void PrintData(const G4String &matName) const
static G4DensityEffectData * GetDensityEffectData()
void PrintElement(G4int Z) const
void SetDensityEffectCalculatorFlag(const G4String &, G4bool)
void ListMaterials(const G4String &) const
void PrintG4Material(const G4String &) const
void PrintG4Element(const G4String &) const
void SetVerbose(G4int)
static G4int GetNewIntValue(const char *paramString)

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