252 if (!ac.fpDefinitions) {
253 os <<
"G4AttCheck: ERROR: zero definitions pointer." << endl;
258 os << storeKey <<
':' << endl;
262 os <<
"G4AttCheck: zero values pointer." << endl;
265 vector<G4AttValue>::const_iterator iValue;
266 for (iValue = ac.fpValues->begin(); iValue != ac.fpValues->end(); ++iValue) {
267 const G4String& valueName = iValue->GetName();
269 map<G4String,G4AttDef>::const_iterator iDef =
270 ac.fpDefinitions->find(valueName);
272 if (iDef == ac.fpDefinitions->end()) {
274 os <<
"G4AttCheck: ERROR: No G4AttDef for G4AttValue \""
275 << valueName <<
"\": " << value << endl;
277 const G4String& category = iDef->second.GetCategory();
279 const G4String& valueType = iDef->second.GetValueType();
280 if (ac.fCategories->find(category) == ac.fCategories->end()) {
283 "G4AttCheck: ERROR: Illegal Category Field \"" << category
284 <<
"\" for G4AttValue \"" << valueName <<
"\": " << value <<
285 "\n Possible Categories:";
286 set<G4String>::iterator i;
287 for (i = ac.fCategories->begin(); i != ac.fCategories->end(); ++i) {
292 if(category ==
"Physics" && ac.fUnits->find(extra) == ac.fUnits->end()) {
295 "G4AttCheck: ERROR: Illegal Extra field \""<< extra
296 <<
"\" for G4AttValue \"" << valueName <<
"\": " << value <<
297 "\n Possible Extra fields if Category==\"Physics\":\n ";
298 set<G4String>::iterator i;
299 for (i = ac.fUnits->begin(); i != ac.fUnits->end(); ++i) {
304 if (ac.fValueTypes->find(valueType) == ac.fValueTypes->end()) {
307 "G4AttCheck: ERROR: Illegal Value Type field \"" << valueType
308 <<
"\" for G4AttValue \"" << valueName <<
"\": " << value <<
309 "\n Possible Value Types:";
310 set<G4String>::iterator i;
311 for (i = ac.fValueTypes->begin(); i != ac.fValueTypes->end(); ++i) {
318 os << iDef->second.GetDesc()
321 if (iDef->second.GetCategory() ==
"Physics" &&
322 !iDef->second.GetExtra().empty()) {
323 os <<
" (" << iDef->second.GetExtra() <<
")";
G4bool GetStoreKey(const std::map< G4String, G4AttDef > *definitions, G4String &key)
const XML_Char int const XML_Char * value
static PROLOG_HANDLER error