Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CML2PrimaryGenerationActionMessenger Class Reference

#include <ML2PrimaryGenerationActionMessenger.hh>

Inheritance diagram for CML2PrimaryGenerationActionMessenger:
Collaboration diagram for CML2PrimaryGenerationActionMessenger:

Public Member Functions

 CML2PrimaryGenerationActionMessenger (CML2PrimaryGenerationAction *PML2PrimaryGenerationAction)
 
 ~CML2PrimaryGenerationActionMessenger (void)
 
void SetNewValue (G4UIcommand *cmd, G4String newValue)
 
- 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
 

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 57 of file ML2PrimaryGenerationActionMessenger.hh.

Constructor & Destructor Documentation

CML2PrimaryGenerationActionMessenger::CML2PrimaryGenerationActionMessenger ( CML2PrimaryGenerationAction PML2PrimaryGenerationAction)

Definition at line 50 of file ML2PrimaryGenerationActionMessenger.cc.

50  : pML2PrimaryGenerationAction(PML2PrimaryGenerationAction)
51 {
52  nRecycling=new G4UIcmdWithAnInteger("/primaryParticleData/nIdenticalParticles",this);
53  nRecycling->SetDefaultValue(1);
54  nRecycling->SetGuidance("number of identical particles generated in the primary generator");
55 
56  calculatedPhaseSpaceFileIN=new G4UIcmdWithAString("/primaryParticleData/calculatedPhaseSpaceFileIN",this);
57  calculatedPhaseSpaceFileIN->SetDefaultValue("");
58  calculatedPhaseSpaceFileIN->SetGuidance("full path and file name of the phase space file to be used as particle generator");
59 
60  sourceTypeName=new G4UIcmdWithAString("/primaryParticleData/sourceTypeName",this);
61  sourceTypeName->SetDefaultValue("");
62  sourceTypeName->SetGuidance("type of particle generator source (randomTarget, phaseSpace)");
63 
64  nMaxParticlesInRamPhaseSpace=new G4UIcmdWithAnInteger("/primaryParticleData/nMaxParticlesInRamPhaseSpace",this);
65  nMaxParticlesInRamPhaseSpace->SetDefaultValue(10000);
66  nMaxParticlesInRamPhaseSpace->SetGuidance("maximum particle number loaded from the phase space file each time");
67 
68  GunMeanEnegy=new G4UIcmdWithADoubleAndUnit("/primaryParticleData/GunMeanEnegy", this);
69  GunMeanEnegy->SetDefaultUnit("MeV");
70  GunMeanEnegy->SetDefaultValue(6.);
71  GunMeanEnegy->SetGuidance("mean energy of the primary particles");
72 
73  GunStdEnegy=new G4UIcmdWithADoubleAndUnit("/primaryParticleData/GunStdEnegy", this);
74  GunStdEnegy->SetDefaultUnit("MeV");
75  GunStdEnegy->SetDefaultValue(0.127);
76  GunStdEnegy->SetGuidance("std energy of the primary particles");
77 
78  GunRadious=new G4UIcmdWithADoubleAndUnit("/primaryParticleData/GunRadious", this);
79  GunRadious->SetDefaultUnit("mm");
80  GunRadious->SetDefaultValue(10.);
81  GunRadious->SetGuidance("radious primary particles beam");
82 }
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void SetDefaultValue(const char *defVal)
void SetDefaultUnit(const char *defUnit)
void SetDefaultValue(G4int defVal)

Here is the call graph for this function:

CML2PrimaryGenerationActionMessenger::~CML2PrimaryGenerationActionMessenger ( void  )

Definition at line 84 of file ML2PrimaryGenerationActionMessenger.cc.

85 {
86  delete nRecycling;
87  delete nMaxParticlesInRamPhaseSpace;
88  delete GunMeanEnegy;
89  delete GunStdEnegy;
90  delete GunRadious;
91  delete calculatedPhaseSpaceFileIN;
92  delete sourceTypeName;
93 }

Member Function Documentation

void CML2PrimaryGenerationActionMessenger::SetNewValue ( G4UIcommand cmd,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 94 of file ML2PrimaryGenerationActionMessenger.cc.

95 {
96  if (cmd==GunMeanEnegy)
97  {
98  GunMeanEnegy->GetNewUnitValue(newValue);
99  pML2PrimaryGenerationAction->setGunMeanEnergy(GunMeanEnegy->GetNewDoubleValue(newValue));
100  }
101 
102  if (cmd==GunStdEnegy)
103  {
104  GunStdEnegy->GetNewUnitValue(newValue);
105  pML2PrimaryGenerationAction->setGunStdEnergy(GunStdEnegy->GetNewDoubleValue(newValue));
106  }
107 
108  if (cmd==GunRadious)
109  {
110  GunRadious->GetNewUnitValue(newValue);
111  pML2PrimaryGenerationAction->setGunRadious(GunRadious->GetNewDoubleValue(newValue));
112  }
113 
114 
115  if (cmd==nMaxParticlesInRamPhaseSpace)
116  {
117  pML2PrimaryGenerationAction->setNMaxParticlesInRamPhaseSpace(nMaxParticlesInRamPhaseSpace->GetNewIntValue(newValue));
118  }
119 
120 
121  if (cmd==nRecycling)
122  {pML2PrimaryGenerationAction->setNRecycling(nRecycling->GetNewIntValue(newValue));}
123 
124  if (cmd==calculatedPhaseSpaceFileIN)
125  {pML2PrimaryGenerationAction->setCalculatedPhaseSpaceFileIN(newValue);}
126 
127  if (cmd==sourceTypeName)
128  {pML2PrimaryGenerationAction->setSourceTypeName(newValue);}
129 
130 
131 }
static G4int GetNewIntValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
void setCalculatedPhaseSpaceFileIN(G4String val)
static G4double GetNewUnitValue(const char *paramString)

Here is the call graph for this function:


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