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

#include <G4PhysListFactoryMessenger.hh>

+ Inheritance diagram for G4PhysListFactoryMessenger:

Public Member Functions

 G4PhysListFactoryMessenger (G4VModularPhysicsList *pl)
 
 ~G4PhysListFactoryMessenger () override
 
void SetNewValue (G4UIcommand *aComm, G4String aS) 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)
 
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 (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 50 of file G4PhysListFactoryMessenger.hh.

Constructor & Destructor Documentation

◆ G4PhysListFactoryMessenger()

G4PhysListFactoryMessenger::G4PhysListFactoryMessenger ( G4VModularPhysicsList pl)

Definition at line 41 of file G4PhysListFactoryMessenger.cc.

42{
43 //G4cout << "### G4PhysListFactoryMessenger constructed" << G4endl;
44 thePhysList = pl;
45
46 theDir = new G4UIdirectory("/physics_lists/factory/");
47 theDir->SetGuidance("commands for configuration of physics lists.");
48
49 theRadDecay = new G4UIcommand("/physics_lists/factory/addRadioactiveDecay",this);
50 theRadDecay->SetGuidance("Enable radioactive decay.");
52
53 theOptical = new G4UIcommand("/physics_lists/factory/addOptical",this);
54 theOptical->SetGuidance("Enable optical physics.");
56}
@ G4State_PreInit
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:157
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:287

◆ ~G4PhysListFactoryMessenger()

G4PhysListFactoryMessenger::~G4PhysListFactoryMessenger ( )
override

Definition at line 58 of file G4PhysListFactoryMessenger.cc.

59{
60 delete theOptical;
61 delete theRadDecay;
62 delete theDir;
63}

Member Function Documentation

◆ SetNewValue()

void G4PhysListFactoryMessenger::SetNewValue ( G4UIcommand aComm,
G4String  aS 
)
overridevirtual

Reimplemented from G4UImessenger.

Definition at line 65 of file G4PhysListFactoryMessenger.cc.

66{
67 G4int ver = thePhysList->GetVerboseLevel();
68 if(aComm == theRadDecay) {
69 thePhysList->RegisterPhysics(new G4RadioactiveDecayPhysics(ver));
70 } else if(aComm == theOptical) {
71 thePhysList->RegisterPhysics(new G4OpticalPhysics(ver));
72 }
73}
int G4int
Definition: G4Types.hh:85
void RegisterPhysics(G4VPhysicsConstructor *)

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