#include <G4AnalysisMessengerHelper.hh>
◆ G4AnalysisMessengerHelper()
G4AnalysisMessengerHelper::G4AnalysisMessengerHelper |
( |
const G4String & |
hnType | ) |
|
|
explicit |
◆ ~G4AnalysisMessengerHelper()
G4AnalysisMessengerHelper::~G4AnalysisMessengerHelper |
( |
| ) |
|
◆ CreateHnDirectory()
std::unique_ptr< G4UIdirectory > G4AnalysisMessengerHelper::CreateHnDirectory |
( |
| ) |
const |
Definition at line 134 of file G4AnalysisMessengerHelper.cc.
137 directory->SetGuidance(
Update(
"NDIM_D LOBJECT control"));
G4String Update(const G4String &str, const G4String &axis="") const
◆ CreateSetAxisCommand()
Definition at line 259 of file G4AnalysisMessengerHelper.cc.
263 parId->SetGuidance(
Update(
"OBJECT id"));
264 parId->SetParameterRange(
"id>=0");
267 parAxis->SetGuidance(
Update(
"Histogram AXIS-axis title", axis));
268 parAxis->SetDefaultValue(
"none");
270 std::unique_ptr<G4UIcommand> command(
272 command->SetGuidance(
Update(
"Set AXIS-axis title for the NDIM_D LOBJECT of given id", axis));
273 command->SetParameter(parId);
274 command->SetParameter(parAxis);
G4String Update(const G4String &str, const G4String &axis="") const
◆ CreateSetBinsCommand()
Definition at line 166 of file G4AnalysisMessengerHelper.cc.
170 parId->SetGuidance(
Update(
"OBJECT id"));
171 parId->SetParameterRange(
"id>=0");
174 parNbins->SetGuidance(
"Number of bins");
177 parValMin->SetGuidance(
"Minimum value, expressed in unit");
180 parValMax->SetGuidance(
"Maximum value, expressed in unit");
183 parValUnit->SetGuidance(
"The unit applied to filled values and valMin, valMax");
184 parValUnit->SetDefaultValue(
"none");
187 parValFcn->SetParameterCandidates(
"log log10 exp none");
188 G4String fcnGuidance =
"The function applied to filled values (log, log10, exp, none).\n";
189 fcnGuidance +=
"Note that the unit parameter cannot be omitted in this case,\n";
190 fcnGuidance +=
"but none value should be used instead.";
191 parValFcn->SetGuidance(fcnGuidance);
192 parValFcn->SetDefaultValue(
"none");
194 auto parValBinScheme =
new G4UIparameter(
"valBinScheme",
's',
true);
195 parValBinScheme->SetParameterCandidates(
"linear log");
196 G4String binSchemeGuidance =
"The binning scheme (linear, log).\n";
198 +=
"Note that the unit and fcn parameters cannot be omitted in this case,\n";
199 binSchemeGuidance +=
"but none value should be used instead.";
200 parValBinScheme->SetGuidance(binSchemeGuidance);
201 parValBinScheme->SetDefaultValue(
"linear");
203 std::unique_ptr<G4UIcommand> command(
205 command->SetGuidance(
Update(
"Set parameters for the NDIM_D LOBJECT of given id:"));
206 command->SetGuidance(
207 Update(
" nAXISbins; AXISvalMin; AXISvalMax; AXISunit; AXISfunction; AXISbinScheme", axis));
208 command->SetParameter(parId);
209 command->SetParameter(parNbins);
210 command->SetParameter(parValMin);
211 command->SetParameter(parValMax);
212 command->SetParameter(parValUnit);
213 command->SetParameter(parValFcn);
214 command->SetParameter(parValBinScheme);
G4String Update(const G4String &str, const G4String &axis="") const
◆ CreateSetTitleCommand()
Definition at line 143 of file G4AnalysisMessengerHelper.cc.
146 parId->SetGuidance(
Update(
"OBJECT id"));
147 parId->SetParameterRange(
"id>=0");
150 parTitle->SetGuidance(
Update(
"OBJECT title"));
151 parTitle->SetDefaultValue(
"none");
153 std::unique_ptr<G4UIcommand> command(
155 command->SetGuidance(
Update(
"Set title for the NDIM_D LOBJECT of given id"));
156 command->SetParameter(parId);
157 command->SetParameter(parTitle);
G4String Update(const G4String &str, const G4String &axis="") const
◆ CreateSetValuesCommand()
Definition at line 222 of file G4AnalysisMessengerHelper.cc.
226 parId->SetGuidance(
Update(
"OBJECT id"));
227 parId->SetParameterRange(
"id>=0");
230 parValMin->SetGuidance(
Update(
"Minimum AXIS-value expressed in unit", axis));
233 parValMax->SetGuidance(
Update(
"Maximum AXIS-value expressed in unit", axis));
236 parValUnit->SetGuidance(
"The unit applied to filled values and valMin, valMax");
237 parValUnit->SetDefaultValue(
"none");
240 parValFcn->SetParameterCandidates(
"log log10 exp none");
241 G4String fcnGuidance =
"The function applied to filled values (log, log10, exp, none).\n";
242 fcnGuidance +=
"Note that the unit parameter cannot be omitted in this case,\n";
243 fcnGuidance +=
"but none value should be used instead.";
244 parValFcn->SetGuidance(fcnGuidance);
245 parValFcn->SetDefaultValue(
"none");
247 std::unique_ptr<G4UIcommand> command(
249 command->SetGuidance(
Update(
"Set parameters for the NDIM_D LOBJECT of #id:"));
250 command->SetGuidance(
251 Update(
" AXISvalMin; AXISvalMax; AXISunit; AXISfunction", axis));
G4String Update(const G4String &str, const G4String &axis="") const
◆ GetBinData()
void G4AnalysisMessengerHelper::GetBinData |
( |
BinData & |
data, |
|
|
std::vector< G4String > & |
parameters, |
|
|
G4int & |
counter |
|
) |
| const |
Definition at line 281 of file G4AnalysisMessengerHelper.cc.
288 data.fSunit = parameters[counter++];
289 data.fSfcn = parameters[counter++];
290 data.fSbinScheme = parameters[counter++];
static G4double ConvertToDouble(const char *st)
static G4int ConvertToInt(const char *st)
◆ GetValueData()
void G4AnalysisMessengerHelper::GetValueData |
( |
ValueData & |
data, |
|
|
std::vector< G4String > & |
parameters, |
|
|
G4int & |
counter |
|
) |
| const |
Definition at line 294 of file G4AnalysisMessengerHelper.cc.
300 data.fSunit = parameters[counter++];
301 data.fSfcn = parameters[counter++];
static G4double ConvertToDouble(const char *st)
◆ Update()
Definition at line 92 of file G4AnalysisMessengerHelper.cc.
98 upperHnType.toUpper();
99 Replace(newStr,
"UHNTYPE_", upperHnType);
102 Replace(newStr,
"HNTYPE_",
fHnType);
106 Replace(newStr,
"NDIM_", second);
110 lowerObjectType.toLower();
111 Replace(newStr,
"LOBJECT", lowerObjectType);
114 Replace(newStr,
"OBJECT", ObjectType(
fHnType));
119 Replace(newStr,
"UAXIS", upperAxis);
122 Replace(newStr,
"AXIS", axis);
static const double second
◆ WarnAboutParameters()
void G4AnalysisMessengerHelper::WarnAboutParameters |
( |
G4UIcommand * |
command, |
|
|
G4int |
nofParameters |
|
) |
| const |
Definition at line 305 of file G4AnalysisMessengerHelper.cc.
311 <<
"\" parameters: " << nofParameters
const G4String & GetCommandName() const
std::ostringstream G4ExceptionDescription
G4String Update(const G4String &str, const G4String &axis="") const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4int GetParameterEntries() const
◆ WarnAboutSetCommands()
void G4AnalysisMessengerHelper::WarnAboutSetCommands |
( |
| ) |
const |
Definition at line 320 of file G4AnalysisMessengerHelper.cc.
324 <<
"Command setX, setY, setZ must be called sucessively in this order. " <<
G4endl 325 <<
"Command was ignored." <<
G4endl;
std::ostringstream G4ExceptionDescription
G4String Update(const G4String &str, const G4String &axis="") const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
◆ G4HnMessenger
◆ fHnType
G4String G4AnalysisMessengerHelper::fHnType |
|
private |
The documentation for this class was generated from the following files: