Version: SMASH-3.2.2
smash::Configuration::Value Class Reference

Proxy object to be used when taking or reading keys in the configuration.

This type automatically converts to the target type e.g. on assignment. An object of this type is returned by the private take and read methods and it is constructed from the YAML::Node to be taken or read.

This class is an implementation detail of Configuration and can be ignored by users of Configuration.

Definition at line 813 of file configuration.h.

Public Member Functions

 Value (const Value &)=delete
 If you want to copy this you're doing it wrong. More...
 
Valueoperator= (const Value &)=delete
 If you want to copy this you're doing it wrong. More...
 
template<typename T >
 operator T () const
 This function determines the type it is assigned to and calls YAML::Node::as<T>() with this type. More...
 
template<typename T >
 operator std::vector< T > () const
 Check conversion exceptions. More...
 
template<typename T , size_t N>
 operator std::array< T, N > () const
 Cast array of keys to a std::array of length N. More...
 
 operator ReactionsBitSet () const
 Set ReactionBitSet from configuration values. More...
 
 operator MultiParticleReactionsBitSet () const
 Set MultiParticleReactionsBitSet from configuration values. More...
 
 operator std::set< ThermodynamicQuantity > () const
 Set thermodynamic quantity from configuration values. More...
 
 operator CalculationFrame () const
 Set calculation frame from configuration values. More...
 
 operator FermiMotion () const
 (De-)Activate Fermi motion from configuration values. More...
 
 operator DensityType () const
 Set density type from configuration values. More...
 
 operator ExpansionMode () const
 Set expansion mode from configuration values. More...
 
 operator DerivativesMode () const
 Set DerivativesMode. More...
 
 operator FieldDerivativesMode () const
 Set FieldDerivatives mode. More...
 
 operator SmearingMode () const
 Set SmearingMode. More...
 
 operator TimeStepMode () const
 Set time step mode from configuration values. More...
 
 operator BoxInitialCondition () const
 Set initial condition for box setup from configuration values. More...
 
 operator SphereInitialCondition () const
 Set initial condition for sphere setup from configuration values. More...
 
 operator NNbarTreatment () const
 Set treatment of N-Nbar reactions from configuration values. More...
 
 operator Sampling () const
 Set cross-section sampling method from configuration values. More...
 
 operator ThermalizationAlgorithm () const
 Set algorithm for forced thermalization from configuration values. More...
 
 operator CollisionCriterion () const
 Set collision criterion from configuration values. More...
 
 operator TotalCrossSectionStrategy () const
 Set total cross section strategy from configuration values. More...
 
 operator PseudoResonance () const
 Set how pseudo-resonances are used from configuration values. More...
 
 operator FluidizationType () const
 Set condition of fluidization for hydrodynamic initial conditions. More...
 
 operator OutputOnlyFinal () const
 Set OutputOnlyFinal for particles output from configuration values. More...
 
 operator FluidizableProcessesBitSet () const
 Set FluidizableProcessesBitSet from configuration values. More...
 

Private Member Functions

 Value (const YAML::Node &n, const char *key)
 Construct the Value wrapper from a YAML::Node. More...
 

Private Attributes

const YAML::Node node_
 a YAML leaf node More...
 
const char *const key_
 The key to be interpreted. More...
 

Friends

class Configuration
 

Constructor & Destructor Documentation

◆ Value() [1/2]

smash::Configuration::Value::Value ( const YAML::Node &  n,
const char *  key 
)
inlineprivate

Construct the Value wrapper from a YAML::Node.

Note
This constructor must be implicit, otherwise it's impossible to return an rvalue Value object - because the copy constructor is deleted.

Definition at line 827 of file configuration.h.

827  : node_(n), key_(key) {
828  if (!(n.IsScalar() || n.IsSequence() || n.IsMap())) {
829  std::stringstream err;
830  err << "Configuration value for \"" << key
831  << "\" is missing or invalid";
832  throw std::runtime_error(err.str());
833  }
834  }
const char *const key_
The key to be interpreted.
const YAML::Node node_
a YAML leaf node
constexpr int n
Neutron.

