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

#include <configuration.h>

Return type of Configuration::take that automatically determines the target type.

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

Definition at line 308 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 >
convert_for (const T &) const
 Convert the value to the type of the supplied argument. 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 OutputOnlyFinal () const
 Set OutputOnlyFinal for particles output 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 322 of file configuration.h.

322  : node_(n), key_(key) {
323  if (!(n.IsScalar() || n.IsSequence() || n.IsMap())) {
324  std::stringstream err;
325  err << "Configuration value for \"" << key
326  << "\" is missing or invalid";
327  throw std::runtime_error(err.str());
328  }
329  }
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.

◆ convert_for()

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

Convert the value to the type of the supplied argument.

The argument itself is not used other than to determine its type. This function is necessary because in some situations the overload resolution rules lead to the correct conversion becoming hidden. Then you'll see a compiler error with a list of ambiguous constructor calls as candidates. Use this function as a workaround. Example:

// this doesn't compile:
const PdgCode code0(config.take({"key"}));
// this compiles (because PdgCode::operator= is not overloaded), but note
// that it cannot be used in constructor initializer lists:
const PdgCode code1 = config.take({"key"});
// Thus, for class member variables use the following pattern:
class X {
public:
X() : code_(config.take({"key"}).convert_for(code_)) {}
private:
const PdgCode code_;
};
T convert_for(const T &) const
Convert the value to the type of the supplied argument.
Value take(std::initializer_list< const char * > keys)
The default interface for SMASH to read configuration values.

Definition at line 364 of file configuration.h.

364  {
365  return *this;
366  }

◆ 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 377 of file configuration.h.

377  {
378  try {
379  return node_.as<T>();
380  } catch (YAML::TypedBadConversion<T> &e) {
381  throw IncorrectTypeInAssignment(
382  "The value for key \"" + std::string(key_) +
383  "\" cannot be converted to the requested type.");
384  }
385  }

◆ 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 393 of file configuration.h.

393  {
394  try {
395  return node_.as<std::vector<T>>();
396  } catch (YAML::TypedBadConversion<T> &e) {
397  throw IncorrectTypeInAssignment(
398  "One of the values in the sequence for key \"" + std::string(key_) +
399  "\" failed to convert to the requested type. E.g. [1 2] is a "
400  "sequence of one string \"1 2\" and [1, 2] is a sequence of two "
401  "integers. Often there is just a comma missing in the config "
402  "file.");
403  } catch (YAML::TypedBadConversion<std::vector<T>> &e) {
404  throw IncorrectTypeInAssignment(
405  "The value for key \"" + std::string(key_) +
406  "\" cannot be converted to the requested type. A sequence was "
407  "expected but apparently not found.");
408  }
409  }

◆ 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 419 of file configuration.h.

419  {
420  const std::vector<T> vec = operator std::vector<T>();
421  const size_t n_read = vec.size();
422  // Alert if size does not match
423  if (n_read != N) {
424  throw IncorrectTypeInAssignment("Wrong number of values in array \"" +
425  std::string(key_) + "\". Expected " +
426  std::to_string(N) +
427  " values,"
428  " found " +
429  std::to_string(n_read) + ".");
430  }
431  std::array<T, N> arr;
432  std::copy_n(vec.begin(), N, arr.begin());
433  return arr;
434  }

◆ 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 443 of file configuration.h.

443  {
444  const std::vector<std::string> v = operator std::vector<std::string>();
445  ReactionsBitSet s;
446  for (const auto &x : v) {
447  if (x == "All") {
448  s.set();
449  break;
450  } else if (x == "Elastic") {
452  } else if (x == "NN_to_NR") {
454  } else if (x == "NN_to_DR") {
456  } else if (x == "KN_to_KN") {
458  } else if (x == "KN_to_KDelta") {
460  } else if (x == "Strangeness_exchange") {
462  } else if (x == "NNbar") {
464  } else if (x == "PiDeuteron_to_NN") {
466  } else if (x == "PiDeuteron_to_pidprime") {
468  } else if (x == "NDeuteron_to_Ndprime") {
470  } else {
471  throw IncorrectTypeInAssignment(
472  "The value for key \"" + std::string(key_) +
473  "\" should be \"All\", \"Elastic\", \"NN_to_NR\", \"NN_to_DR\","
474  "\"KN_to_KN\", \"KN_to_KDelta\", \"PiDeuteron_to_NN\", "
475  "\"PiDeuteron_to_pidprime\", \"NDeuteron_to_Ndprime\", "
476  "\"Strangeness_exchange\" or "
477  "\"NNbar\", or any combination of these.");
478  }
479  }
480  return s;
481  }
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 490 of file configuration.h.

490  {
491  const std::vector<std::string> v = operator std::vector<std::string>();
493  for (const auto &x : v) {
494  if (x == "All") {
495  s.set();
496  break;
497  } else if (x == "Meson_3to1") {
499  } else if (x == "Deuteron_3to2") {
501  } else if (x == "NNbar_5to2") {
503  } else if (x == "A3_Nuclei_4to2") {
505  } else {
506  throw IncorrectTypeInAssignment(
507  "The value for key \"" + std::string(key_) +
508  "\" should be \"All\", \"Meson_3to1\", "
509  "\"Deuteron_3to2\" or \"NNbar_5to2\", "
510  "\"A3_Nuclei_4to2\", or any combination of "
511  "these.");
512  }
513  }
514  return s;
515  }
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 524 of file configuration.h.

