Geant4  10.02.p03
ExN04PrimaryGeneratorMessenger Class Reference

#include <ExN04PrimaryGeneratorMessenger.hh>

Inheritance diagram for ExN04PrimaryGeneratorMessenger:
Collaboration diagram for ExN04PrimaryGeneratorMessenger:

Public Member Functions

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

Private Attributes

ExN04PrimaryGeneratorActionprimaryAction
 
G4UIdirectorydir
 
G4UIdirectorymydetdir
 
G4UIcmdWithAStringselect
 
ExN04PrimaryGeneratorActionmyAction
 
G4UIdirectorymydetDirectory
 
G4UIcmdWithAStringgenCmd
 

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

Constructor & Destructor Documentation

◆ ExN04PrimaryGeneratorMessenger() [1/2]

ExN04PrimaryGeneratorMessenger::ExN04PrimaryGeneratorMessenger ( ExN04PrimaryGeneratorAction genaction)

Definition at line 44 of file eventgenerator/HepMC/HepMCEx01/src/ExN04PrimaryGeneratorMessenger.cc.

45  : primaryAction(genaction)
46 {
47  mydetdir = new G4UIdirectory("/mydet/");
48  mydetdir-> SetGuidance("ExN04 detector control commands.");
49 
50  dir= new G4UIdirectory("/generator/");
51  dir-> SetGuidance("Control commands for primary generator");
52 
53  select= new G4UIcmdWithAString("/generator/select", this);
54  select-> SetGuidance("select generator type");
55  select-> SetParameterName("generator_type", false, false);
56  select-> SetCandidates("particleGun pythia hepmcAscii");
57  select-> SetDefaultValue("particleGun");
58 }

◆ ~ExN04PrimaryGeneratorMessenger() [1/2]

◆ ExN04PrimaryGeneratorMessenger() [2/2]

ExN04PrimaryGeneratorMessenger::ExN04PrimaryGeneratorMessenger ( ExN04PrimaryGeneratorAction mpga)

◆ ~ExN04PrimaryGeneratorMessenger() [2/2]

ExN04PrimaryGeneratorMessenger::~ExN04PrimaryGeneratorMessenger ( )

Member Function Documentation

◆ GetCurrentValue() [1/2]

G4String ExN04PrimaryGeneratorMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

◆ GetCurrentValue() [2/2]

G4String ExN04PrimaryGeneratorMessenger::GetCurrentValue ( G4UIcommand command)
virtual

◆ SetNewValue() [1/2]

void ExN04PrimaryGeneratorMessenger::SetNewValue ( G4UIcommand command,
G4String  newValues 
)
virtual

Reimplemented from G4UImessenger.

◆ SetNewValue() [2/2]

void ExN04PrimaryGeneratorMessenger::SetNewValue ( G4UIcommand command,
G4String  newValues 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 69 of file eventgenerator/HepMC/HepMCEx01/src/ExN04PrimaryGeneratorMessenger.cc.

71 {
72  if ( command == select ) {
73  primaryAction-> SetGenerator(newValues);
74  G4cout << "current generator type: "
75  << primaryAction-> GetGeneratorName() << G4endl;
76  }
77 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Member Data Documentation

◆ dir

G4UIdirectory* ExN04PrimaryGeneratorMessenger::dir
private

◆ genCmd

G4UIcmdWithAString* ExN04PrimaryGeneratorMessenger::genCmd
private

◆ myAction

ExN04PrimaryGeneratorAction* ExN04PrimaryGeneratorMessenger::myAction
private

◆ mydetdir

G4UIdirectory* ExN04PrimaryGeneratorMessenger::mydetdir
private

◆ mydetDirectory

G4UIdirectory* ExN04PrimaryGeneratorMessenger::mydetDirectory
private

◆ primaryAction

ExN04PrimaryGeneratorAction* ExN04PrimaryGeneratorMessenger::primaryAction
private

◆ select

G4UIcmdWithAString* ExN04PrimaryGeneratorMessenger::select
private

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