 |
Version: SMASH-1.8
|
|
◆ print_disclaimer()
void smash::anonymous_namespace{smash.cc}::print_disclaimer |
( |
| ) |
|
Print the disclaimer.
Definition at line 173 of file smash.cc.
175 <<
"###################################################################"
184 <<
" mss'.. ...s'm. sSA##As mAhh##hsh##s. .hA##ASa sS###As "
186 <<
" :a':'. .'':as sM#' .HHm''HMS''AMs mMA' .AMs aMA. "
188 <<
" .a:s'. ..''ss 'h#H#S. mMm 'M#' .HH. 'MH. :MA 'h#H#S. "
190 <<
" .::ss'. .... 'SMm .HH. SMa hMm sM#..mHMs 'AMa "
192 <<
" .s::' #SMASHh aMS .MH: HM: #MMMmMM. #SMASHh "
195 <<
"###################################################################"
198 <<
" This is SMASH version: " << VERSION_MAJOR <<
"\n"
199 <<
" Simulating Many Accelerated Strongly-interacting Hadrons"
202 <<
" Distributed under the GNU General Public License 3.0"
203 <<
" (GPLv3 or later)."
205 <<
" See LICENSE for details."
207 <<
" For the full list of contributors see AUTHORS."
210 <<
" When using SMASH, please cite"
212 <<
" J. Weil et al., Phys.Rev. C94 (2016) no.5, 054905"
214 <<
" together with the software DOI for the specific code version "
217 <<
" https://doi.org/10.5281/zenodo.3484711."
219 <<
" In addition, if Pythia is used please cite"
221 <<
" T. Sjöstrand, S. Mrenna and P. Skands, JHEP05 (2006) 026,"
223 <<
" Comput. Phys. Comm. 178 (2008) 852."
226 <<
" Webpage: https://smash-transport.github.io"
229 <<
" Report issues at https://github.com/smash-transport/smash"
231 <<
" or contact us by email at elfner@itp.uni-frankfurt.de"
234 <<
"###################################################################"
◆ default_output_path()
bf::path smash::anonymous_namespace{smash.cc}::default_output_path |
( |
| ) |
|
- Returns
- the default path for output.
Definition at line 259 of file smash.cc.
260 const bf::path
p = bf::absolute(
"data");
261 if (!bf::exists(
p)) {
265 for (
int id = 0; id < std::numeric_limits<int>::max(); ++id) {
266 p2 =
p / std::to_string(
id);
267 if (!bf::exists(p2)) {
272 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 283 of file smash.cc.
284 if (bf::exists(path)) {
285 if (!bf::is_directory(path)) {
286 throw OutputDirectoryExists(
"The given path (" + path.native() +
287 ") exists, but it is not a directory.");
290 if (!bf::create_directories(path)) {
291 throw OutputDirectoryExists(
292 "Race condition detected: The directory " + path.native() +
293 " did not exist a few cycles ago, but was created in the meantime by "
294 "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 305 of file smash.cc.
308 const std::vector<bool> nucleon_has_interacted = {};
310 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 325 of file smash.cc.
326 const std::string smash_version =
"1.8";
327 const std::set<std::string> compatible_config_versions = {
"1.8"};
331 if (compatible_config_versions.find(config_version) ==
332 compatible_config_versions.end()) {
333 std::stringstream err;
334 err <<
"The version of the configuration file (" << config_version
335 <<
") is not compatible with the SMASH version (" << smash_version
336 <<
").\nThe following config versions are supported:\n";
337 for (
auto it : compatible_config_versions) {
340 err <<
"\nPlease consider updating your config or using a compatible SMASH"
342 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 349 of file smash.cc.
352 if (report !=
"{}") {
353 throw std::runtime_error(
354 "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 364 of file smash.cc.
365 for (
const std::string s :
366 {
"Version",
"particles",
"decaymodes",
"Modi",
"General",
"Output",
367 "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 375 of file smash.cc.
378 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 384 of file smash.cc.
388 logg[
LMain].info(
"Tabulating cross section integrals...");
389 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.