◆ Value() [2/2]

smash::Configuration::Value::Value ( const Value )
delete

If you want to copy this you're doing it wrong.

Member Function Documentation

◆ operator=()

Value& smash::Configuration::Value::operator= ( const Value )
delete

If you want to copy this you're doing it wrong.

◆ operator T()

template<typename T >
smash::Configuration::Value::operator T ( ) const
inline

This function determines the type it is assigned to and calls YAML::Node::as<T>() with this type.

This makes reading values more convenient than calling as<type>() explicitly.

Exceptions
IncorrectTypeInAssignment

Definition at line 851 of file configuration.h.

851  {
852  try {
853  return node_.as<T>();
854  } catch (YAML::TypedBadConversion<T> &e) {
855  throw IncorrectTypeInAssignment(
856  "The value for key \"" + std::string(key_) +
857  "\" cannot be converted to the requested type.");
858  }
859  }

◆ operator std::vector< T >()

template<typename T >
smash::Configuration::Value::operator std::vector< T > ( ) const
inline

Check conversion exceptions.

Exceptions
IncorrectTypeInAssignmentin case type conversion failed.

Definition at line 867 of file configuration.h.

867  {
868  try {
869  return node_.as<std::vector<T>>();
870  } catch (YAML::TypedBadConversion<T> &e) {
871  throw IncorrectTypeInAssignment(
872  "One of the values in the sequence for key \"" + std::string(key_) +
873  "\" failed to convert to the requested type. E.g. [1 2] is a "
874  "sequence of one string \"1 2\" and [1, 2] is a sequence of two "
875  "integers. Often there is just a comma missing in the config "
876  "file.");
877  } catch (YAML::TypedBadConversion<std::vector<T>> &e) {
878  throw IncorrectTypeInAssignment(
879  "The value for key \"" + std::string(key_) +
880  "\" cannot be converted to the requested type. A sequence was "
881  "expected but apparently not found.");
882  }
883  }

◆ operator std::array< T, N >()

template<typename T , size_t N>
smash::Configuration::Value::operator std::array< T, N > ( ) const
inline

Cast array of keys to a std::array of length N.

Returns
Array of std::array type.
Exceptions
IncorrectTypeInAssignmentin case the number of keys does not match the length of the newly generated array.

Definition at line 893 of file configuration.h.

893  {
894  const std::vector<T> vec = operator std::vector<T>();
895  const size_t n_read = vec.size();
896  // Alert if size does not match
897  if (n_read != N) {
898  throw IncorrectTypeInAssignment("Wrong number of values in array \"" +
899  std::string(key_) + "\". Expected " +
900  std::to_string(N) +
901  " values,"
902  " found " +
903  std::to_string(n_read) + ".");
904  }
905  std::array<T, N> arr;
906  std::copy_n(vec.begin(), N, arr.begin());
907  return arr;
908  }
std::string to_string(ThermodynamicQuantity quantity)
Convert a ThermodynamicQuantity enum value to its corresponding string.
Definition: stringify.cc:25

◆ operator ReactionsBitSet()

smash::Configuration::Value::operator ReactionsBitSet ( ) const
inline

Set ReactionBitSet from configuration values.

Returns
ReactionBitSet with all included reaction types.
Exceptions
IncorrectTypeInAssignmentin case a reaction type that is not available is provided as a configuration value.

Definition at line 917 of file configuration.h.

