 |
Version: SMASH-2.0
|
|
◆ print_disclaimer()
void smash::anonymous_namespace{smash.cc}::print_disclaimer |
( |
| ) |
|
Print the disclaimer.
Definition at line 177 of file smash.cc.
179 <<
"###################################################################"
188 <<
" mss'.. ...s'm. sSA##As mAhh##hsh##s. .hA##ASa sS###As "
190 <<
" :a':'. .'':as sM#' .HHm''HMS''AMs mMA' .AMs aMA. "
192 <<
" .a:s'. ..''ss 'h#H#S. mMm 'M#' .HH. 'MH. :MA 'h#H#S. "
194 <<
" .::ss'. .... 'SMm .HH. SMa hMm sM#..mHMs 'AMa "
196 <<
" .s::' #SMASHh aMS .MH: HM: #MMMmMM. #SMASHh "
199 <<
"###################################################################"
202 <<
" This is SMASH version: " << VERSION_MAJOR <<
"\n"
203 <<
" Simulating Many Accelerated Strongly-interacting Hadrons"
206 <<
" Distributed under the GNU General Public License 3.0"
207 <<
" (GPLv3 or later)."
209 <<
" See LICENSE for details."
211 <<
" For the full list of contributors see AUTHORS."
214 <<
" When using SMASH, please cite"
216 <<
" J. Weil et al., Phys.Rev. C94 (2016) no.5, 054905"
218 <<
" together with the software DOI for the specific code version "
221 <<
" https://doi.org/10.5281/zenodo.3484711."
223 <<
" In addition, if Pythia is used please cite"
225 <<
" T. Sjöstrand, S. Mrenna and P. Skands, JHEP05 (2006) 026,"
227 <<
" Comput. Phys. Comm. 178 (2008) 852."
230 <<
" Webpage: https://smash-transport.github.io"
233 <<
" Report issues at https://github.com/smash-transport/smash"
235 <<
" or contact us by email at elfner@itp.uni-frankfurt.de"
238 <<
"###################################################################"
◆ default_output_path()
bf::path smash::anonymous_namespace{smash.cc}::default_output_path |
( |
| ) |
|
- Returns
- the default path for output.
Definition at line 263 of file smash.cc.
264 const bf::path
p = bf::absolute(
"data");
265 if (!bf::exists(
p)) {
269 for (
int id = 0; id < std::numeric_limits<int>::max(); ++id) {
270 p2 =
p / std::to_string(
id);
271 if (!bf::exists(p2)) {
276 throw OutputDirectoryOutOfIds(
"no unique data subdir ID left");
◆ ensure_path_is_valid()
void smash::anonymous_namespace{smash.cc}::ensure_path_is_valid |
( |
const bf::path & |
path | ) |
|
Ensures the output path is valid.
- Exceptions
-
- Parameters
-
[in] | path | The output path to be written to |
Definition at line 287 of file smash.cc.
288 if (bf::exists(path)) {
289 if (!bf::is_directory(path)) {
290 throw OutputDirectoryExists(
"The given path (" + path.native() +
291 ") exists, but it is not a directory.");
294 if (!bf::create_directories(path)) {
295 throw OutputDirectoryExists(
296 "Race condition detected: The directory " + path.native() +
297 " did not exist a few cycles ago, but was created in the meantime by "
298 "a different process.");
◆ actions_finder_for_dump()
Prepares ActionsFinder for cross-section and reaction dumps.
- Parameters
-
[in] | configuration | Necessary parameters to switch reactions on/off |
- Returns
- The constructed Scatteractionsfinder.
Definition at line 309 of file smash.cc.
312 const std::vector<bool> nucleon_has_interacted = {};
314 const int N_proj = 0;
◆ check_config_version_is_compatible()
void smash::anonymous_namespace{smash.cc}::check_config_version_is_compatible |
( |
Configuration |
configuration | ) |
|
Checks if the SMASH version is compatible with the version of the configuration file.
- Parameters
-
[in] | configuration | The configuration object |
- Exceptions
-
Runtime | error if versions do not match or if config version is invalid |
Definition at line 329 of file smash.cc.
330 const std::string smash_version =
"1.8";
331 const std::set<std::string> compatible_config_versions = {
"1.8"};
335 if (compatible_config_versions.find(config_version) ==
336 compatible_config_versions.end()) {
337 std::stringstream err;
338 err <<
"The version of the configuration file (" << config_version
339 <<
") is not compatible with the SMASH version (" << smash_version
340 <<
").\nThe following config versions are supported:\n";
341 for (
auto it : compatible_config_versions) {
344 err <<
"\nPlease consider updating your config or using a compatible SMASH"
346 throw std::runtime_error(err.str());
◆ check_for_unused_config_values()
void smash::anonymous_namespace{smash.cc}::check_for_unused_config_values |
( |
const Configuration & |
configuration | ) |
|
Checks if there are unused config values.
Definition at line 353 of file smash.cc.
356 if (report !=
"{}") {
357 throw std::runtime_error(
358 "The following configuration values were not used:\n" + report);
◆ ignore_simulation_config_values()
void smash::anonymous_namespace{smash.cc}::ignore_simulation_config_values |
( |
Configuration & |
configuration | ) |
|
Remove all config values that are only needed for simulations.
This is useful when checking for unused config value when SMASH only outputs cross sections, resonance properties or possible reactions.
Definition at line 368 of file smash.cc.
369 for (
const std::string s :
370 {
"Version",
"particles",
"decaymodes",
"Modi",
"General",
"Output",
371 "Lattice",
"Potentials",
"Forced_Thermalization"}) {
◆ initialize_particles_and_decays() [1/2]
void smash::anonymous_namespace{smash.cc}::initialize_particles_and_decays |
( |
Configuration & |
configuration | ) |
|
Initialize the particles and decays from the configuration.
Definition at line 379 of file smash.cc.
382 ParticleType::check_consistency();
◆ initialize_particles_and_decays() [2/2]
void smash::anonymous_namespace{smash.cc}::initialize_particles_and_decays |
( |
Configuration & |
configuration, |
|
|
sha256::Hash |
hash, |
|
|
bf::path |
tabulations_path |
|
) |
| |
Initialize the particles and decays from the configuration, the hash and the path to the cashed resonance integrals.
Definition at line 388 of file smash.cc.
392 logg[
LMain].info(
"Tabulating cross section integrals...");
393 IsoParticleType::tabulate_integrals(hash, tabulations_path);
Configuration configuration(std::string overrides={})
Return a configuration object filled with data from src/config.yaml.
Value read(std::initializer_list< const char * > keys) const
Additional interface for SMASH to read configuration values without removing them.
std::string unused_values_report() const
Returns a string listing the key/value pairs that have not been taken yet.
bool has_value(std::initializer_list< const char * > keys) const
Returns whether there is a non-empty value behind the requested keys.
static constexpr int LMain
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
ExperimentParameters create_experiment_parameters(Configuration config)
Gathers all general Experiment parameters.
void initialize_particles_and_decays(Configuration &configuration, sha256::Hash hash, bf::path tabulations_path)
Initialize the particles and decays from the configuration, the hash and the path to the cashed reson...
Value take(std::initializer_list< const char * > keys)
The default interface for SMASH to read configuration values.
Helper structure for Experiment.