Geant4  10.02.p03
G4NistMessenger Class Reference

#include <G4NistMessenger.hh>

Inheritance diagram for G4NistMessenger:
Collaboration diagram for G4NistMessenger:

Public Member Functions

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

Private Attributes

G4NistManagermanager
 
G4UIdirectorymatDir
 
G4UIcmdWithAnIntegerverCmd
 
G4UIdirectorynistDir
 
G4UIcmdWithAStringprtElmCmd
 
G4UIcmdWithAnIntegerprzElmCmd
 
G4UIcmdWithAStringlisMatCmd
 
G4UIdirectoryg4Dir
 
G4UIcmdWithAStringg4ElmCmd
 
G4UIcmdWithAStringg4MatCmd
 
G4UIcmdWithAStringg4DensCmd
 

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 81 of file G4NistMessenger.hh.

Constructor & Destructor Documentation

◆ G4NistMessenger()

G4NistMessenger::G4NistMessenger ( G4NistManager man)

Definition at line 56 of file G4NistMessenger.cc.

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

◆ ~G4NistMessenger()

G4NistMessenger::~G4NistMessenger ( )
virtual

Definition at line 117 of file G4NistMessenger.cc.

118 {
119  delete verCmd;
120  delete prtElmCmd;
121  delete przElmCmd;
122  delete lisMatCmd;
123  delete nistDir;
124 
125  delete g4ElmCmd;
126  delete g4MatCmd;
127  delete g4DensCmd;
128  delete g4Dir;
129  delete matDir;
130 }
G4UIcmdWithAnInteger * verCmd
G4UIdirectory * matDir
G4UIdirectory * g4Dir
G4UIcmdWithAString * g4MatCmd
G4UIcmdWithAString * lisMatCmd
G4UIcmdWithAString * g4DensCmd
G4UIdirectory * nistDir
G4UIcmdWithAString * g4ElmCmd
G4UIcmdWithAnInteger * przElmCmd
G4UIcmdWithAString * prtElmCmd

Member Function Documentation

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 134 of file G4NistMessenger.cc.

135 {
136  //G4cout << "G4NistMessenger::SetNewValue <" << newValue << ">" << G4endl;
137  if (command == verCmd)
138  { manager->SetVerbose(verCmd->GetNewIntValue(newValue));}
139 
140  else if (command == prtElmCmd)
141  { manager->PrintElement(newValue); }
142 
143  else if (command == przElmCmd) {
144  G4int Z = przElmCmd->GetNewIntValue(newValue);
145  if(Z >= 0 && Z < 108) { manager->PrintElement(Z); }
146  }
147  else if (command == lisMatCmd)
148  { manager->ListMaterials(newValue); }
149 
150  else if (command == g4ElmCmd)
151  { manager->PrintG4Element(newValue); }
152 
153  else if (command == g4MatCmd)
154  { manager->PrintG4Material(newValue); }
155 
156  else if (command == g4DensCmd)
158 }
G4UIcmdWithAnInteger * verCmd
void PrintElement(G4int Z)
static G4int GetNewIntValue(const char *paramString)
G4UIcmdWithAString * g4MatCmd
int G4int
Definition: G4Types.hh:78
void PrintG4Material(const G4String &)
Float_t Z
void SetVerbose(G4int)
G4UIcmdWithAString * lisMatCmd
G4NistManager * manager
void PrintData(const G4String &matName)
void PrintG4Element(const G4String &)
G4UIcmdWithAString * g4DensCmd
static G4DensityEffectData * GetDensityEffectData()
void ListMaterials(const G4String &)
G4UIcmdWithAString * g4ElmCmd
G4UIcmdWithAnInteger * przElmCmd
G4UIcmdWithAString * prtElmCmd
Here is the call graph for this function:

Member Data Documentation

◆ g4DensCmd

G4UIcmdWithAString* G4NistMessenger::g4DensCmd
private

Definition at line 105 of file G4NistMessenger.hh.

◆ g4Dir

G4UIdirectory* G4NistMessenger::g4Dir
private

Definition at line 102 of file G4NistMessenger.hh.

◆ g4ElmCmd

G4UIcmdWithAString* G4NistMessenger::g4ElmCmd
private

Definition at line 103 of file G4NistMessenger.hh.

◆ g4MatCmd

G4UIcmdWithAString* G4NistMessenger::g4MatCmd
private

Definition at line 104 of file G4NistMessenger.hh.

◆ lisMatCmd

G4UIcmdWithAString* G4NistMessenger::lisMatCmd
private

Definition at line 100 of file G4NistMessenger.hh.

◆ manager

G4NistManager* G4NistMessenger::manager
private

Definition at line 92 of file G4NistMessenger.hh.

◆ matDir

G4UIdirectory* G4NistMessenger::matDir
private

Definition at line 94 of file G4NistMessenger.hh.

◆ nistDir

G4UIdirectory* G4NistMessenger::nistDir
private

Definition at line 97 of file G4NistMessenger.hh.

◆ prtElmCmd

G4UIcmdWithAString* G4NistMessenger::prtElmCmd
private

Definition at line 98 of file G4NistMessenger.hh.

◆ przElmCmd

G4UIcmdWithAnInteger* G4NistMessenger::przElmCmd
private

Definition at line 99 of file G4NistMessenger.hh.

◆ verCmd

G4UIcmdWithAnInteger* G4NistMessenger::verCmd
private

Definition at line 95 of file G4NistMessenger.hh.


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