524  {
525  const std::vector<std::string> v = operator std::vector<std::string>();
526  std::set<ThermodynamicQuantity> s;
527  for (const auto &x : v) {
528  if (x == "rho_eckart") {
530  } else if (x == "tmn") {
531  s.insert(ThermodynamicQuantity::Tmn);
532  } else if (x == "tmn_landau") {
534  } else if (x == "landau_velocity") {
536  } else if (x == "j_QBS") {
538  } else {
539  throw IncorrectTypeInAssignment(
540  "The value for key \"" + std::string(key_) +
541  "\" should be \"rho_eckart\", \"tmn\""
542  ", \"tmn_landau\", \"landau_velocity\" or \"j_QBS\".");
543  }
544  }
545  return s;
546  }
@ 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 555 of file configuration.h.

555  {
556  const std::string s = operator std::string();
557  if (s == "center of velocity") {
559  }
560  if (s == "center of mass") {
562  }
563  if (s == "fixed target") {
565  }
566  throw IncorrectTypeInAssignment(
567  "The value for key \"" + std::string(key_) +
568  "\" should be \"center of velocity\" or \"center of mass\" "
569  "or \"fixed target\".");
570  }

◆ 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 579 of file configuration.h.

579  {
580  const std::string s = operator std::string();
581  if (s == "off") {
582  return FermiMotion::Off;
583  }
584  if (s == "on") {
585  return FermiMotion::On;
586  }
587  if (s == "frozen") {
588  return FermiMotion::Frozen;
589  }
590  throw IncorrectTypeInAssignment(
591  "The value for key \"" + std::string(key_) +
592  "\" should be \"off\" or \"on\" or \"frozen\".");
593  }
@ 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 602 of file configuration.h.

602  {
603  const std::string s = operator std::string();
604  if (s == "hadron") {
605  return DensityType::Hadron;
606  }
607  if (s == "baryon") {
608  return DensityType::Baryon;
609  }
610  if (s == "baryonic isospin") {
612  }
613  if (s == "pion") {
614  return DensityType::Pion;
615  }
616  if (s == "total isospin") {
618  }
619  if (s == "none") {
620  return DensityType::None;
621  }
622  throw IncorrectTypeInAssignment("The value for key \"" +
623  std::string(key_) +
624  "\" should be \"hadron\" or \"baryon\" "
625  "or \"baryonic isospin\" or \"pion\" "
626  "or \"none\".");
627  }

◆ 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 636 of file configuration.h.

636  {
637  const std::string s = operator std::string();
638  if (s == "NoExpansion") {
640  }
641  if (s == "MasslessFRW") {
643  }
644  if (s == "MassiveFRW") {
646  }
647  if (s == "Exponential") {
649  }
650  throw IncorrectTypeInAssignment(
651  "The value for key \"" + std::string(key_) +
652  "\" should be \"NoExpansion\", \"MasslessFRW\"," +
653  "\"MassiveFRW\" or \"Exponential\".");
654  }

◆ operator DerivativesMode()

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

Set DerivativesMode.

Definition at line 659 of file configuration.h.

659  {
660  const std::string s = operator std::string();
661  if (s == "Covariant Gaussian") {
663  }
664  if (s == "Finite difference") {
666  }
667  if (s == "Off") {
668  return DerivativesMode::Off;
669  }
670  throw IncorrectTypeInAssignment(
671  "The value for key \"" + std::string(key_) +
672  "\" should be \"Covariant Gaussian\", \"Finite difference\"," +
673  " or \"Off\".");
674  }

◆ operator FieldDerivativesMode()

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

Set FieldDerivatives mode.

Definition at line 679 of file configuration.h.

679  {
680  const std::string s = operator std::string();
681  if (s == "Chain Rule") {
683  }
684  if (s == "Direct") {
686  }
687  throw IncorrectTypeInAssignment(
688  "The value for key \"" + std::string(key_) +
689  "\" should be \"Chain Rule\" or \"Direct\".");
690  }

◆ operator SmearingMode()

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

Set SmearingMode.

Definition at line 695 of file configuration.h.

695  {
696  const std::string s = operator std::string();
697  if (s == "Covariant Gaussian") {
699  }
700  if (s == "Discrete") {
701  return SmearingMode::Discrete;
702  }
703  if (s == "Triangular") {
705  }
706  throw IncorrectTypeInAssignment(
707  "The value for key \"" + std::string(key_) +
708  "\" should be \"Covariant Gaussian\", \"Discrete\"," +
709  " or \"Triangular\".");
710  }

◆ 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 719 of file configuration.h.

