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

#include <GammaRayTelPrimaryGeneratorMessenger.hh>

Inheritance diagram for GammaRayTelPrimaryGeneratorMessenger:
Collaboration diagram for GammaRayTelPrimaryGeneratorMessenger:

Public Member Functions

 GammaRayTelPrimaryGeneratorMessenger (GammaRayTelPrimaryGeneratorAction *)
 
 ~GammaRayTelPrimaryGeneratorMessenger ()
 
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
 

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 GammaRayTelPrimaryGeneratorMessenger.hh.

Constructor & Destructor Documentation

GammaRayTelPrimaryGeneratorMessenger::GammaRayTelPrimaryGeneratorMessenger ( GammaRayTelPrimaryGeneratorAction GammaRayTelGun)

Definition at line 53 of file GammaRayTelPrimaryGeneratorMessenger.cc.

54  :GammaRayTelAction(GammaRayTelGun)
55 {
56  RndmCmd = new G4UIcmdWithAString("/gun/random",this);
57  RndmCmd->SetGuidance("Shoot randomly the incident particle.");
58  RndmCmd->SetGuidance(" Choice : on(default), off");
59  RndmCmd->SetParameterName("choice",true);
60  RndmCmd->SetDefaultValue("on");
61  RndmCmd->SetCandidates("on off");
63 
64  SourceTypeCmd = new G4UIcmdWithAnInteger("/gun/sourceType",this);
65  SourceTypeCmd->SetGuidance("Select the type of incident flux.");
66  SourceTypeCmd->SetGuidance(" Choice : 0(default), 1(isotropic), 2(wide parallel beam)");
67  SourceTypeCmd->SetParameterName("choice",true);
68  SourceTypeCmd->SetDefaultValue((G4int)0);
70 
71  VertexRadiusCmd = new G4UIcmdWithADoubleAndUnit("/gun/vertexRadius",this);
72  VertexRadiusCmd->SetGuidance("Radius (and unit) of sphere for vertices of incident flux.");
73  VertexRadiusCmd->SetParameterName("choice",true);
74  VertexRadiusCmd->SetDefaultValue((G4double)1.*cm);
76 
77  SpectrumTypeCmd = new G4UIcmdWithAnInteger("/gun/spectrumType",this);
78  SpectrumTypeCmd->SetGuidance("Select the type of incident spectrum.");
79  SpectrumTypeCmd->SetGuidance(" Choice : 0(default), 1(), 2(E^{-gamma}), 3()");
80  SpectrumTypeCmd->SetParameterName("choice",true);
81  SpectrumTypeCmd->SetDefaultValue((G4int)0);
83 
84 
85  SourceGenCmd = new G4UIcmdWithABool("/gun/sourceGen",this);
86  SourceGenCmd->SetGuidance("Select the native Generation");
87  SourceGenCmd->SetGuidance(" Choice : true(native), false(GPS)");
88  SourceGenCmd->SetParameterName("choice",true);
89  SourceGenCmd->SetDefaultValue((G4bool)true);
91 
92 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
int G4int
Definition: G4Types.hh:78
void SetDefaultValue(G4bool defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
bool G4bool
Definition: G4Types.hh:79
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
static constexpr double cm
Definition: G4SIunits.hh:119
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:240
void SetDefaultValue(const char *defVal)
void SetCandidates(const char *candidateList)
void SetDefaultValue(G4int defVal)
double G4double
Definition: G4Types.hh:76
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
GammaRayTelPrimaryGeneratorMessenger::~GammaRayTelPrimaryGeneratorMessenger ( )

Definition at line 96 of file GammaRayTelPrimaryGeneratorMessenger.cc.

97 {
98  delete RndmCmd;
99  delete SourceTypeCmd;
100  delete VertexRadiusCmd;
101  delete SpectrumTypeCmd;
102  delete SourceGenCmd;
103 }

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 107 of file GammaRayTelPrimaryGeneratorMessenger.cc.

108 {
109  if( command == RndmCmd )
110  { GammaRayTelAction->SetRndmFlag(newValue);}
111 
112  if( command == SourceTypeCmd )
113  { GammaRayTelAction->SetSourceType(SourceTypeCmd->GetNewIntValue(newValue));}
114 
115  if( command == VertexRadiusCmd )
116  { GammaRayTelAction->SetVertexRadius(VertexRadiusCmd->GetNewDoubleValue(newValue));}
117 
118  if( command == SpectrumTypeCmd )
119  { GammaRayTelAction->SetSpectrumType(SpectrumTypeCmd->GetNewIntValue(newValue));}
120 
121  if( command == SourceGenCmd )
122  { GammaRayTelAction->SetSourceGen(SourceGenCmd->GetNewBoolValue(newValue));}
123 }
static G4int GetNewIntValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
static G4bool GetNewBoolValue(const char *paramString)

Here is the call graph for this function:


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