58 void set_value(std::string property, T value);
68 std::cout <<
"element> Setting value " << std::setw(25) << std::left <<
property << value << std::endl;
74 catch(
const std::runtime_error&) {
76 if (property ==
"harmon" || property ==
"lag" || property ==
"volt")
79 std::cerr <<
"Error: element> unknown parameter \"" <<
property <<
"\" with value " << value << std::endl;
88 setMap.at(publishedName) =
true;
void set(C *instance, const std::string &name, double value)
Parser namespace for GMAD language. Combination of Geant4 and MAD.
std::string getPublishedName(const std::string &name) const
returns 'official' member name for property
Parameters - Element class with booleans.
std::map< std::string, bool > setMap
Map that holds booleans for every member of element.
void inherit_properties(const Element &e)
void flush()
Reset the parameters to defaults and setMap.
void set_value(std::string property, T value)
Set method by property name and value.