Hammer
1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
|
container for an Hammer run option More...
#include <Setting.hh>
Public Types | |
using | WrittenSettingType = std::pair< flatbuffers::Offset< void >, Serial::FBSettingTypes > |
Public Member Functions | |
Setting () | |
default constructor More... | |
Setting (const Setting &other)=default | |
Setting & | operator= (const Setting &other) |
Setting (Setting &&other)=default | |
Setting & | operator= (Setting &&other)=default |
~Setting ()=default | |
Setting (const Serial::FBSetting *msgreader) | |
template<typename T > | |
T * | getValue () |
access the setting value More... | |
template<typename T > | |
const T * | getValue () const |
access the setting value (const version) More... | |
template<typename T > | |
void | setValue (const T &value) |
modify the setting value More... | |
template<typename T > | |
T * | getDefault () |
get the default value of this setting More... | |
template<typename T > | |
const T * | getDefault () const |
get the default value of this setting (const version) More... | |
template<typename T > | |
void | setDefault (const T &value) |
modify the setting default value More... | |
void | reset () |
reset the contents of the settings More... | |
bool | wasChanged () const |
bool | isSame (const Setting &other) const |
void | setDefault () |
void | update (const Setting &other) |
std::string | toString (const bool useDefault=false) const |
properly format the value of the setting (so that can be e.g. More... | |
WrittenSettingType | write (flatbuffers::FlatBufferBuilder *msgwriter) const |
Static Public Member Functions | |
static void | setEncodeUseDefault (bool useDefault) |
Private Types | |
using | MatrixType = std::vector< std::vector< double >> |
using | SettingType = boost::variant< boost::blank, bool, int, double, std::string, std::complex< double >, std::vector< std::string >, std::vector< double >, MatrixType > |
data type for the setting values More... | |
Private Member Functions | |
void | read (const Serial::FBSetting *msgreader) |
Private Attributes | |
SettingType | _value |
setting value More... | |
SettingType | _default |
setting default value More... | |
Static Private Attributes | |
static bool | _encodeUseDefault = false |
Friends | |
struct | SettingEncoder |
struct | SettingChecker |
class | SettingWriter |
struct | SettingStringConverter |
struct | YAML::convert<::Hammer::Setting > |
container for an Hammer run option
stores the value, name, owner, description and default value of an Hammer option
Definition at line 39 of file Setting.hh.
|
private |
Definition at line 112 of file Setting.hh.
|
private |
data type for the setting values
Definition at line 116 of file Setting.hh.
using Hammer::Setting::WrittenSettingType = std::pair<flatbuffers::Offset<void>, Serial::FBSettingTypes> |
Definition at line 98 of file Setting.hh.
Hammer::Setting::Setting | ( | ) |
default constructor
Definition at line 268 of file Setting.cc.
|
default |
|
default |
|
default |
Hammer::Setting::Setting | ( | const Serial::FBSetting * | msgreader | ) |
Definition at line 270 of file Setting.cc.
T * Hammer::Setting::getDefault | ( | ) |
get the default value of this setting
nullptr
if the data type does not match Definition at line 37 of file SettingDefs.hh.
const T * Hammer::Setting::getDefault | ( | ) | const |
get the default value of this setting (const
version)
nullptr
if the data type does not match Definition at line 42 of file SettingDefs.hh.
T * Hammer::Setting::getValue | ( | ) |
access the setting value
nullptr
if the data type does not match Definition at line 19 of file SettingDefs.hh.
const T * Hammer::Setting::getValue | ( | ) | const |
access the setting value (const
version)
nullptr
if the data type does not match Definition at line 24 of file SettingDefs.hh.
bool Hammer::Setting::isSame | ( | const Setting & | other | ) | const |
Definition at line 299 of file Setting.cc.
Definition at line 274 of file Setting.cc.
|
private |
Definition at line 325 of file Setting.cc.
void Hammer::Setting::reset | ( | ) |
reset the contents of the settings
Definition at line 286 of file Setting.cc.
void Hammer::Setting::setDefault | ( | const T & | value | ) |
modify the setting default value
[in] | value | the new default value of the setting |
Definition at line 47 of file SettingDefs.hh.
void Hammer::Setting::setDefault | ( | ) |
Definition at line 304 of file Setting.cc.
|
static |
Definition at line 290 of file Setting.cc.
void Hammer::Setting::setValue | ( | const T & | value | ) |
modify the setting value
[in] | value | the new value of the setting |
Definition at line 29 of file SettingDefs.hh.
string Hammer::Setting::toString | ( | const bool | useDefault = false | ) | const |
properly format the value of the setting (so that can be e.g.
displayed on a screen)
[in] | useDefault | whether to use the current value or the default value |
Definition at line 385 of file Setting.cc.
void Hammer::Setting::update | ( | const Setting & | other | ) |
Definition at line 308 of file Setting.cc.
bool Hammer::Setting::wasChanged | ( | ) | const |
Definition at line 294 of file Setting.cc.
Setting::WrittenSettingType Hammer::Setting::write | ( | flatbuffers::FlatBufferBuilder * | msgwriter | ) | const |
Definition at line 320 of file Setting.cc.
|
friend |
Definition at line 106 of file Setting.hh.
|
friend |
Definition at line 105 of file Setting.hh.
|
friend |
Definition at line 108 of file Setting.hh.
|
friend |
Definition at line 107 of file Setting.hh.
|
friend |
Definition at line 109 of file Setting.hh.
|
private |
setting default value
Definition at line 126 of file Setting.hh.
|
staticprivate |
Definition at line 128 of file Setting.hh.
|
private |
setting value
Definition at line 124 of file Setting.hh.