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

#include <RE05PrimaryGeneratorMessenger.hh>

Inheritance diagram for RE05PrimaryGeneratorMessenger:
G4UImessenger

Public Member Functions

 RE05PrimaryGeneratorMessenger (RE05PrimaryGeneratorAction *mpga)
 
virtual ~RE05PrimaryGeneratorMessenger ()
 
virtual void SetNewValue (G4UIcommand *command, G4String newValues)
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
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 42 of file RE05PrimaryGeneratorMessenger.hh.

Constructor & Destructor Documentation

RE05PrimaryGeneratorMessenger::RE05PrimaryGeneratorMessenger ( RE05PrimaryGeneratorAction mpga)

Definition at line 38 of file RE05PrimaryGeneratorMessenger.cc.

References G4UIcmdWithAString::SetCandidates(), G4UIcmdWithAString::SetDefaultValue(), G4UIcommand::SetGuidance(), and G4UIcmdWithAString::SetParameterName().

39 :myAction(mpga)
40 {
41  mydetDirectory = new G4UIdirectory("/mydet/");
42  mydetDirectory->SetGuidance("RE05 detector control commands.");
43 
44  genCmd = new G4UIcmdWithAString("/mydet/generator",this);
45  genCmd->SetGuidance("Select primary generator.");
46  genCmd->SetGuidance(" Available generators : PYTHIA, particleGun");
47  genCmd->SetParameterName("generator",true);
48  genCmd->SetDefaultValue("PYTHIA");
49  genCmd->SetCandidates("PYTHIA particleGun");
50 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void SetDefaultValue(const char *defVal)
void SetCandidates(const char *candidateList)
RE05PrimaryGeneratorMessenger::~RE05PrimaryGeneratorMessenger ( )
virtual

Definition at line 52 of file RE05PrimaryGeneratorMessenger.cc.

53 {
54  delete genCmd;
55  delete mydetDirectory;
56 }

Member Function Documentation

G4String RE05PrimaryGeneratorMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 64 of file RE05PrimaryGeneratorMessenger.cc.

References RE05PrimaryGeneratorAction::GetHEPEvtGenerator().

65 {
66  G4String cv;
67 
68  if( command==genCmd )
69  {
70  if(myAction->GetHEPEvtGenerator())
71  { cv = "PYTHIA"; }
72  else
73  { cv = "particleGun"; }
74  }
75 
76  return cv;
77 }
void RE05PrimaryGeneratorMessenger::SetNewValue ( G4UIcommand command,
G4String  newValues 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 58 of file RE05PrimaryGeneratorMessenger.cc.

References RE05PrimaryGeneratorAction::SetHEPEvtGenerator().

59 {
60  if( command==genCmd )
61  { myAction->SetHEPEvtGenerator(newValue=="PYTHIA"); }
62 }

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