719  {
720  const std::string s = operator std::string();
721  if (s == "None") {
722  return TimeStepMode::None;
723  }
724  if (s == "Fixed") {
725  return TimeStepMode::Fixed;
726  }
727  throw IncorrectTypeInAssignment("The value for key \"" +
728  std::string(key_) +
729  "\" should be \"None\" or \"Fixed\".");
730  }
@ 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 739 of file configuration.h.

739  {
740  const std::string s = operator std::string();
741  if (s == "thermal momenta") {
743  }
744  if (s == "thermal momenta quantum") {
746  }
747  if (s == "peaked momenta") {
749  }
750  throw IncorrectTypeInAssignment(
751  "The value for key \"" + std::string(key_) +
752  "\" should be \"thermal momenta\", \"thermal momenta quantum\", " +
753  "or \"peaked momenta\".");
754  }
@ 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 763 of file configuration.h.

763  {
764  const std::string s = operator std::string();
765  if (s == "thermal momenta") {
767  }
768  if (s == "thermal momenta quantum") {
770  }
771  if (s == "IC_ES") {
773  }
774  if (s == "IC_1M") {
776  }
777  if (s == "IC_2M") {
779  }
780  if (s == "IC_Massive") {
782  }
783  throw IncorrectTypeInAssignment(
784  "The value for key \"" + std::string(key_) +
785  "\" should be \"thermal momenta\", \"thermal momenta quantum\", " +
786  "\"IC_ES\", \"IC_1M\", \"IC_2M\" or" + "\"IC_Massive\".");
787  }
@ 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 796 of file configuration.h.

796  {
797  const std::string s = operator std::string();
798  if (s == "no annihilation") {
800  }
801  if (s == "resonances") {
803  }
804  if (s == "two to five") {
806  }
807  if (s == "strings") {
809  }
810  throw IncorrectTypeInAssignment(
811  "The value for key \"" + std::string(key_) + "\" should be " +
812  "\"no annihilation\", \"resonances\", \"two to five\" or " +
813  " \"strings\".");
814  }
@ 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 823 of file configuration.h.

823  {
824  const std::string s = operator std::string();
825  if (s == "quadratic") {
826  return Sampling::Quadratic;
827  }
828  if (s == "custom") {
829  return Sampling::Custom;
830  }
831  if (s == "uniform") {
832  return Sampling::Uniform;
833  }
834  throw IncorrectTypeInAssignment(
835  "The value for key \"" + std::string(key_) +
836  "\" should be \"quadratic\", \"uniform\" or \"custom\".");
837  }
@ 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 846 of file configuration.h.

846  {
847  const std::string s = operator std::string();
848  if (s == "mode sampling") {
850  }
851  if (s == "biased BF") {
853  }
854  if (s == "unbiased BF") {
856  }
857  throw IncorrectTypeInAssignment(
858  "The value for key \"" + std::string(key_) +
859  "\" should be \"mode sampling\", \"biased BF\" or \"unbiased BF\".");
860  }

◆ 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 869 of file configuration.h.

869  {
870  const std::string s = operator std::string();
871  if (s == "Geometric") {
873  }
874  if (s == "Stochastic") {
876  }
877  if (s == "Covariant") {
879  }
880  throw IncorrectTypeInAssignment(
881  "The value for key \"" + std::string(key_) + "\" should be " +
882  "\"Geometric\", \"Stochastic\" " + "or \"Covariant\".");
883  }
@ 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 892 of file configuration.h.

892  {
893  const std::string s = operator std::string();
894  if (s == "BottomUp") {
896  }
897  if (s == "TopDown") {
899  }
900  if (s == "TopDownMeasured") {
902  }
903  throw IncorrectTypeInAssignment(
904  "The value for key \"" + std::string(key_) + "\" should be " +
905  "\"BottomUp\", \"TopDown\" " + "or \"TopDownMeasured\".");
906  }
@ 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 915 of file configuration.h.

915  {
916  const std::string s = operator std::string();
917  if (s == "None") {
918  return PseudoResonance::None;
919  }
920  if (s == "Largest") {
922  }
923  if (s == "Closest") {
925  }
926  if (s == "LargestFromUnstable") {
928  }
929  if (s == "ClosestFromUnstable") {
931  }
932  throw IncorrectTypeInAssignment(
933  "The value for key \"" + std::string(key_) + "\" should be " +
934  "\"None\", \"Largest\", \"Closest\", \"LargestFromUnstable\", or "
935  "\"ClosestFromUnstable\".");
936  }
@ 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 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 945 of file configuration.h.

945  {
946  const std::string s = operator std::string();
947  if (s == "Yes") {
948  return OutputOnlyFinal::Yes;
949  }
950  if (s == "No") {
951  return OutputOnlyFinal::No;
952  }
953  if (s == "IfNotEmpty") {
955  }
956  throw IncorrectTypeInAssignment("The value for key \"" +
957  std::string(key_) + "\" should be " +
958  "\"Yes\", \"No\" or \"IfNotEmpty\".");
959  }
@ 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.

Friends And Related Function Documentation

◆ Configuration

friend class Configuration
friend

Definition at line 309 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 312 of file configuration.h.

◆ key_

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

The key to be interpreted.

Definition at line 314 of file configuration.h.


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