Go to the source code of this file.
|
template<typename T , typename Ratio > |
static ostream & | std::operator<< (ostream &out, const chrono::duration< T, Ratio > &seconds) |
| Print time span in a human readable way: time < 10 min => seconds 10 min < time < 3 h => minutes time > 3h => hours. More...
|
|
template<typename Modus > |
std::ostream & | smash::operator<< (std::ostream &out, const Experiment< Modus > &e) |
| Creates a verbose textual description of the setup of the Experiment. More...
|
|
ExperimentParameters | smash::create_experiment_parameters (Configuration config) |
| Gathers all general Experiment parameters. More...
|
|
const std::string | smash::hline (67, '-') |
| String representing a horizontal line. More...
|
|
std::string | smash::format_measurements (const Particles &particles, uint64_t scatterings_this_interval, const QuantumNumbers &conserved_initial, SystemTimePoint time_start, double time) |
| Generate the tabulated string which will be printed to the screen when SMASH is running. More...
|
|
void | smash::check_interactions_total (uint64_t interactions_total) |
| Make sure interactions_total can be represented as a 32-bit integer. More...
|
|
template<typename T , typename Ratio >
static ostream& std::operator<< |
( |
ostream & |
out, |
|
|
const chrono::duration< T, Ratio > & |
seconds |
|
) |
| |
|
static |
Print time span in a human readable way: time < 10 min => seconds 10 min < time < 3 h => minutes time > 3h => hours.
- Note
- This operator has to be in the
std
namespace for argument dependent lookup to find it. If it were in the smash namespace then the code would not compile since none of its arguments is a type from the smash namespace.
Definition at line 56 of file experiment.h.
58 using Seconds = chrono::duration<double>;
59 using Minutes = chrono::duration<double, std::ratio<60>>;
60 using Hours = chrono::duration<double, std::ratio<60 * 60>>;
61 constexpr Minutes threshold_for_minutes{10};
62 constexpr Hours threshold_for_hours{3};
63 if (seconds < threshold_for_minutes) {
64 return out << Seconds(seconds).count() <<
" [s]";
66 if (seconds < threshold_for_hours) {
67 return out << Minutes(seconds).count() <<
" [min]";
69 return out << Hours(seconds).count() <<
" [h]";