14 #include "G4UIcommand.hh"
15 #include "G4UIparameter.hh"
16 #include "G4UIcmdWithAnInteger.hh"
17 #include "G4UIcmdWith3VectorAndUnit.hh"
18 #include "G4Tokenizer.hh"
24 G4String comName =
"/eAST/component/"+compName;
25 setupCmd =
new G4UIcmdWithAnInteger(comName,
this);
26 G4String msg =
"Activate ";
28 setupCmd->SetGuidance(msg);
29 setupCmd->SetParameterName(
"verboselevel",
true);
30 setupCmd->SetDefaultValue(0);
31 setupCmd->SetRange(
"verboselevel>=0");
32 setupCmd->AvailableForStates(G4State_PreInit);
33 setupCmd->SetToBeBroadcasted(
false);
38 G4String com = comDir+
"locate";
39 locCmd =
new G4UIcmdWith3VectorAndUnit(com,
this);
40 locCmd->SetGuidance(
"Locate the component in the global coordinate.");
41 locCmd->SetParameterName(
"x",
"y",
"z",
false);
42 locCmd->SetDefaultUnit(
"mm");
43 locCmd->AvailableForStates(G4State_PreInit);
44 locCmd->SetToBeBroadcasted(
false);
46 com = comDir+
"rotate";
47 rotCmd =
new G4UIcommand(com,
this);
48 rotCmd->SetGuidance(
"Rotate the component in the global coordinate.");
49 auto param =
new G4UIparameter(
"axis",
's',
false);
50 param->SetParameterCandidates(
"x y z");
51 rotCmd->SetParameter(param);
52 param =
new G4UIparameter(
"angle",
'd',
false);
53 rotCmd->SetParameter(param);
54 param =
new G4UIparameter(
"unit",
's',
true);
55 param->SetDefaultUnit(
"deg");
56 rotCmd->SetParameter(param);
57 rotCmd->AvailableForStates(G4State_PreInit);
58 rotCmd->SetToBeBroadcasted(
false);
76 G4Tokenizer next(val);
78 G4double ang = StoD(next()) * G4UIcommand::ValueOf(next());