917  {
918  const std::vector<std::string> v = operator std::vector<std::string>();
919  ReactionsBitSet s;
920  for (const auto &x : v) {
921  if (x == "All") {
922  s.set();
923  break;
924  } else if (x == "Elastic") {
926  } else if (x == "NN_to_NR") {
928  } else if (x == "NN_to_DR") {
930  } else if (x == "KN_to_KN") {
932  } else if (x == "KN_to_KDelta") {
934  } else if (x == "Strangeness_exchange") {
936  } else if (x == "NNbar") {
938  } else if (x == "PiDeuteron_to_NN") {
940  } else if (x == "PiDeuteron_to_pidprime") {
942  } else if (x == "NDeuteron_to_Ndprime") {
944  } else {
945  throw IncorrectTypeInAssignment(
946  "The value for key \"" + std::string(key_) +
947  "\" should be \"All\", \"Elastic\", \"NN_to_NR\", \"NN_to_DR\","
948  "\"KN_to_KN\", \"KN_to_KDelta\", \"PiDeuteron_to_NN\", "
949  "\"PiDeuteron_to_pidprime\", \"NDeuteron_to_Ndprime\", "
950  "\"Strangeness_exchange\" or "
951  "\"NNbar\", or any combination of these.");
952  }
953  }
954  return s;
955  }
std::bitset< 10 > ReactionsBitSet
Container for the 2 to 2 reactions in the code.
@ KN_to_KDelta
@ KN_to_KN
@ NN_to_NR
@ PiDeuteron_to_pidprime
@ NDeuteron_to_Ndprime
@ Strangeness_exchange
@ PiDeuteron_to_NN
@ NN_to_DR

◆ operator MultiParticleReactionsBitSet()

smash::Configuration::Value::operator MultiParticleReactionsBitSet ( ) const
inline

Set MultiParticleReactionsBitSet from configuration values.

Returns
MultiParticleReactionsBitSet with all included reaction types.
Exceptions
IncorrectTypeInAssignmentin case a reaction type that is not available is provided as a configuration value.

Definition at line 964 of file configuration.h.

964  {
965  const std::vector<std::string> v = operator std::vector<std::string>();
967  for (const auto &x : v) {
968  if (x == "All") {
969  s.set();
970  break;
971  } else if (x == "Meson_3to1") {
973  } else if (x == "Deuteron_3to2") {
975  } else if (x == "NNbar_5to2") {
977  } else if (x == "A3_Nuclei_4to2") {
979  } else {
980  throw IncorrectTypeInAssignment(
981  "The value for key \"" + std::string(key_) +
982  "\" should be \"All\", \"Meson_3to1\", "
983  "\"Deuteron_3to2\" or \"NNbar_5to2\", "
984  "\"A3_Nuclei_4to2\", or any combination of "
985  "these.");
986  }
987  }
988  return s;
989  }
std::bitset< 4 > MultiParticleReactionsBitSet
Container for the n to m reactions in the code.
@ NNbar_5to2
@ A3_Nuclei_4to2
@ Deuteron_3to2
@ Meson_3to1

◆ operator std::set< ThermodynamicQuantity >()

smash::Configuration::Value::operator std::set< ThermodynamicQuantity > ( ) const
inline

Set thermodynamic quantity from configuration values.

Returns
Set of thermodynamic quantity.
Exceptions
IncorrectTypeInAssignmentin case a thermodynamic quantity that is not available is provided as a configuration value.

Definition at line 998 of file configuration.h.

998  {
999  const std::vector<std::string> v = operator std::vector<std::string>();
1000  std::set<ThermodynamicQuantity> s;
1001  for (const auto &x : v) {
1002  if (x == "rho_eckart") {
1004  } else if (x == "tmn") {
1005  s.insert(ThermodynamicQuantity::Tmn);
1006  } else if (x == "tmn_landau") {
1008  } else if (x == "landau_velocity") {
1010  } else if (x == "j_QBS") {
1011  s.insert(ThermodynamicQuantity::j_QBS);
1012  } else {
1013  throw IncorrectTypeInAssignment(
1014  "The value for key \"" + std::string(key_) +
1015  "\" should be \"rho_eckart\", \"tmn\""
1016  ", \"tmn_landau\", \"landau_velocity\" or \"j_QBS\".");
1017  }
1018  }
1019  return s;
1020  }
@ EckartDensity
Density in the Eckart frame.
@ Tmn
Energy-momentum tensor in lab frame.
@ LandauVelocity
Velocity of the Landau rest frame.
@ j_QBS
Electric (Q), baryonic (B) and strange (S) currents.
@ TmnLandau
Energy-momentum tensor in Landau rest frame.

