Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
HepMCG4AsciiReaderMessenger Class Reference

#include <Doxymodules_eventgenerator.h>

Inheritance diagram for HepMCG4AsciiReaderMessenger:
G4UImessenger

Public Member Functions

 HepMCG4AsciiReaderMessenger (HepMCG4AsciiReader *agen)
 
 ~HepMCG4AsciiReaderMessenger ()
 
void SetNewValue (G4UIcommand *command, G4String newValues)
 
G4String GetCurrentValue (G4UIcommand *command)
 

Private Attributes

HepMCG4AsciiReadergen
 
G4UIdirectorydir
 
G4UIcmdWithAnIntegerverbose
 
G4UIcmdWithAStringopen
 

Detailed Description

Definition at line 57 of file Doxymodules_eventgenerator.h.

Constructor & Destructor Documentation

◆ HepMCG4AsciiReaderMessenger()

HepMCG4AsciiReaderMessenger::HepMCG4AsciiReaderMessenger ( HepMCG4AsciiReader agen)

Definition at line 39 of file HepMCG4AsciiReaderMessenger.cc.

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

◆ ~HepMCG4AsciiReaderMessenger()

HepMCG4AsciiReaderMessenger::~HepMCG4AsciiReaderMessenger ( )

Definition at line 58 of file HepMCG4AsciiReaderMessenger.cc.

59{
60 delete verbose;
61 delete open;
62
63 delete dir;
64}

Member Function Documentation

◆ SetNewValue()

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

Definition at line 67 of file HepMCG4AsciiReaderMessenger.cc.

69{
70 if (command==verbose) {
71 int level= verbose-> GetNewIntValue(newValues);
72 gen-> SetVerboseLevel(level);
73 } else if (command==open) {
74 gen-> SetFileName(newValues);
75 G4cout << "HepMC Ascii inputfile: "
76 << gen-> GetFileName() << G4endl;
77 gen-> Initialize();
78 }
79}
void Initialize()
Definition errProp.cc:100

◆ GetCurrentValue()

G4String HepMCG4AsciiReaderMessenger::GetCurrentValue ( G4UIcommand command)

Definition at line 83 of file HepMCG4AsciiReaderMessenger.cc.

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

Member Data Documentation

◆ gen

HepMCG4AsciiReader* HepMCG4AsciiReaderMessenger::gen
private

Definition at line 51 of file HepMCG4AsciiReaderMessenger.hh.

◆ dir

G4UIdirectory* HepMCG4AsciiReaderMessenger::dir
private

Definition at line 53 of file HepMCG4AsciiReaderMessenger.hh.

◆ verbose

G4UIcmdWithAnInteger* HepMCG4AsciiReaderMessenger::verbose
private

Definition at line 54 of file HepMCG4AsciiReaderMessenger.hh.

◆ open

G4UIcmdWithAString* HepMCG4AsciiReaderMessenger::open
private

Definition at line 55 of file HepMCG4AsciiReaderMessenger.hh.


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

Applications | User Support | Publications | Collaboration