125 std::size_t n_parameterEntry = parameter.size();
126 if (n_parameterEntry != 0) {
130 for (std::size_t i_thParameter = 0; i_thParameter < n_parameterEntry; ++i_thParameter) {
131 if (i_thParameter > 0) {
132 correctParameters.append(
" ");
134 aToken = parameterToken();
135 if (aToken.length() > 0 && aToken[0] ==
'"') {
136 while (aToken.back() !=
'"' || (aToken.length() == 1 && aToken[0] ==
'"')) {
137 G4String additionalToken = parameterToken();
138 if (additionalToken.empty()) {
142 aToken += additionalToken;
145 else if (i_thParameter == n_parameterEntry - 1
146 && parameter[i_thParameter]->GetParameterType() ==
's')
149 while (!((anotherToken = parameterToken()).empty())) {
150 std::size_t idxs = anotherToken.find(
'#');
151 if (idxs == std::string::npos) {
153 aToken += anotherToken;
157 aToken += anotherToken.substr(0, idxs);
166 if (aToken.empty() || aToken ==
"!") {
167 if (parameter[i_thParameter]->IsOmittable()) {
168 if (parameter[i_thParameter]->GetCurrentAsDefault()) {
169 G4Tokenizer cvSt(messenger->GetCurrentValue(
this));
171 for (std::size_t ii = 0; ii < i_thParameter; ++ii) {
173 if (parVal[0] ==
'"') {
174 while (parVal.back() !=
'"') {
176 if (additionalToken.empty()) {
180 parVal += additionalToken;
185 if (aCVToken[0] ==
'"') {
186 while (aCVToken.back() !=
'"') {
188 if (additionalToken.empty()) {
192 aCVToken += additionalToken;
195 correctParameters.append(aCVToken);
198 correctParameters.append(parameter[i_thParameter]->GetDefaultValue());
206 G4int stat = parameter[i_thParameter]->CheckNewValue(aToken);
208 return stat +
G4int(i_thParameter);
210 correctParameters.append(aToken);
223 messenger->SetNewValue(
this, std::move(correctParameters));
298 auto ucatIter = std::find_if(std::cbegin(UTbl), std::cend(UTbl), [&unitCategory](
const auto& ud) {
299 return ud->GetName() == unitCategory;
302 if (ucatIter == std::cend(UTbl)) {
303 G4cerr <<
"Unit category <" << unitCategory <<
"> is not defined." <<
G4endl;
311 for (
const auto& uDef : UCnt) {
312 symList += uDef->GetSymbol();
314 nameList += uDef->GetName();
318 G4StrUtil::rstrip(symList);