◆ operator CalculationFrame()

smash::Configuration::Value::operator CalculationFrame ( ) const
inline

Set calculation frame from configuration values.

Returns
string of calculation frame.
Exceptions
IncorrectTypeInAssignmentin case a calculation frame that is not available is provided as a configuration value.

Definition at line 1029 of file configuration.h.

1029  {
1030  const std::string s = operator std::string();
1031  if (s == "center of velocity") {
1033  }
1034  if (s == "center of mass") {
1036  }
1037  if (s == "fixed target") {
1039  }
1040  throw IncorrectTypeInAssignment(
1041  "The value for key \"" + std::string(key_) +
1042  "\" should be \"center of velocity\" or \"center of mass\" "
1043  "or \"fixed target\".");
1044  }

◆ operator FermiMotion()

smash::Configuration::Value::operator FermiMotion ( ) const
inline

(De-)Activate Fermi motion from configuration values.

Returns
Fermi motion setup.
Exceptions
IncorrectTypeInAssignmentin case a Fermi motion value that is not available is provided as a configuration value.

Definition at line 1053 of file configuration.h.

1053  {
1054  const std::string s = operator std::string();
1055  if (s == "off") {
1056  return FermiMotion::Off;
1057  }
1058  if (s == "on") {
1059  return FermiMotion::On;
1060  }
1061  if (s == "frozen") {
1062  return FermiMotion::Frozen;
1063  }
1064  throw IncorrectTypeInAssignment(
1065  "The value for key \"" + std::string(key_) +
1066  "\" should be \"off\" or \"on\" or \"frozen\".");
1067  }
@ On
Use fermi motion in combination with potentials.
@ Frozen
Use fermi motion without potentials.
@ Off
Don't use fermi motion.

◆ operator DensityType()

smash::Configuration::Value::operator DensityType ( ) const
inline

Set density type from configuration values.

Returns
Density type.
Exceptions
IncorrectTypeInAssignmentin case a density type that is not available is provided as a configuration value.

Definition at line 1076 of file configuration.h.

1076  {
1077  const std::string s = operator std::string();
1078  if (s == "hadron") {
1079  return DensityType::Hadron;
1080  }
1081  if (s == "baryon") {
1082  return DensityType::Baryon;
1083  }
1084  if (s == "baryonic isospin") {
1086  }
1087  if (s == "pion") {
1088  return DensityType::Pion;
1089  }
1090  if (s == "total isospin") {
1092  }
1093  if (s == "none") {
1094  return DensityType::None;
1095  }
1096  throw IncorrectTypeInAssignment("The value for key \"" +
1097  std::string(key_) +
1098  "\" should be \"hadron\" or \"baryon\" "
1099  "or \"baryonic isospin\" or \"pion\" "
1100  "or \"none\".");
1101  }

◆ operator ExpansionMode()

smash::Configuration::Value::operator ExpansionMode ( ) const
inline

Set expansion mode from configuration values.

Returns
Expansion mode.
Exceptions
IncorrectTypeInAssignmentin case an expansion mode that is not available is provided as a configuration value.

Definition at line 1110 of file configuration.h.

1110  {
1111  const std::string s = operator std::string();
1112  if (s == "NoExpansion") {
1114  }
1115  if (s == "MasslessFRW") {
1117  }
1118  if (s == "MassiveFRW") {
1120  }
1121  if (s == "Exponential") {
1123  }
1124  throw IncorrectTypeInAssignment(
1125  "The value for key \"" + std::string(key_) +
1126  "\" should be \"NoExpansion\", \"MasslessFRW\"," +
1127  "\"MassiveFRW\" or \"Exponential\".");
1128  }

