67 delete fSetH2TitleCmd;
68 delete fSetH2XAxisCmd;
69 delete fSetH2YAxisCmd;
70 delete fSetH2ZAxisCmd;
79 void G4H2Messenger::CreateH2Cmd()
88 h2xNbins0->
SetGuidance(
"Number of x-bins (default = 100)");
89 h2xNbins0->
SetGuidance(
"Can be reset with /analysis/h2/set command");
93 h2xValMin0->
SetGuidance(
"Minimum x-value, expressed in unit (default = 0.)");
94 h2xValMin0->
SetGuidance(
"Can be reset with /analysis/h2/set command");
98 h2xValMax0->
SetGuidance(
"Maximum x-value, expressed in unit (default = 1.)");
99 h2xValMax0->
SetGuidance(
"Can be reset with /analysis/h2/set command");
103 h2xValUnit0->
SetGuidance(
"The unit of xvalMin0 and xvalMax0");
107 G4String fcnxGuidance =
"The function applied to filled x-values (log, log10, exp, none).\n";
108 fcnxGuidance +=
"Note that the unit parameter cannot be omitted in this case,\n";
109 fcnxGuidance +=
"but none value should be used insted.";
115 h2yNbins0->
SetGuidance(
"Number of y-bins (default = 100)");
116 h2yNbins0->
SetGuidance(
"Can be reset with /analysis/h2/set command");
120 h2yValMin0->
SetGuidance(
"Minimum y-value, expressed in unit (default = 0.)");
121 h2yValMin0->
SetGuidance(
"Can be reset with /analysis/h2/set command");
125 h2yValMax0->
SetGuidance(
"Maximum y-value, expressed in unit (default = 1.)");
126 h2yValMax0->
SetGuidance(
"Can be reset with /analysis/h2/set command");
130 h2yValUnit0->
SetGuidance(
"The unit of xvalMin0 and yvalMax0");
134 G4String fcnyGuidance =
"The function applied to filled x-values (log, log10, exp, none).\n";
135 fcnyGuidance +=
"Note that the unit parameter cannot be omitted in this case,\n";
136 fcnyGuidance +=
"but none value should be used insted.";
141 fCreateH2Cmd =
new G4UIcommand(
"/analysis/h2/create",
this);
160 void G4H2Messenger::SetH2Cmd()
170 h2xValMin->
SetGuidance(
"Minimum x-value, expressed in unit");
173 h2xValMax->
SetGuidance(
"Maximum x-value, expressed in unit");
177 G4String fcnxGuidance =
"The function applied to filled x-values (log, log10, exp, none).\n";
178 fcnxGuidance +=
"Note that the unit parameter cannot be omitted in this case,\n";
179 fcnxGuidance +=
"but none value should be used insted.";
184 h2yValUnit->
SetGuidance(
"The unit of yvalMin and yvalMax");
191 h2yValMin->
SetGuidance(
"Minimum y-value, expressed in unit");
194 h2yValMax->
SetGuidance(
"Maximum y-value, expressed in unit");
197 h2xValUnit->
SetGuidance(
"The unit of xvalMin and xvalMax");
202 G4String fcnyGuidance =
"The function applied to filled y-values (log, log10, exp, none).\n";
203 fcnyGuidance +=
"Note that the unit parameter cannot be omitted in this case,\n";
204 fcnyGuidance +=
"but none value should be used insted.";
208 fSetH2Cmd =
new G4UIcommand(
"/analysis/h2/set",
this);
209 fSetH2Cmd->
SetGuidance(
"Set parameters for the 2D histogram of #Id :");
210 fSetH2Cmd->
SetGuidance(
" nbins; valMin; valMax; unit (of vmin and vmax)");
226 void G4H2Messenger::SetH2TitleCmd()
236 fSetH2TitleCmd =
new G4UIcommand(
"/analysis/h2/setTitle",
this);
237 fSetH2TitleCmd->
SetGuidance(
"Set title for the 2D histogram of #Id");
244 void G4H2Messenger::SetH2XAxisCmd()
254 fSetH2XAxisCmd =
new G4UIcommand(
"/analysis/h2/setXaxis",
this);
255 fSetH2XAxisCmd->
SetGuidance(
"Set x-axis title for the 2D histogram of #Id");
262 void G4H2Messenger::SetH2YAxisCmd()
272 fSetH2YAxisCmd =
new G4UIcommand(
"/analysis/h2/setYaxis",
this);
273 fSetH2YAxisCmd->
SetGuidance(
"Set y-axis title for the 2D histogram of #Id");
280 void G4H2Messenger::SetH2ZAxisCmd()
290 fSetH2ZAxisCmd =
new G4UIcommand(
"/analysis/h2/setYaxis",
this);
291 fSetH2ZAxisCmd->
SetGuidance(
"Set y-axis title for the 2D histogram of #Id");
304 if ( command == fCreateH2Cmd ) {
306 G4int xnbins, ynbins;
307 G4double xvmin, xvmax, yvmin, yvmax;
308 G4String xsunit,xsfcn, ysunit, ysfcn;
309 std::istringstream is(newValues.
data());
311 >> xnbins >> xvmin >> xvmax >> xsunit >> xsfcn
312 >> ynbins >> yvmin >> yvmax >> ysunit >> ysfcn;
314 xnbins, xvmin, xvmax, ynbins, yvmin, yvmax,
315 ysunit, ysfcn, ysunit, ysfcn);
317 else if ( command == fSetH2Cmd ) {
319 G4int xnbins, ynbins;
320 G4double xvmin, xvmax, yvmin, yvmax;
321 G4String xsunit,xsfcn, ysunit, ysfcn;
322 std::istringstream is(newValues.
data());
324 >> xnbins >> xvmin >> xvmax >> xsunit >> xsfcn
325 >> ynbins >> yvmin >> yvmax >> ysunit >> ysfcn;
327 xnbins, xvmin, xvmax, ynbins, yvmin, yvmax,
328 ysunit, ysfcn, ysunit, ysfcn);
330 else if ( command == fSetH2TitleCmd ) {
333 std::istringstream is(newValues.
data());
338 else if ( command == fSetH2XAxisCmd ) {
341 std::istringstream is(newValues.
data());
346 else if ( command == fSetH2YAxisCmd ) {
349 std::istringstream is(newValues.
data());
354 else if ( command == fSetH2ZAxisCmd ) {
357 std::istringstream is(newValues.
data());
void SetParameter(G4UIparameter *const newParameter)
void SetParameterRange(const char *theRange)
void SetParameterCandidates(const char *theString)
G4bool SetH2YAxisTitle(G4int id, const G4String &title)
void SetDefaultValue(const char *theDefaultValue)
G4bool SetH2ZAxisTitle(G4int id, const G4String &title)
void SetGuidance(const char *aGuidance)
void AvailableForStates(G4ApplicationState s1)
G4bool SetH2(G4int id, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear")
G4bool SetH2Title(G4int id, const G4String &title)
const char * data() const
subroutine title(NA, NB, NCA, NCB)
virtual void SetNewValue(G4UIcommand *command, G4String value)
void SetGuidance(const char *theGuidance)
G4H2Messenger(G4VAnalysisManager *manager)
G4bool SetH2XAxisTitle(G4int id, const G4String &title)
G4int CreateH2(const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinScheme="linear", const G4String &ybinScheme="linear")