51 void set_value(std::string name, T value);
56 std::string get_value_string(std::string property_name)
const;
63 void Amalgamate(
const Beam& optionsIn,
bool override,
int startFromEvent = 0);
66 bool HasBeenSet(
const std::string& name)
const;
68 inline const std::vector<std::string>& KeysOfSetValues()
const {
return setKeys;}
79 std::cout <<
"beam> setting value " << std::setw(25) << std::left << name << value << std::endl;
84 set(
this, name, value);
87 catch (
const std::runtime_error&)
89 std::cerr <<
"Error: beam> unknown beam parameter \"" << name <<
"\" with value \"" << value <<
"\"" << std::endl;
Options for a beam distribution.
std::vector< std::string > setKeys
A list of all the keys that have been set in this instance.
void PublishMembers()
publish members so these can be looked up from parser
double get_value(std::string name) const
get method (only for doubles)
void Amalgamate(const Beam &optionsIn, bool override, int startFromEvent=0)
void set_value(std::string name, T value)
set methods by property name
bool HasBeenSet(const std::string &name) const
Whether a parameter has been set using the set_value method or not.
Class that provides introspection to its members.
void set(BeamBase *instance, const std::string &name, double value)
Parser namespace for GMAD language. Combination of Geant4 and MAD.