◆ operator DerivativesMode()

smash::Configuration::Value::operator DerivativesMode ( ) const
inline

Set DerivativesMode.

Definition at line 1133 of file configuration.h.

1133  {
1134  const std::string s = operator std::string();
1135  if (s == "Covariant Gaussian") {
1137  }
1138  if (s == "Finite difference") {
1140  }
1141  if (s == "Off") {
1142  return DerivativesMode::Off;
1143  }
1144  throw IncorrectTypeInAssignment(
1145  "The value for key \"" + std::string(key_) +
1146  "\" should be \"Covariant Gaussian\", \"Finite difference\"," +
1147  " or \"Off\".");
1148  }

◆ operator FieldDerivativesMode()

smash::Configuration::Value::operator FieldDerivativesMode ( ) const
inline

Set FieldDerivatives mode.

Definition at line 1153 of file configuration.h.

1153  {
1154  const std::string s = operator std::string();
1155  if (s == "Chain Rule") {
1157  }
1158  if (s == "Direct") {
1160  }
1161  throw IncorrectTypeInAssignment(
1162  "The value for key \"" + std::string(key_) +
1163  "\" should be \"Chain Rule\" or \"Direct\".");
1164  }

◆ operator SmearingMode()

smash::Configuration::Value::operator SmearingMode ( ) const
inline

Set SmearingMode.

Definition at line 1169 of file configuration.h.

1169  {
1170  const std::string s = operator std::string();
1171  if (s == "Covariant Gaussian") {
1173  }
1174  if (s == "Discrete") {
1175  return SmearingMode::Discrete;
1176  }
1177  if (s == "Triangular") {
1178  return SmearingMode::Triangular;
1179  }
1180  throw IncorrectTypeInAssignment(
1181  "The value for key \"" + std::string(key_) +
1182  "\" should be \"Covariant Gaussian\", \"Discrete\"," +
1183  " or \"Triangular\".");
1184  }

◆ operator TimeStepMode()

smash::Configuration::Value::operator TimeStepMode ( ) const
inline

Set time step mode from configuration values.

Returns
time step mode.
Exceptions
IncorrectTypeInAssignmentin case a time step mode that is not available is provided as a configuration value.

Definition at line 1193 of file configuration.h.

1193  {
1194  const std::string s = operator std::string();
1195  if (s == "None") {
1196  return TimeStepMode::None;
1197  }
1198  if (s == "Fixed") {
1199  return TimeStepMode::Fixed;
1200  }
1201  throw IncorrectTypeInAssignment("The value for key \"" +
1202  std::string(key_) +
1203  "\" should be \"None\" or \"Fixed\".");
1204  }
@ Fixed
Use fixed time step.
@ None
Don't use time steps; propagate from action to action.

◆ operator BoxInitialCondition()

smash::Configuration::Value::operator BoxInitialCondition ( ) const
inline

Set initial condition for box setup from configuration values.

Returns
Initial condition for box setup.
Exceptions
IncorrectTypeInAssignmentin case an initial conditions that is not available is provided as a configuration value.

Definition at line 1213 of file configuration.h.

1213  {
1214  const std::string s = operator std::string();
1215  if (s == "thermal momenta") {
1217  }
1218  if (s == "thermal momenta quantum") {
1220  }
1221  if (s == "peaked momenta") {
1223  }
1224  throw IncorrectTypeInAssignment(
1225  "The value for key \"" + std::string(key_) +
1226  "\" should be \"thermal momenta\", \"thermal momenta quantum\", " +
1227  "or \"peaked momenta\".");
1228  }
@ ThermalMomentaBoltzmann
A thermalized ensemble is generated, with momenta sampled from a Maxwell-Boltzmann distribution.
@ ThermalMomentaQuantum
A thermalized ensemble is generated, with momenta of baryons(mesons) sampled from a Fermi(Bose) distr...
@ PeakedMomenta
All particles have the same momentum with T being the temperature.

◆ operator SphereInitialCondition()

