4 #include "G4UIdirectory.hh"
5 #include "G4UIcommand.hh"
6 #include "G4UIparameter.hh"
7 #include "G4UIcmdWithAString.hh"
8 #include "G4UIcmdWithABool.hh"
14 WCSimIODir->SetGuidance(
"Commands to select I/O options");
16 RootFile =
new G4UIcmdWithAString(
"/WCSimIO/RootFile",
this);
17 RootFile->SetGuidance(
"Set the root file name");
18 RootFile->SetGuidance(
"Enter the name of the output ROOT file");
19 RootFile->SetParameterName(
"RootFileName",
true);
20 RootFile->SetDefaultValue(
"wcsim.root");
22 UseTimer =
new G4UIcmdWithABool(
"/WCSimIO/Timer",
this);
23 UseTimer->SetGuidance(
"Use a timer for runtime");
24 UseTimer->SetParameterName(
"UseTimer",
true);
41 G4cout <<
"Output ROOT file set to " << newValue << G4endl;
45 bool use =
UseTimer->GetNewBoolValue(newValue);
47 G4cout <<
"WCSimRunAction timer " << (use ?
"ENABLED" :
"DISABLED") << G4endl;
~WCSimRunActionMessenger()
G4UIdirectory * WCSimIODir
WCSimRunActionMessenger(WCSimRunAction *mpga)
void SetUseTimer(bool use)
void SetRootFileName(G4String fname)
G4UIcmdWithABool * UseTimer
WCSimRunAction * WCSimRun
void SetNewValue(G4UIcommand *command, G4String newValues)
G4UIcmdWithAString * RootFile