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

#include <HepMCG4AsciiReaderMessenger.hh>

Inheritance diagram for HepMCG4AsciiReaderMessenger:
G4UImessenger G4UImessenger

Public Member Functions

 HepMCG4AsciiReaderMessenger (HepMCG4AsciiReader *agen)
 
 ~HepMCG4AsciiReaderMessenger ()
 
void SetNewValue (G4UIcommand *command, G4String newValues)
 
G4String GetCurrentValue (G4UIcommand *command)
 
 HepMCG4AsciiReaderMessenger (HepMCG4AsciiReader *agen)
 
 ~HepMCG4AsciiReaderMessenger ()
 
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
 

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 43 of file HepMCEx01/include/HepMCG4AsciiReaderMessenger.hh.

Constructor & Destructor Documentation

HepMCG4AsciiReaderMessenger::HepMCG4AsciiReaderMessenger ( HepMCG4AsciiReader agen)

Definition at line 41 of file HepMCEx01/src/HepMCG4AsciiReaderMessenger.cc.

42  : gen(agen)
43 {
44  dir= new G4UIdirectory("/generator/hepmcAscii/");
45  dir-> SetGuidance("Reading HepMC event from an Ascii file");
46 
47  verbose=
48  new G4UIcmdWithAnInteger("/generator/hepmcAscii/verbose", this);
49  verbose-> SetGuidance("Set verbose level");
50  verbose-> SetParameterName("verboseLevel", false, false);
51  verbose-> SetRange("verboseLevel>=0 && verboseLevel<=1");
52 
53  open= new G4UIcmdWithAString("/generator/hepmcAscii/open", this);
54  open-> SetGuidance("(re)open data file (HepMC Ascii format)");
55  open-> SetParameterName("input ascii file", true, true);
56 }
HepMCG4AsciiReaderMessenger::~HepMCG4AsciiReaderMessenger ( )

Definition at line 59 of file HepMCEx01/src/HepMCG4AsciiReaderMessenger.cc.

60 {
61  delete verbose;
62  delete open;
63 
64  delete dir;
65 }
HepMCG4AsciiReaderMessenger::HepMCG4AsciiReaderMessenger ( HepMCG4AsciiReader agen)
HepMCG4AsciiReaderMessenger::~HepMCG4AsciiReaderMessenger ( )

Member Function Documentation

G4String HepMCG4AsciiReaderMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 84 of file HepMCEx01/src/HepMCG4AsciiReaderMessenger.cc.

85 {
86  G4String cv;
87 
88  if (command == verbose) {
89  cv= verbose-> ConvertToString(gen-> GetVerboseLevel());
90  } else if (command == open) {
91  cv= gen-> GetFileName();
92  }
93  return cv;
94 }
G4String HepMCG4AsciiReaderMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

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

Reimplemented from G4UImessenger.

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

Reimplemented from G4UImessenger.

Definition at line 68 of file HepMCEx01/src/HepMCG4AsciiReaderMessenger.cc.

References G4cout, G4endl, and Initialize().

70 {
71  if (command==verbose) {
72  int level= verbose-> GetNewIntValue(newValues);
73  gen-> SetVerboseLevel(level);
74  } else if (command==open) {
75  gen-> SetFileName(newValues);
76  G4cout << "HepMC Ascii inputfile: "
77  << gen-> GetFileName() << G4endl;
78  gen-> Initialize();
79  }
80 }
void Initialize()
Definition: errprop.cc:96
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

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