Geant4 10.7.0
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)
 
virtual ~G4NuclideTableMessenger ()
 
 G4NuclideTableMessenger (const G4NuclideTableMessenger &)=delete
 
G4NuclideTableMessengeroperator= (const G4NuclideTableMessenger &)=delete
 
virtual void SetNewValue (G4UIcommand *command, G4String newValues)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool operator!= (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

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)
 
G4long StoL (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 = 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 lifetimeCmd = new G4UIcmdWithADoubleAndUnit("/particle/nuclideTable/min_halflife",this);
52 lifetimeCmd->SetGuidance("Set threshold of half-life.");
53 lifetimeCmd->SetGuidance("Unit of the time can be :");
54 lifetimeCmd->SetGuidance(" s, ms, ns (default)");
55 lifetimeCmd->SetParameterName("life",false);
56 lifetimeCmd->SetDefaultValue( 1000.0 );
57 lifetimeCmd->SetRange("life >0.0");
58 lifetimeCmd->SetDefaultUnit("ns");
60
61 // particle/manage/nuclide/level_tolerance
62 lToleranceCmd = new G4UIcmdWithADoubleAndUnit("/particle/nuclideTable/level_tolerance",this);
63 lToleranceCmd->SetGuidance("Set tolerance in level searching.");
64 lToleranceCmd->SetGuidance("Unit of the energy can be :");
65 lToleranceCmd->SetGuidance(" MeV, keV, eV (default)");
66 lToleranceCmd->SetParameterName("lTolerance",false);
67 lToleranceCmd->SetDefaultValue( 1.0 );
68 lToleranceCmd->SetRange("lTolerance >0.0");
69 lToleranceCmd->SetDefaultUnit("eV");
71}
@ G4State_Idle
@ G4State_PreInit
void SetDefaultUnit(const char *defUnit)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:156
void SetRange(const char *rs)
Definition: G4UIcommand.hh:120
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:273

◆ ~G4NuclideTableMessenger()

G4NuclideTableMessenger::~G4NuclideTableMessenger ( )
virtual

Definition at line 73 of file G4NuclideTableMessenger.cc.

74{
75 delete thisDirectory;
76 delete lifetimeCmd;
77 delete lToleranceCmd;
78}

◆ 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 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 80 of file G4NuclideTableMessenger.cc.

82{
83 if (command == lifetimeCmd )
84 {
85 // Command /particle/manage/nuclideTable/min_halflife
86 theNuclideTable->SetThresholdOfHalfLife(lifetimeCmd->GetNewDoubleValue(newValue));
87 }
88 else if (command == lToleranceCmd )
89 {
90 // Command /particle/manage/nuclideTable/level_tolerance
91 theNuclideTable->SetLevelTolerance(lToleranceCmd->GetNewDoubleValue(newValue));
92 }
93}
void SetThresholdOfHalfLife(G4double)
void SetLevelTolerance(G4double x)
static G4double GetNewDoubleValue(const char *paramString)

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