14 #include "G4UIcommand.hh"
15 #include "G4UIparameter.hh"
16 #include "G4UnitsTable.hh"
21 G4UIparameter* para =
nullptr;
25 setTimeCmd =
new G4UIcommand(
"/eAST/generator/setTime",
this);
26 setTimeCmd->SetGuidance(
"Set the start time of each event");
27 setTimeCmd->SetGuidance(
" t = deltaT * eventID + T0");
28 para =
new G4UIparameter(
"deltaT",
'd',
false);
30 para =
new G4UIparameter(
"T0",
'd',
false);
32 para =
new G4UIparameter(
"unit",
's',
true);
33 para->SetDefaultUnit(
"microsecond");
35 setTimeCmd->AvailableForStates(G4State_Init,G4State_Idle);
43 #include "G4Tokenizer.hh"
49 G4Tokenizer next(val);
50 G4double deltaT = StoD(next());
51 G4double T0 = StoD(next());
52 G4double uVal = G4UIcommand::ValueOf(next());
65 std::ostringstream os;
66 os <<
"deltaT = " << G4BestUnit(deltaT,
"Time") <<
" T0 = " << G4BestUnit(T0,
"Time");