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

#include <XrayFluoMercuryPrimaryGenerationAction.hh>

Inheritance diagram for XrayFluoMercuryPrimaryGeneratorMessenger:
Collaboration diagram for XrayFluoMercuryPrimaryGeneratorMessenger:

Public Member Functions

 XrayFluoMercuryPrimaryGeneratorMessenger (XrayFluoMercuryPrimaryGeneratorAction *)
 
 ~XrayFluoMercuryPrimaryGeneratorMessenger ()
 
void SetNewValue (G4UIcommand *, G4String)
 
 XrayFluoMercuryPrimaryGeneratorMessenger (XrayFluoMercuryPrimaryGeneratorAction *)
 
 ~XrayFluoMercuryPrimaryGeneratorMessenger ()
 
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 52 of file XrayFluoMercuryPrimaryGenerationAction.hh.

Constructor & Destructor Documentation

XrayFluoMercuryPrimaryGeneratorMessenger::XrayFluoMercuryPrimaryGeneratorMessenger ( XrayFluoMercuryPrimaryGeneratorAction XrayFluoGun)

Definition at line 45 of file XrayFluoMercuryPrimaryGeneratorMessenger.cc.

46 :XrayFluoAction(XrayFluoGun)
47 {
48  spectrum = new G4UIcmdWithAString("/gun/spectrum",this);
49  spectrum->SetGuidance("Shoot the incident particle with a certain energy spectrum.");
50  spectrum->SetGuidance(" Choice : on(default), off");
51  spectrum->SetParameterName("choice",true);
52  spectrum->SetDefaultValue("on");
53  spectrum->SetCandidates("on off");
55 
56  globalCmd = new G4UIcmdWithABool("/gun/globalIllumunation",this);
57  globalCmd->SetGuidance("Illuminate the entire Mercury globe, not only the area seen by the optics");
58  globalCmd->SetGuidance("Choice : true, 1, false, 0");
59  globalCmd->SetParameterName("illuminaton",true);
60  globalCmd->SetDefaultValue("false");
61  globalCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
62 
63  G4cout << "XrayFluoMercuryPrimaryGeneratorMessenger created" << G4endl;
64 
65 }
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:

XrayFluoMercuryPrimaryGeneratorMessenger::~XrayFluoMercuryPrimaryGeneratorMessenger ( )

Definition at line 69 of file XrayFluoMercuryPrimaryGeneratorMessenger.cc.

70 {
71  delete spectrum;
72  delete globalCmd;
73 
74  G4cout << "XrayFluoMercuryPrimaryGeneratorMessenger deleted" << G4endl;
75 
76 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
XrayFluoMercuryPrimaryGeneratorMessenger::XrayFluoMercuryPrimaryGeneratorMessenger ( XrayFluoMercuryPrimaryGeneratorAction )
XrayFluoMercuryPrimaryGeneratorMessenger::~XrayFluoMercuryPrimaryGeneratorMessenger ( )

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 80 of file XrayFluoMercuryPrimaryGeneratorMessenger.cc.

81 {
82 
83  if( command == spectrum )
84  { XrayFluoAction->SetSpectrum(newValue);}
85 
86  if( command == globalCmd )
87  {
88  G4bool newGlobalFlag = globalCmd->GetNewBoolValue(newValue);
89  XrayFluoAction->SetGlobalFlag(newGlobalFlag);
90  }
91 }
bool G4bool
Definition: G4Types.hh:79

Here is the call graph for this function:

void XrayFluoMercuryPrimaryGeneratorMessenger::SetNewValue ( G4UIcommand ,
G4String   
)
virtual

Reimplemented from G4UImessenger.


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