58 void set_value(std::string property, T value,
bool bExit =
true);
68 std::cout <<
"element> Setting value " << std::setw(25) << std::left <<
property << value << std::endl;
75 catch(
const std::runtime_error&)
78 if (property ==
"harmon" || property ==
"lag" || property ==
"volt")
81 std::cerr <<
"Error: element> unknown parameter \"" <<
property <<
"\" with value " << value << std::endl;
89 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, bool bExit=true)
Set method by property name and value.