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

#include <G4NuclideTableMessenger.hh>

+ Inheritance diagram for G4NuclideTableMessenger:

Public Member Functions

 G4NuclideTableMessenger (G4NuclideTable *nuclideTable=nullptr)
 
 ~G4NuclideTableMessenger () override
 
 G4NuclideTableMessenger (const G4NuclideTableMessenger &)=delete
 
G4NuclideTableMessengeroperator= (const G4NuclideTableMessenger &)=delete
 
void SetNewValue (G4UIcommand *command, G4String newValues) override
 
- 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 49 of file G4NuclideTableMessenger.hh.

Constructor & Destructor Documentation

◆ G4NuclideTableMessenger() [1/2]

G4NuclideTableMessenger::G4NuclideTableMessenger ( G4NuclideTable * nuclideTable = nullptr)

Definition at line 44 of file G4NuclideTableMessenger.cc.

45 : theNuclideTable(nuclideTable)
46{
47 thisDirectory = new G4UIdirectory("/particle/nuclideTable/");
48 thisDirectory->SetGuidance("Nuclide table control commands.");
49
50 // particle/manage/nuclide/min_halflife
51 halflifeCmd = new G4UIcmdWithADoubleAndUnit("/particle/nuclideTable/min_halflife", this);
52 halflifeCmd->SetGuidance("Set threshold of half-life.");
53 halflifeCmd->SetGuidance("Unit of the time can be :");
54 halflifeCmd->SetGuidance(" s, ms, ns (default)");
55 halflifeCmd->SetParameterName("life", false);
56 halflifeCmd->SetDefaultValue(0.69314718);
57 halflifeCmd->SetRange("halflife > 0.0");
58 halflifeCmd->SetDefaultUnit("ns");
60
61 // particle/manage/nuclide/min_meanlife
62 meanlifeCmd = new G4UIcmdWithADoubleAndUnit("/particle/nuclideTable/min_meanlife", this);
63 meanlifeCmd->SetGuidance("Set threshold of mean life.");
64 meanlifeCmd->SetGuidance("Unit of the time can be :");
65 meanlifeCmd->SetGuidance(" s, ms, ns (default)");
66 meanlifeCmd->SetParameterName("life", false);
67 meanlifeCmd->SetDefaultValue(1.0);
68 meanlifeCmd->SetRange("meanlife > 0.0");
69 meanlifeCmd->SetDefaultUnit("ns");
71
72 // particle/manage/nuclide/level_tolerance
73 lToleranceCmd = new G4UIcmdWithADoubleAndUnit("/particle/nuclideTable/level_tolerance", this);
74 lToleranceCmd->SetGuidance("Set tolerance in level searching.");
75 lToleranceCmd->SetGuidance("Unit of the energy can be :");
76 lToleranceCmd->SetGuidance(" MeV, keV, eV (default)");
77 lToleranceCmd->SetParameterName("lTolerance", false);
78 lToleranceCmd->SetDefaultValue(1.0);
79 lToleranceCmd->SetRange("lTolerance >0.0");
80 lToleranceCmd->SetDefaultUnit("eV");
82}
@ G4State_Idle
@ G4State_PreInit
void SetDefaultUnit(const char *defUnit)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetGuidance(const char *aGuidance)
void SetRange(const char *rs)
void AvailableForStates(G4ApplicationState s1)

◆ ~G4NuclideTableMessenger()

G4NuclideTableMessenger::~G4NuclideTableMessenger ( )
override

Definition at line 84 of file G4NuclideTableMessenger.cc.

85{
86 delete thisDirectory;
87 delete halflifeCmd;
88 delete meanlifeCmd;
89 delete lToleranceCmd;
90}

◆ G4NuclideTableMessenger() [2/2]

G4NuclideTableMessenger::G4NuclideTableMessenger ( const G4NuclideTableMessenger & )
delete

Member Function Documentation

◆ operator=()

G4NuclideTableMessenger & G4NuclideTableMessenger::operator= ( const G4NuclideTableMessenger & )
delete

◆ SetNewValue()

void G4NuclideTableMessenger::SetNewValue ( G4UIcommand * command,
G4String newValues )
overridevirtual

Reimplemented from G4UImessenger.

Definition at line 92 of file G4NuclideTableMessenger.cc.

93{
94 if (command == halflifeCmd) {
95 // Command /particle/manage/nuclideTable/min_halflife
96 theNuclideTable->SetThresholdOfHalfLife(halflifeCmd->GetNewDoubleValue(newValue));
97 }
98 else if (command == meanlifeCmd) {
99 // Command /particle/manage/nuclideTable/min_meanlife
100 theNuclideTable->SetMeanLifeThreshold(meanlifeCmd->GetNewDoubleValue(newValue));
101 }
102 else if (command == lToleranceCmd) {
103 // Command /particle/manage/nuclideTable/level_tolerance
104 theNuclideTable->SetLevelTolerance(lToleranceCmd->GetNewDoubleValue(newValue));
105 }
106}
void SetMeanLifeThreshold(G4double)
void SetThresholdOfHalfLife(G4double)
void SetLevelTolerance(G4double x)
static G4double GetNewDoubleValue(const char *paramString)

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