Version: SMASH-1.7
smash::OutputParameters Struct Reference

#include <outputparameters.h>

Helper structure for Experiment to hold output options and parameters.

Experiment has one member of this struct.

Definition at line 24 of file outputparameters.h.

Collaboration diagram for smash::OutputParameters:
[legend]

Public Member Functions

 OutputParameters ()
 Default constructor, useful for tests. More...
 
 OutputParameters (Configuration &&conf)
 Constructor from configuration. More...
 
bool get_coll_extended (std::string name) const
 Pass correct extended flag to binary collision output constructor. More...
 

Public Attributes

ThreeVector td_position
 Point, where thermodynamic quantities are calculated. More...
 
DensityType td_dens_type
 Type (e.g., baryon/pion/hadron) of thermodynamic quantity. More...
 
bool td_rho_eckart
 Print out Eckart rest frame density of type td_dens_type or not? More...
 
bool td_tmn
 Print out energy-momentum tensor of type td_dens_type or not? More...
 
bool td_tmn_landau
 Print out energy-momentum tensor in Landau rest frame (of type td_dens_type) or not? More...
 
bool td_v_landau
 Print out Landau velocity of type td_dens_type or not? More...
 
bool td_jQBS
 Print out QBS 4-currents or not? More...
 
bool td_smearing
 Whether smearing is on or off; WARNING : if smearing is off, then final result is in GeV instead of GeV/fm3. More...
 
bool part_extended
 Extended format for particles output. More...
 
bool part_only_final
 Print only final particles in event. More...
 
bool coll_extended
 Extended format for collisions output. More...
 
bool coll_printstartend
 Print initial and final particles in event into collision output. More...
 
bool dil_extended
 Extended format for dilepton output. More...
 
bool photons_extended
 Extended format for photon output. More...
 
bool ic_extended
 Extended initial conditions output. More...
 

Constructor & Destructor Documentation

smash::OutputParameters::OutputParameters ( )
inline

Default constructor, useful for tests.

Definition at line 26 of file outputparameters.h.

27  : td_position(ThreeVector()),
29  td_rho_eckart(false),
30  td_tmn(false),
31  td_tmn_landau(false),
32  td_v_landau(false),
33  td_jQBS(false),
34  td_smearing(true),
35  part_extended(false),
36  part_only_final(true),
37  coll_extended(false),
38  coll_printstartend(false),
39  dil_extended(false),
40  photons_extended(false),
41  ic_extended(false) {}
DensityType td_dens_type
Type (e.g., baryon/pion/hadron) of thermodynamic quantity.
ThreeVector td_position
Point, where thermodynamic quantities are calculated.
bool part_extended
Extended format for particles output.
bool td_jQBS
Print out QBS 4-currents or not?
bool ic_extended
Extended initial conditions output.
bool td_tmn_landau
Print out energy-momentum tensor in Landau rest frame (of type td_dens_type) or not?
bool td_smearing
Whether smearing is on or off; WARNING : if smearing is off, then final result is in GeV instead of G...
bool coll_printstartend
Print initial and final particles in event into collision output.
bool photons_extended
Extended format for photon output.
bool part_only_final
Print only final particles in event.
bool coll_extended
Extended format for collisions output.
bool td_rho_eckart
Print out Eckart rest frame density of type td_dens_type or not?
bool dil_extended
Extended format for dilepton output.
bool td_tmn
Print out energy-momentum tensor of type td_dens_type or not?
bool td_v_landau
Print out Landau velocity of type td_dens_type or not?
smash::OutputParameters::OutputParameters ( Configuration &&  conf)
inlineexplicit

Constructor from configuration.

Definition at line 44 of file outputparameters.h.