smash::Configuration::Value::operator SphereInitialCondition ( ) const
inline

Set initial condition for sphere setup from configuration values.

Returns
Initial condition for sphere setup.
Exceptions
IncorrectTypeInAssignmentin case an initial conditions that is not available is provided as a configuration value.

Definition at line 1237 of file configuration.h.

1237  {
1238  const std::string s = operator std::string();
1239  if (s == "thermal momenta") {
1241  }
1242  if (s == "thermal momenta quantum") {
1244  }
1245  if (s == "IC_ES") {
1247  }
1248  if (s == "IC_1M") {
1250  }
1251  if (s == "IC_2M") {
1253  }
1254  if (s == "IC_Massive") {
1256  }
1257  throw IncorrectTypeInAssignment(
1258  "The value for key \"" + std::string(key_) +
1259  "\" should be \"thermal momenta\", \"thermal momenta quantum\", " +
1260  "\"IC_ES\", \"IC_1M\", \"IC_2M\" or" + "\"IC_Massive\".");
1261  }
@ ThermalMomentaBoltzmann
A thermalized ensemble is generated, with momenta sampled from a Maxwell-Boltzmann distribution.
@ IC_ES
Off-equilibrium distribution used in massless comparisons of SMASH to the extended universe metric.
@ ThermalMomentaQuantum
A thermalized ensemble is generated, with momenta of baryons(mesons) sampled from a Fermi(Bose) distr...
@ IC_Massive
A generalization of IC_ES for the non-zero mass case; note that there is currently no analytical comp...
@ IC_2M
Off-equilibrium distribution used in massless comparisons of SMASH to the extended universe metric.
@ IC_1M
Off-equilibrium distribution used in massless comparisons of SMASH to the extended universe metric.

◆ operator NNbarTreatment()

smash::Configuration::Value::operator NNbarTreatment ( ) const
inline

Set treatment of N-Nbar reactions from configuration values.

Returns
N-Nbar treatment.
Exceptions
IncorrectTypeInAssignmentin case an N-Nbar treatment that is not available is provided as a configuration value.

Definition at line 1270 of file configuration.h.

1270  {
1271  const std::string s = operator std::string();
1272  if (s == "no annihilation") {
1274  }
1275  if (s == "resonances") {
1277  }
1278  if (s == "two to five") {
1280  }
1281  if (s == "strings") {
1282  return NNbarTreatment::Strings;
1283  }
1284  throw IncorrectTypeInAssignment(
1285  "The value for key \"" + std::string(key_) + "\" should be " +
1286  "\"no annihilation\", \"resonances\", \"two to five\" or " +
1287  " \"strings\".");
1288  }
@ NoAnnihilation
No Annihilation.
@ TwoToFive
Directly create 5 pions, use with multi-particle reactions.
@ Resonances
Use intermediate Resonances.
@ Strings
Use string fragmentation.

◆ operator Sampling()

smash::Configuration::Value::operator Sampling ( ) const
inline

Set cross-section sampling method from configuration values.

Returns
Sampling method of cross-section.
Exceptions
IncorrectTypeInAssignmentin case a sampling method that is not available is provided as a configuration value.

Definition at line 1297 of file configuration.h.

1297  {
1298  const std::string s = operator std::string();
1299  if (s == "quadratic") {
1300  return Sampling::Quadratic;
1301  }
1302  if (s == "custom") {
1303  return Sampling::Custom;
1304  }
1305  if (s == "uniform") {
1306  return Sampling::Uniform;
1307  }
1308  throw IncorrectTypeInAssignment(
1309  "The value for key \"" + std::string(key_) +
1310  "\" should be \"quadratic\", \"uniform\" or \"custom\".");
1311  }
@ Quadratic
Sample from areal / quadratic distribution.
@ Custom
Sample from custom, user-defined distribution.
@ Uniform
Sample from uniform distribution.

◆ operator ThermalizationAlgorithm()

