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

#include <H02PrimaryGeneratorMessenger.hh>

Inheritance diagram for H02PrimaryGeneratorMessenger:
Collaboration diagram for H02PrimaryGeneratorMessenger:

Public Member Functions

 H02PrimaryGeneratorMessenger (H02PrimaryGeneratorAction *genaction)
 
 ~H02PrimaryGeneratorMessenger ()
 
void SetNewValue (G4UIcommand *command, G4String newValues)
 
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
 
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 45 of file H02PrimaryGeneratorMessenger.hh.

Constructor & Destructor Documentation

H02PrimaryGeneratorMessenger::H02PrimaryGeneratorMessenger ( H02PrimaryGeneratorAction genaction)

Definition at line 43 of file H02PrimaryGeneratorMessenger.cc.

44  : primaryAction(genaction)
45 {
46  dir= new G4UIdirectory("/generator/");
47  dir-> SetGuidance("Control commands for primary generator");
48 
49  //verbose= new G4UIcmdWithAnInteger("/generator/verbose", this);
50  //verbose-> SetGuidance("set verbose level (0,1,2)");
51  //verbose-> SetParameterName("verbose", false, false);
52  //verbose-> SetDefaultValue(0);
53  //verbose-> SetRange("verbose>=0 && verbose<=2");
54 
55  select= new G4UIcmdWithAString("/generator/select", this);
56  select-> SetGuidance("select generator type");
57  select-> SetParameterName("generator_type", false, false);
58  select-> SetCandidates("particleGun pythia hepmcAscii");
59  select-> SetDefaultValue("particleGun");
60 }
H02PrimaryGeneratorMessenger::~H02PrimaryGeneratorMessenger ( )

Definition at line 63 of file H02PrimaryGeneratorMessenger.cc.

64 {
65  //delete verbose;
66  delete select;
67 
68  delete dir;
69 }

Member Function Documentation

G4String H02PrimaryGeneratorMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 84 of file H02PrimaryGeneratorMessenger.cc.

85 {
86  G4String cv, st;
87  if (command == select) {
88  cv= primaryAction-> GetGeneratorName();
89  }
90 
91  return cv;
92 }
void H02PrimaryGeneratorMessenger::SetNewValue ( G4UIcommand command,
G4String  newValues 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 72 of file H02PrimaryGeneratorMessenger.cc.

74 {
75  if ( command==select) {
76  primaryAction-> SetGenerator(newValues);
77  G4cout << "current generator type: "
78  << primaryAction-> GetGeneratorName() << G4endl;
79  } else {
80  }
81 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

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