44  : OutputParameters() {
45  const auto& log = logger<LogArea::Experiment>();
46  log.trace(source_location);
47 
48  if (conf.has_value({"Thermodynamics"})) {
49  auto subcon = conf["Thermodynamics"];
50  if (subcon.has_value({"Position"})) {
51  const std::array<double, 3> a = subcon.take({"Position"});
52  td_position = ThreeVector(a[0], a[1], a[2]);
53  }
54  std::set<ThermodynamicQuantity> quan = subcon.take({"Quantities"});
56  td_tmn = (quan.count(ThermodynamicQuantity::Tmn) > 0);
59  td_jQBS = (quan.count(ThermodynamicQuantity::j_QBS) > 0);
60  td_dens_type = subcon.take({"Type"}, DensityType::Baryon);
63  log.warn("Requested Thermodynamics output with Density type None. ",
64  "Change the density type to avoid output being dropped.");
65  }
66  td_smearing = subcon.take({"Smearing"}, true);
67  }
68 
69  if (conf.has_value({"Particles"})) {
70  part_extended = conf.take({"Particles", "Extended"}, false);
71  part_only_final = conf.take({"Particles", "Only_Final"}, true);
72  }
73 
74  if (conf.has_value({"Collisions"})) {
75  coll_extended = conf.take({"Collisions", "Extended"}, false);
76  coll_printstartend = conf.take({"Collisions", "Print_Start_End"}, false);
77  }
78 
79  if (conf.has_value({"Dileptons"})) {
80  dil_extended = conf.take({"Dileptons", "Extended"}, false);
81  }
82 
83  if (conf.has_value({"Photons"})) {
84  photons_extended = conf.take({"Photons", "Extended"}, false);
85  }
86 
87  if (conf.has_value({"Initial_Conditions"})) {
88  ic_extended = conf.take({"Initial_Conditions", "Extended"}, false);
89  }
90  }
DensityType td_dens_type
Type (e.g., baryon/pion/hadron) of thermodynamic quantity.
ThreeVector td_position
Point, where thermodynamic quantities are calculated.
bool part_extended
Extended format for particles output.
bool td_jQBS
Print out QBS 4-currents or not?
bool ic_extended
Extended initial conditions output.
OutputParameters()
Default constructor, useful for tests.
bool td_tmn_landau
Print out energy-momentum tensor in Landau rest frame (of type td_dens_type) or not?
bool td_smearing
Whether smearing is on or off; WARNING : if smearing is off, then final result is in GeV instead of G...
bool coll_printstartend
Print initial and final particles in event into collision output.
#define source_location
Hackery that is required to output the location in the source code where the log statement occurs...
Definition: logging.h:253
bool photons_extended
Extended format for photon output.
bool part_only_final
Print only final particles in event.
bool coll_extended
Extended format for collisions output.
bool td_rho_eckart
Print out Eckart rest frame density of type td_dens_type or not?
bool dil_extended
Extended format for dilepton output.
bool td_tmn
Print out energy-momentum tensor of type td_dens_type or not?
bool td_v_landau
Print out Landau velocity of type td_dens_type or not?

Member Function Documentation

bool smash::OutputParameters::get_coll_extended ( std::string  name) const
inline

Pass correct extended flag to binary collision output constructor.

Parameters
[in]name(File)name of the output.
Returns
Extended flag for binary output.

Definition at line 97 of file outputparameters.h.

97  {
98  if (name == "Collisions") {
99  return coll_extended;
100  } else if (name == "Dileptons") {
101  return dil_extended;
102  } else if (name == "Photons") {
103  return photons_extended;
104  } else {
105  return false; // error
106  }
107  }
bool photons_extended
Extended format for photon output.
bool coll_extended
Extended format for collisions output.
bool dil_extended
Extended format for dilepton output.

Member Data Documentation

ThreeVector smash::OutputParameters::td_position

Point, where thermodynamic quantities are calculated.

Definition at line 110 of file outputparameters.h.

DensityType smash::OutputParameters::td_dens_type

Type (e.g., baryon/pion/hadron) of thermodynamic quantity.

Definition at line 113 of file outputparameters.h.

bool smash::OutputParameters::td_rho_eckart

Print out Eckart rest frame density of type td_dens_type or not?

Definition at line 116 of file outputparameters.h.

bool smash::OutputParameters::td_tmn

Print out energy-momentum tensor of type td_dens_type or not?

Definition at line 119 of file outputparameters.h.

bool smash::OutputParameters::td_tmn_landau

Print out energy-momentum tensor in Landau rest frame (of type td_dens_type) or not?

Definition at line 125 of file outputparameters.h.

bool smash::OutputParameters::td_v_landau

Print out Landau velocity of type td_dens_type or not?

Definition at line 128 of file outputparameters.h.

bool smash::OutputParameters::td_jQBS

Print out QBS 4-currents or not?

Definition at line 131 of file outputparameters.h.

bool smash::OutputParameters::td_smearing

Whether smearing is on or off; WARNING : if smearing is off, then final result is in GeV instead of GeV/fm3.

Definition at line 137 of file outputparameters.h.

bool smash::OutputParameters::part_extended

Extended format for particles output.

Definition at line 140 of file outputparameters.h.

bool smash::OutputParameters::part_only_final

Print only final particles in event.

Definition at line 143 of file outputparameters.h.

bool smash::OutputParameters::coll_extended

Extended format for collisions output.

Definition at line 146 of file outputparameters.h.

bool smash::OutputParameters::coll_printstartend

Print initial and final particles in event into collision output.

Definition at line 149 of file outputparameters.h.

bool smash::OutputParameters::dil_extended

Extended format for dilepton output.

Definition at line 152 of file outputparameters.h.

bool smash::OutputParameters::photons_extended

Extended format for photon output.

Definition at line 155 of file outputparameters.h.

bool smash::OutputParameters::ic_extended

Extended initial conditions output.

Definition at line 158 of file outputparameters.h.


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