53 void set_value(std::string name, T value,
bool bExit =
true);
58 std::string get_value_string(std::string property_name)
const;
65 void Amalgamate(
const Beam& optionsIn,
bool override,
int startFromEvent = 0);
68 bool HasBeenSet(
const std::string& name)
const;
70 inline const std::vector<std::string>& KeysOfSetValues()
const {
return setKeys;}
81 std::cout <<
"beam> setting value " << std::setw(25) << std::left << name << value << std::endl;
86 set(
this, name, value);
89 catch (
const std::runtime_error&)
91 std::cerr <<
"Error: beam> unknown beam parameter \"" << name <<
"\" with value \"" << value <<
"\"" << std::endl;
95 {std::rethrow_exception(std::current_exception());}
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
void print() const
Print some properties.
double get_value(std::string name) const
get method (only for doubles)
void Amalgamate(const Beam &optionsIn, bool override, int startFromEvent=0)
bool HasBeenSet(const std::string &name) const
Whether a parameter has been set using the set_value method or not.
void set_value(std::string name, T value, bool bExit=true)
set methods by property name
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.