Geant4 10.7.0
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)
 
virtual ~G4PhysListFactoryMessenger ()
 
void SetNewValue (G4UIcommand *aComm, G4String aS)
 
- 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 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_Init
@ G4State_Idle
@ G4State_PreInit
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:156
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:273

◆ ~G4PhysListFactoryMessenger()

G4PhysListFactoryMessenger::~G4PhysListFactoryMessenger ( )
virtual

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

Reimplemented from G4UImessenger.

Definition at line 65 of file G4PhysListFactoryMessenger.cc.

66{
67 if(aComm == theRadDecay) {
68 thePhysList->RegisterPhysics(new G4RadioactiveDecayPhysics(1));
69 } else if(aComm == theOptical) {
70 thePhysList->RegisterPhysics(new G4OpticalPhysics(1));
71 }
72}
void RegisterPhysics(G4VPhysicsConstructor *)

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