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

#include <ExN04PrimaryGeneratorMessenger.hh>

Inheritance diagram for ExN04PrimaryGeneratorMessenger:
Collaboration diagram for ExN04PrimaryGeneratorMessenger:

Public Member Functions

 ExN04PrimaryGeneratorMessenger (ExN04PrimaryGeneratorAction *genaction)
 
 ~ExN04PrimaryGeneratorMessenger ()
 
void SetNewValue (G4UIcommand *command, G4String newValues)
 
G4String GetCurrentValue (G4UIcommand *command)
 
 ExN04PrimaryGeneratorMessenger (ExN04PrimaryGeneratorAction *mpga)
 
 ~ExN04PrimaryGeneratorMessenger ()
 
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 46 of file ExN04PrimaryGeneratorMessenger.hh.

Constructor & Destructor Documentation

ExN04PrimaryGeneratorMessenger::ExN04PrimaryGeneratorMessenger ( ExN04PrimaryGeneratorAction genaction)

Definition at line 44 of file ExN04PrimaryGeneratorMessenger.cc.

45  : primaryAction(genaction)
46 {
47  mydetdir = new G4UIdirectory("/mydet/");
48  mydetdir-> SetGuidance("ExN04 detector control commands.");
49 
50  dir= new G4UIdirectory("/generator/");
51  dir-> SetGuidance("Control commands for primary generator");
52 
53  select= new G4UIcmdWithAString("/generator/select", this);
54  select-> SetGuidance("select generator type");
55  select-> SetParameterName("generator_type", false, false);
56  select-> SetCandidates("particleGun pythia hepmcAscii");
57  select-> SetDefaultValue("particleGun");
58 }
ExN04PrimaryGeneratorMessenger::~ExN04PrimaryGeneratorMessenger ( )

Definition at line 61 of file ExN04PrimaryGeneratorMessenger.cc.

62 {
63  delete select;
64  delete mydetdir;
65  delete dir;
66 }
ExN04PrimaryGeneratorMessenger::ExN04PrimaryGeneratorMessenger ( ExN04PrimaryGeneratorAction mpga)
ExN04PrimaryGeneratorMessenger::~ExN04PrimaryGeneratorMessenger ( )

Member Function Documentation

G4String ExN04PrimaryGeneratorMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

G4String ExN04PrimaryGeneratorMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 81 of file ExN04PrimaryGeneratorMessenger.cc.

82 {
83  G4String cv, st;
84  if ( command == select ) {
85  cv = primaryAction-> GetGeneratorName();
86  }
87 
88  return cv;
89 }
void ExN04PrimaryGeneratorMessenger::SetNewValue ( G4UIcommand command,
G4String  newValues 
)
virtual

Reimplemented from G4UImessenger.

void ExN04PrimaryGeneratorMessenger::SetNewValue ( G4UIcommand command,
G4String  newValues 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 69 of file ExN04PrimaryGeneratorMessenger.cc.

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

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