Skip to content

Commit

Permalink
Updated getParameter for PdtEntry for new string handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr15Jones committed Sep 9, 2023
1 parent 3da8a15 commit 4b961fa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions SimGeneral/HepPDTRecord/src/PdtEntry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ namespace edm {
return PdtEntry(e.getInt32());
else if (e.typeCode() == 'S')
return PdtEntry(e.getString());
else if (e.typeCode() == 'Z')
return PdtEntry(e.getString());
else
throw Exception(errors::Configuration, "EntryError")
<< "can not convert representation of " << name << " to value of type PdtEntry. "
Expand All @@ -65,6 +67,11 @@ namespace edm {
for (std::vector<std::string>::const_iterator i = v.begin(); i != v.end(); ++i)
ret.push_back(PdtEntry(*i));
return ret;
} else if (e.typeCode() == 'z') {
std::vector<std::string> v(e.getVString());
for (std::vector<std::string>::const_iterator i = v.begin(); i != v.end(); ++i)
ret.push_back(PdtEntry(*i));
return ret;
} else
throw Exception(errors::Configuration, "EntryError")
<< "can not convert representation of " << name << " to value of type PdtEntry. "
Expand Down

0 comments on commit 4b961fa

Please sign in to comment.