Geant4  10.02.p03
F04PrimaryGeneratorMessenger Class Reference

#include <F04PrimaryGeneratorMessenger.hh>

Inheritance diagram for F04PrimaryGeneratorMessenger:
Collaboration diagram for F04PrimaryGeneratorMessenger:

Public Member Functions

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

Private Attributes

F04PrimaryGeneratorActionfAction
 
G4UIcmdWithAStringfRndmCmd
 
G4UIcmdWithADoubleAndUnitfSetXvertexCmd
 
G4UIcmdWithADoubleAndUnitfSetYvertexCmd
 
G4UIcmdWithADoubleAndUnitfSetZvertexCmd
 

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

Definition at line 43 of file F04PrimaryGeneratorMessenger.hh.

Constructor & Destructor Documentation

◆ F04PrimaryGeneratorMessenger()

F04PrimaryGeneratorMessenger::F04PrimaryGeneratorMessenger ( F04PrimaryGeneratorAction gun)

Definition at line 42 of file F04PrimaryGeneratorMessenger.cc.

43  : fAction(gun)
44 {
45  fRndmCmd = new G4UIcmdWithAString("/gun/random",this);
46  fRndmCmd->SetGuidance("Shoot randomly the incident particle.");
47  fRndmCmd->SetGuidance(" Choice : on, off(default)");
48  fRndmCmd->SetParameterName("choice",true);
49  fRndmCmd->SetDefaultValue("off");
50  fRndmCmd->SetCandidates("on off");
52 
53  fSetXvertexCmd = new G4UIcmdWithADoubleAndUnit("/gun/xvertex",this);
54  fSetXvertexCmd->SetGuidance(" Set x coord. of the primary vertex.");
55  fSetXvertexCmd->SetParameterName("xv",true);
58 
59  fSetYvertexCmd = new G4UIcmdWithADoubleAndUnit("/gun/yvertex",this);
60  fSetYvertexCmd->SetGuidance(" Set y coord. of the primary vertex.");
61  fSetYvertexCmd->SetParameterName("yv",true);
64 
65  fSetZvertexCmd = new G4UIcmdWithADoubleAndUnit("/gun/zvertex",this);
66  fSetZvertexCmd->SetGuidance(" Set z coord. of the primary vertex.");
67  fSetZvertexCmd->SetParameterName("zv",true);
70 
71 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithADoubleAndUnit * fSetXvertexCmd
G4UIcmdWithADoubleAndUnit * fSetYvertexCmd
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
void SetDefaultValue(const char *defVal)
void SetDefaultUnit(const char *defUnit)
void SetCandidates(const char *candidateList)
G4UIcmdWithADoubleAndUnit * fSetZvertexCmd
static const double mm
Definition: G4SIunits.hh:114
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
Here is the call graph for this function:

◆ ~F04PrimaryGeneratorMessenger()

F04PrimaryGeneratorMessenger::~F04PrimaryGeneratorMessenger ( )
virtual

Definition at line 75 of file F04PrimaryGeneratorMessenger.cc.

76 {
77  delete fRndmCmd;
78  delete fSetXvertexCmd;
79  delete fSetYvertexCmd;
80  delete fSetZvertexCmd;
81 }
G4UIcmdWithADoubleAndUnit * fSetXvertexCmd
G4UIcmdWithADoubleAndUnit * fSetYvertexCmd
G4UIcmdWithADoubleAndUnit * fSetZvertexCmd
Here is the call graph for this function:

Member Function Documentation

◆ SetNewValue()

void F04PrimaryGeneratorMessenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 86 of file F04PrimaryGeneratorMessenger.cc.

87 {
88  if( command == fRndmCmd )
89  { fAction->SetRndmFlag(newValue);}
90  if( command == fSetXvertexCmd)
92  if( command == fSetYvertexCmd)
94  if( command == fSetZvertexCmd)
96 }
G4UIcmdWithADoubleAndUnit * fSetXvertexCmd
G4UIcmdWithADoubleAndUnit * fSetYvertexCmd
static G4double GetNewDoubleValue(const char *paramString)
G4UIcmdWithADoubleAndUnit * fSetZvertexCmd
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fAction

F04PrimaryGeneratorAction* F04PrimaryGeneratorMessenger::fAction
private

Definition at line 54 of file F04PrimaryGeneratorMessenger.hh.

◆ fRndmCmd

G4UIcmdWithAString* F04PrimaryGeneratorMessenger::fRndmCmd
private

Definition at line 56 of file F04PrimaryGeneratorMessenger.hh.

◆ fSetXvertexCmd

G4UIcmdWithADoubleAndUnit* F04PrimaryGeneratorMessenger::fSetXvertexCmd
private

Definition at line 57 of file F04PrimaryGeneratorMessenger.hh.

◆ fSetYvertexCmd

G4UIcmdWithADoubleAndUnit* F04PrimaryGeneratorMessenger::fSetYvertexCmd
private

Definition at line 58 of file F04PrimaryGeneratorMessenger.hh.

◆ fSetZvertexCmd

G4UIcmdWithADoubleAndUnit* F04PrimaryGeneratorMessenger::fSetZvertexCmd
private

Definition at line 59 of file F04PrimaryGeneratorMessenger.hh.


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