smash::Configuration::Value::operator ThermalizationAlgorithm ( ) const
inline

Set algorithm for forced thermalization from configuration values.

Returns
Algorithm for forced thermalization.
Exceptions
IncorrectTypeInAssignmentin case a thermalization algorithm that is not available is provided as a configuration value.

Definition at line 1320 of file configuration.h.

1320  {
1321  const std::string s = operator std::string();
1322  if (s == "mode sampling") {
1324  }
1325  if (s == "biased BF") {
1327  }
1328  if (s == "unbiased BF") {
1330  }
1331  throw IncorrectTypeInAssignment(
1332  "The value for key \"" + std::string(key_) +
1333  "\" should be \"mode sampling\", \"biased BF\" or \"unbiased BF\".");
1334  }

◆ operator CollisionCriterion()

smash::Configuration::Value::operator CollisionCriterion ( ) const
inline

Set collision criterion from configuration values.

Returns
CollisionCriterion.
Exceptions
IncorrectTypeInAssignmentin case an collision criterion that is not available is provided as a configuration value.

Definition at line 1343 of file configuration.h.

1343  {
1344  const std::string s = operator std::string();
1345  if (s == "Geometric") {
1347  }
1348  if (s == "Stochastic") {
1350  }
1351  if (s == "Covariant") {
1353  }
1354  throw IncorrectTypeInAssignment(
1355  "The value for key \"" + std::string(key_) + "\" should be " +
1356  "\"Geometric\", \"Stochastic\" " + "or \"Covariant\".");
1357  }
@ Stochastic
Stochastic Criteiron.
@ Geometric
Geometric criterion.
@ Covariant
Covariant Criterion.

◆ operator TotalCrossSectionStrategy()

smash::Configuration::Value::operator TotalCrossSectionStrategy ( ) const
inline

Set total cross section strategy from configuration values.

Returns
TotalCrossSectionStrategy.
Exceptions
IncorrectTypeInAssignmentin case a strategy that is not available is provided as a configuration value.

Definition at line 1366 of file configuration.h.

1366  {
1367  const std::string s = operator std::string();
1368  if (s == "BottomUp") {
1370  }
1371  if (s == "TopDown") {
1373  }
1374  if (s == "TopDownMeasured") {
1376  }
1377  throw IncorrectTypeInAssignment(
1378  "The value for key \"" + std::string(key_) + "\" should be " +
1379  "\"BottomUp\", \"TopDown\" " + "or \"TopDownMeasured\".");
1380  }
@ TopDownMeasured
Mix the two above, using the parametrizations only for measured processes, and summing up partials fo...
@ TopDown
Use parametrizations based on existing data, rescaling with AQM for unmeasured processes.
@ BottomUp
Sum the existing partial contributions.

◆ operator PseudoResonance()

smash::Configuration::Value::operator PseudoResonance ( ) const
inline

Set how pseudo-resonances are used from configuration values.

Returns
PseudoResonance.
Exceptions
IncorrectTypeInAssignmentin case a key that is not available is provided as a configuration value.

Definition at line 1389 of file configuration.h.

1389  {
1390  const std::string s = operator std::string();
1391  if (s == "None") {
1392  return PseudoResonance::None;
1393  }
1394  if (s == "Largest") {
1395  return PseudoResonance::Largest;
1396  }
1397  if (s == "Closest") {
1398  return PseudoResonance::Closest;
1399  }
1400  if (s == "LargestFromUnstable") {
1402  }
1403  if (s == "ClosestFromUnstable") {
1405  }
1406  throw IncorrectTypeInAssignment(
1407  "The value for key \"" + std::string(key_) + "\" should be " +
1408  "\"None\", \"Largest\", \"Closest\", \"LargestFromUnstable\", or "
1409  "\"ClosestFromUnstable\".");
1410  }
@ Closest
Resonance with the pole mass closest from the invariant mass of incoming particles for all processes.
@ ClosestFromUnstable
Closest resonance for a given mass from processes with at least one resonance in the incoming particl...
@ None
No pseudo-resonance is created.
@ LargestFromUnstable
Heaviest possible resonance from processes with at least one resonance in the incoming particles.
@ Largest
Resonance of largest mass for all processes.

