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

#include <XrayFluoPlanePrimaryGeneratorMessenger.hh>

Inheritance diagram for XrayFluoPlanePrimaryGeneratorMessenger:
Collaboration diagram for XrayFluoPlanePrimaryGeneratorMessenger:

Public Member Functions

 XrayFluoPlanePrimaryGeneratorMessenger (XrayFluoPlanePrimaryGeneratorAction *)
 
 ~XrayFluoPlanePrimaryGeneratorMessenger ()
 
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 51 of file XrayFluoPlanePrimaryGeneratorMessenger.hh.

Constructor & Destructor Documentation

XrayFluoPlanePrimaryGeneratorMessenger::XrayFluoPlanePrimaryGeneratorMessenger ( XrayFluoPlanePrimaryGeneratorAction XrayFluoGun)

Definition at line 44 of file XrayFluoPlanePrimaryGeneratorMessenger.cc.

45 :XrayFluoAction(XrayFluoGun)
46 {
47  RndmCmd = new G4UIcmdWithAString("/gun/random",this);
48  RndmCmd->SetGuidance("Shoot particles from a point-like source at infinity, witth an incidence angle with the plane of 45 deg");
49  RndmCmd->SetGuidance(" Choice : on(default), off");
50  RndmCmd->SetParameterName("choice",true);
51  RndmCmd->SetDefaultValue("on");
52  RndmCmd->SetCandidates("on off");
54 
55  RndmVert = new G4UIcmdWithAString("/gun/beam",this);
56  RndmVert->SetGuidance("Creates a round beam of particles of 0.5mm in diameter.");
57  RndmVert->SetGuidance(" Choice : on(default), off");
58  RndmVert->SetParameterName("choice",true);
59  RndmVert->SetDefaultValue("on");
60  RndmVert->SetCandidates("on off");
62 
63  spectrum = new G4UIcmdWithAString("/gun/spectrum",this);
64  spectrum->SetGuidance("Shoot the incident particle with a certain energy spectrum.");
65  spectrum->SetGuidance(" Choice : on(default), off");
66  spectrum->SetParameterName("choice",true);
67  spectrum->SetDefaultValue("on");
68  spectrum->SetCandidates("on off");
70 
71  isoVert = new G4UIcmdWithAString("/gun/isoVert",this);
72  isoVert->SetGuidance("Shoot the incident particle from an isotropic direction.");
73  isoVert->SetGuidance(" Choice : on(default), off");
74  isoVert->SetParameterName("choice",true);
75  isoVert->SetDefaultValue("on");
76  isoVert->SetCandidates("on off");
78 
79  G4cout << "XrayFluoPlanePrimaryGeneratorMessenger created" << G4endl;
80 
81 }
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:240
void SetDefaultValue(const char *defVal)
void SetCandidates(const char *candidateList)
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

XrayFluoPlanePrimaryGeneratorMessenger::~XrayFluoPlanePrimaryGeneratorMessenger ( )

Definition at line 85 of file XrayFluoPlanePrimaryGeneratorMessenger.cc.

86 {
87  delete RndmCmd;
88  delete RndmVert;
89  delete spectrum;
90  delete isoVert;
91 
92  G4cout << "XrayFluoPlanePrimaryGeneratorMessenger deleted" << G4endl;
93 
94 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 98 of file XrayFluoPlanePrimaryGeneratorMessenger.cc.

99 {
100  if( command == RndmCmd )
101  {
102  XrayFluoAction->SetRndmFlag(newValue);
103  XrayFluoAction->SetRndmVert("off");
104  XrayFluoAction->SetIsoVert("off");
105  }
106 
107  if( command == RndmVert )
108  {
109  XrayFluoAction->SetRndmVert(newValue);
110  XrayFluoAction->SetIsoVert("off");
111  XrayFluoAction->SetRndmFlag("off");
112  }
113  if( command == spectrum )
114  { XrayFluoAction->SetSpectrum(newValue);}
115 
116  if( command == isoVert )
117  {
118  XrayFluoAction->SetIsoVert(newValue);
119  XrayFluoAction->SetRndmFlag("off");
120  XrayFluoAction->SetRndmVert("off");
121  }
122 }

Here is the call graph for this function:


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