Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
XrayFluoPrimaryGeneratorMessenger Class Reference

#include <XrayFluoPrimaryGeneratorMessenger.hh>

Inheritance diagram for XrayFluoPrimaryGeneratorMessenger:
G4UImessenger

Public Member Functions

 XrayFluoPrimaryGeneratorMessenger (XrayFluoPrimaryGeneratorAction *)
 
 ~XrayFluoPrimaryGeneratorMessenger ()
 
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
 

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
 

Detailed Description

Definition at line 50 of file XrayFluoPrimaryGeneratorMessenger.hh.

Constructor & Destructor Documentation

XrayFluoPrimaryGeneratorMessenger::XrayFluoPrimaryGeneratorMessenger ( XrayFluoPrimaryGeneratorAction XrayFluoGun)

Definition at line 45 of file XrayFluoPrimaryGeneratorMessenger.cc.

References G4UIcommand::AvailableForStates(), G4cout, G4endl, G4State_Idle, G4State_PreInit, G4UIcmdWithAString::SetCandidates(), G4UIcmdWithAString::SetDefaultValue(), G4UIcmdWithABool::SetDefaultValue(), G4UIcommand::SetGuidance(), G4UIcmdWithAString::SetParameterName(), and G4UIcmdWithABool::SetParameterName().

46  :XrayFluoAction(XrayFluoGun)
47 {
48  RndmCmd = new G4UIcmdWithAString("/gun/random",this);
49  RndmCmd->SetGuidance("Shoot randomly the incident particle.");
50  RndmCmd->SetGuidance(" Choice : on(default), off");
51  RndmCmd->SetParameterName("choice",true);
52  RndmCmd->SetDefaultValue("on");
53  RndmCmd->SetCandidates("on off");
55 
56  RndmVert = new G4UIcmdWithAString("/gun/randomVert",this);
57  RndmVert->SetGuidance("Shoot randomly the incident particle.");
58  RndmVert->SetGuidance(" Choice : on(default), off");
59  RndmVert->SetParameterName("choice",true);
60  RndmVert->SetDefaultValue("on");
61  RndmVert->SetCandidates("on off");
63 
64  spectrum = new G4UIcmdWithAString("/gun/spectrum",this);
65  spectrum->SetGuidance("Shoot the incident particle with a certain energy spectrum.");
66  spectrum->SetGuidance(" Choice : on(default), off");
67  spectrum->SetParameterName("choice",true);
68  spectrum->SetDefaultValue("on");
69  spectrum->SetCandidates("on off");
71 
72  isoVert = new G4UIcmdWithAString("/gun/isoVert",this);
73  isoVert->SetGuidance("Shoot the incident particle from an isotrofic direction.");
74  isoVert->SetGuidance(" Choice : on(default), off");
75  isoVert->SetParameterName("choice",true);
76  isoVert->SetDefaultValue("on");
77  isoVert->SetCandidates("on off");
79 
80  loadPahseSpace=new G4UIcmdWithAString("/gun/loadGunData",this);
81  loadPahseSpace->SetGuidance("Load emission from samples form previous runs");
82  loadPahseSpace->SetGuidance("Please enter the filename");
83  loadPahseSpace->SetParameterName("choice",true);
84  loadPahseSpace->AvailableForStates(G4State_Idle);
85 
86  loadRayleighData=new G4UIcmdWithABool("/gun/loadRayleighFlag",this);
87  loadRayleighData->SetGuidance("Select if data form rayleigh scattering must be loaded");
88  loadRayleighData->SetGuidance("To be used before and togheter with /gun/loadGunData");
89  loadRayleighData->SetParameterName("Rayleigh Flag",true);
90  loadRayleighData->SetDefaultValue(true);
91  loadRayleighData->AvailableForStates(G4State_Idle);
92 
93  G4cout << "XrayFluoPrimaryGeneratorMessenger created" << G4endl;
94 
95 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4bool defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4GLOB_DLL std::ostream G4cout
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:225
void SetDefaultValue(const char *defVal)
void SetCandidates(const char *candidateList)
#define G4endl
Definition: G4ios.hh:61
XrayFluoPrimaryGeneratorMessenger::~XrayFluoPrimaryGeneratorMessenger ( )

Definition at line 99 of file XrayFluoPrimaryGeneratorMessenger.cc.

References G4cout, and G4endl.

100 {
101  delete RndmCmd;
102  delete RndmVert;
103  delete spectrum;
104  delete isoVert;
105  delete loadPahseSpace;
106  delete loadRayleighData;
107  G4cout << "XrayFluoPrimaryGeneratorMessenger deleted" << G4endl;
108 
109 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 113 of file XrayFluoPrimaryGeneratorMessenger.cc.

References XrayFluoPrimaryGeneratorAction::ActivatePhaseSpace(), G4cout, G4endl, G4UIcmdWithABool::GetNewBoolValue(), XrayFluoPrimaryGeneratorAction::SetIsoVert(), XrayFluoPrimaryGeneratorAction::SetRayleighFlag(), XrayFluoPrimaryGeneratorAction::SetRndmFlag(), XrayFluoPrimaryGeneratorAction::SetRndmVert(), and XrayFluoPrimaryGeneratorAction::SetSpectrum().

114 {
115  if( command == RndmCmd )
116  { XrayFluoAction->SetRndmFlag(newValue);}
117  if( command == RndmVert )
118  { XrayFluoAction->SetRndmVert(newValue);}
119  if( command == spectrum )
120  { XrayFluoAction->SetSpectrum(newValue);}
121  if( command == isoVert )
122  { XrayFluoAction->SetIsoVert(newValue);}
123  if( command == loadPahseSpace )
124  { XrayFluoAction->ActivatePhaseSpace(newValue);}
125  if( command == loadRayleighData )
126  {
127  G4cout << "newValue: " << newValue << G4endl;
128 
129  G4bool newRayFlag = loadRayleighData->GetNewBoolValue(newValue);
130  XrayFluoAction->SetRayleighFlag(newRayFlag);
131  }
132 }
static G4bool GetNewBoolValue(const char *paramString)
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
#define G4endl
Definition: G4ios.hh:61

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