◆ operator FluidizationType()

smash::Configuration::Value::operator FluidizationType ( ) const
inline

Set condition of fluidization for hydrodynamic initial conditions.

Returns
FluidizationType.
Exceptions
IncorrectTypeInAssignmentin case a key that is not available is provided as a configuration value.

Definition at line 1420 of file configuration.h.

1420  {
1421  const std::string s = operator std::string();
1422  if (s == "Constant_Tau") {
1424  } else if (s == "Dynamic") {
1426  }
1427  throw IncorrectTypeInAssignment("The value for key \"" +
1428  std::string(key_) + "\" should be " +
1429  "\"Constant_Tau\" or \"Dynamic\".");
1430  }
@ ConstantTau
Hypersurface crossed at a fixed proper time.
@ Dynamic
Dynamic fluidization based on local densities.

◆ operator OutputOnlyFinal()

smash::Configuration::Value::operator OutputOnlyFinal ( ) const
inline

Set OutputOnlyFinal for particles output from configuration values.

Returns
OutputOnlyFinal.
Exceptions
IncorrectTypeInAssignmentin case only_final value that is not available is provided as a configuration value.

Definition at line 1439 of file configuration.h.

1439  {
1440  const std::string s = operator std::string();
1441  if (s == "Yes") {
1442  return OutputOnlyFinal::Yes;
1443  }
1444  if (s == "No") {
1445  return OutputOnlyFinal::No;
1446  }
1447  if (s == "IfNotEmpty") {
1449  }
1450  throw IncorrectTypeInAssignment("The value for key \"" +
1451  std::string(key_) + "\" should be " +
1452  "\"Yes\", \"No\" or \"IfNotEmpty\".");
1453  }
@ IfNotEmpty
Print only final-state particles, and those only if the event is not empty.
@ Yes
Print only final-state particles.
@ No
Print initial, intermediate and final-state particles.

◆ operator FluidizableProcessesBitSet()

smash::Configuration::Value::operator FluidizableProcessesBitSet ( ) const
inline

Set FluidizableProcessesBitSet from configuration values.

Returns
FluidizableProcessesBitSet with all included reaction types.
Exceptions
IncorrectTypeInAssignmentin case a reaction type that is not available is provided as a configuration value.

Definition at line 1462 of file configuration.h.

1462  {
1463  const std::vector<std::string> v = operator std::vector<std::string>();
1465  for (const auto &x : v) {
1466  if (x == "All") {
1467  s.set();
1468  break;
1469  } else if (x == "Elastic") {
1471  } else if (x == "Decay") {
1473  } else if (x == "Inelastic") {
1475  } else if (x == "SoftString") {
1477  } else if (x == "HardString") {
1479  } else {
1480  throw IncorrectTypeInAssignment(
1481  "The value for key \"" + std::string(key_) +
1482  "\" should be \"All\", \"Elastic\", \"Decay\", "
1483  "\"Inelastic\", \"SoftString\", \"HardString\", "
1484  "or any combination of these.");
1485  }
1486  }
1487  return s;
1488  }
std::bitset< 5 > FluidizableProcessesBitSet
@ From_HardString
@ From_Inelastic
@ From_Elastic
@ From_SoftString
@ From_Decay

Friends And Related Function Documentation

◆ Configuration

friend class Configuration
friend

Definition at line 814 of file configuration.h.

Member Data Documentation

◆ node_

const YAML::Node smash::Configuration::Value::node_
private

a YAML leaf node

Todo:
(steinberg) What is that?

Definition at line 817 of file configuration.h.

◆ key_

const char* const smash::Configuration::Value::key_
private

The key to be interpreted.

Definition at line 819 of file configuration.h.


The documentation for this class was generated from the following file: