358 vector<G4AttValue>::const_iterator iValue;
359 for (iValue = fpValues->begin(); iValue != fpValues->end(); ++iValue) {
360 const G4String& valueName = iValue->GetName();
362 map<G4String,G4AttDef>::const_iterator iDef =
363 fpDefinitions->find(valueName);
364 if (iDef == fpDefinitions->end()) {
367 const G4String& category = iDef->second.GetCategory();
368 const G4String& extra = iDef->second.GetExtra();
369 const G4String& valueType = iDef->second.GetValueType();
370 if (fCategories->find(category) == fCategories->end() ||
371 (category ==
"Physics" && fUnits->find(extra) == fUnits->end()) ||
372 fValueTypes->find(valueType) == fValueTypes->end()) {
375 if (category !=
"Physics") {
376 standardValues->push_back(*iValue);
377 (*standardDefinitions)[valueName] =
378 fpDefinitions->find(valueName)->second;
381 if (valueType ==
"G4ThreeVector") {
385 (standardValues,standardDefinitions,
386 valueName,valueName+
"-X",
388 fpDefinitions->find(valueName)->second.GetDesc()+
"-X");
390 (standardValues,standardDefinitions,
391 valueName,valueName+
"-Y",
393 fpDefinitions->find(valueName)->second.GetDesc()+
"-Y");
395 (standardValues,standardDefinitions,
396 valueName,valueName+
"-Z",
398 fpDefinitions->find(valueName)->second.GetDesc()+
"-Z");
400 standardValues->push_back(*iValue);
401 (*standardDefinitions)[valueName] =
402 fpDefinitions->find(valueName)->second;
407 if (extra ==
"G4BestUnit") {
408 valueAndUnit =
value;
409 valueAndUnit = valueAndUnit.
strip();
410 unit = valueAndUnit.substr(valueAndUnit.rfind(
' ')+1);
412 valueAndUnit = value +
' ' + extra;
413 valueAndUnit = valueAndUnit.
strip();
417 if (fUnitCategories->find(unitCategory) != fUnitCategories->end()) {
418 G4String standardUnit = (*fStandardUnits)[unitCategory];
422 if (valueType ==
"G4ThreeVector") {
426 (standardValues,standardDefinitions,
427 valueName,valueName+
"-X",
429 (internalValue.
x()/valueOfStandardUnit),
431 fpDefinitions->find(valueName)->second.GetDesc()+
"-X");
433 (standardValues,standardDefinitions,
434 valueName,valueName+
"-Y",
436 (internalValue.
y()/valueOfStandardUnit),
438 fpDefinitions->find(valueName)->second.GetDesc()+
"-Y");
440 (standardValues,standardDefinitions,
441 valueName,valueName+
"-Z",
443 (internalValue.
z()/valueOfStandardUnit),
445 fpDefinitions->find(valueName)->second.GetDesc()+
"-Z");
450 (standardValues,standardDefinitions,
453 (internalValue/valueOfStandardUnit),
463 G4cerr <<
"G4AttCheck::Standard: Conversion error." <<
G4endl;
G4String strip(G4int strip_Type=trailing, char c=' ')
static G4String ConvertToString(G4bool boolVal)
static G4ThreeVector ConvertTo3Vector(const char *st)
static G4double ConvertToDimensionedDouble(const char *st)
static G4double GetValueOf(const G4String &)
const XML_Char int const XML_Char * value
static G4String GetCategory(const G4String &)
static PROLOG_HANDLER error
G4GLOB_DLL std::ostream G4cerr
static G4ThreeVector ConvertToDimensioned3Vector(const char *st)