34 #include "G4UIdirectory.hh" 36 #include "G4UIcmdWith3Vector.hh" 37 #include "G4UIcmdWithADoubleAndUnit.hh" 38 #include "G4UIcmdWithAString.hh" 39 #include "G4ThreeVector.hh" 56 wormDir =
new G4UIdirectory(
"/vis/wormPlot/");
57 wormDir->SetGuidance(
"WormPlot commands.");
59 xAxisCmd =
new G4UIcmdWith3Vector(
"/vis/wormPlot/xAxis",
this);
60 xAxisCmd->SetGuidance(
"Define the xAxis direction vector");
61 xAxisCmd->SetParameterName(
"x",
"y",
"z",
true);
62 xAxisCmd->SetDefaultValue(G4ThreeVector(0.0, 0.0, 1.0));
64 xNameCmd =
new G4UIcmdWithAString(
"/vis/wormPlot/xName",
this);
65 xNameCmd->SetGuidance(
"Define the name of the plot xAxis");
66 xNameCmd->SetParameterName(
"xName",
true);
69 yAxisCmd =
new G4UIcmdWith3Vector(
"/vis/wormPlot/yAxis",
this);
70 yAxisCmd->SetGuidance(
"Define the yAxis direction vector");
71 yAxisCmd->SetParameterName(
"x",
"y",
"z",
true);
72 yAxisCmd->SetDefaultValue(G4ThreeVector(0.0, 1.0, 0.0));
74 yNameCmd =
new G4UIcmdWithAString(
"/vis/wormPlot/yName",
this);
75 yNameCmd->SetGuidance(
"Define the name of the plot yAxis");
76 yNameCmd->SetParameterName(
"yName",
true);
79 xMinCmd =
new G4UIcmdWithADoubleAndUnit(
"/vis/wormPlot/xMin",
this);
80 xMinCmd->SetGuidance(
"Set the minimum co-ordinate for the plot's x axis");
81 xMinCmd->SetParameterName(
"x",
true);
85 xMaxCmd =
new G4UIcmdWithADoubleAndUnit(
"/vis/wormPlot/xMax",
this);
86 xMaxCmd->SetGuidance(
"Set the maximum co-ordinate for the plot's x axis");
87 xMaxCmd->SetParameterName(
"x",
true);
91 yMinCmd =
new G4UIcmdWithADoubleAndUnit(
"/vis/wormPlot/yMin",
this);
92 yMinCmd->SetGuidance(
"Set the minimum co-ordinate for the plot's y axis");
93 yMinCmd->SetParameterName(
"y",
true);
97 yMaxCmd =
new G4UIcmdWithADoubleAndUnit(
"/vis/wormPlot/yMax",
this);
98 yMaxCmd->SetGuidance(
"Set the maximum co-ordinate for the plot's y axis");
99 yMaxCmd->SetParameterName(
"y",
true);
103 z0Cmd =
new G4UIcmdWithADoubleAndUnit(
"/vis/wormPlot/z0",
this);
104 z0Cmd->SetGuidance(
"Set the z (third axis) co-ordinate of the plot's x-y plane position");
105 z0Cmd->SetParameterName(
"z",
true);
106 z0Cmd->SetDefaultUnit(
"m");
107 z0Cmd->SetDefaultValue(0.0);
109 fileCmd =
new G4UIcmdWithAString(
"/vis/wormPlot/createPlot",
this);
110 fileCmd->SetGuidance(
"Create the worm plot; specify the name of the output file");
111 fileCmd->SetParameterName(
"fileName",
true);
112 fileCmd->SetDefaultValue(
"wormPlot.png");
113 fileCmd->AvailableForStates(G4State_Idle);
135 G4String currentValue(
"");
141 }
else if (command ==
xMinCmd) {
143 }
else if (command ==
xMaxCmd) {
145 }
else if (command ==
yMinCmd) {
147 }
else if (command ==
yMaxCmd) {
166 }
else if (command ==
xMinCmd) {
168 }
else if (command ==
xMaxCmd) {
170 }
else if (command ==
yMinCmd) {
172 }
else if (command ==
yMaxCmd) {
174 }
else if (command ==
z0Cmd) {
176 }
else if (command ==
fileCmd) {
void SetYMax(const G4double &val)
LBNFWormPlotMessenger(LBNFWormPlotter *wPlot)
void SetYAxis(const G4ThreeVector &vect)
G4UIcmdWithAString * yNameCmd
void SetYMin(const G4double &val)
void CreatePlot(const G4String &fileName)
G4UIcmdWithADoubleAndUnit * yMaxCmd
G4ThreeVector GetXAxis() const
void SetXMax(const G4double &val)
G4UIcmdWith3Vector * yAxisCmd
virtual G4String GetCurrentValue(G4UIcommand *command)
virtual ~LBNFWormPlotMessenger()
G4UIcmdWithAString * fileCmd
void SetXAxis(const G4ThreeVector &vect)
static LBNFWormPlotMessenger * fpInstance
G4UIcmdWithADoubleAndUnit * xMaxCmd
void SetYName(const G4String &word)
G4UIcmdWithAString * xNameCmd
G4UIcmdWith3Vector * xAxisCmd
G4UIcmdWithADoubleAndUnit * yMinCmd
LBNFWormPlotter * theWorm
virtual void SetNewValue(G4UIcommand *command, G4String newValue)
void SetXName(const G4String &word)
G4UIcmdWithADoubleAndUnit * z0Cmd
void SetXMin(const G4double &val)
void SetZ0(const G4double &val)
G4ThreeVector GetYAxis() const
G4UIcmdWithADoubleAndUnit * xMinCmd
static LBNFWormPlotMessenger * GetInstance(LBNFWormPlotter *wPlot)