The MonitorManager manages the monitor entries and MonitorTimer.
More...
#include <monitor.hh>
The MonitorManager manages the monitor entries and MonitorTimer.
The manager performs an emission of the stored monitor data if the monitor timer asserts that enough time has passed since the last emit.
◆ Timer
◆ MonitorManager()
Utopia::DataIO::MonitorManager::MonitorManager |
( |
const double |
emit_interval, |
|
|
const std::string |
emit_prefix = "!!map " , |
|
|
const std::string |
emit_suffix = "" |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
emit_interval | The emit interval that specifies after how much time to emit the monitor data. |
emit_prefix | A prefix to the emitted string, default: "!!map " |
emit_suffix | A suffix to the emitted string, default: "". Note that std::endl is always appended. |
◆ check_timer()
void Utopia::DataIO::MonitorManager::check_timer |
( |
| ) |
|
|
inline |
Checks with the timer whether the time to emit has come.
◆ emit_enabled()
bool Utopia::DataIO::MonitorManager::emit_enabled |
( |
| ) |
const |
|
inline |
Returns true if the emission is enabled.
◆ emit_if_enabled()
void Utopia::DataIO::MonitorManager::emit_if_enabled |
( |
| ) |
|
|
inline |
Perform an emission of the data to the terminal, if the flag was set.
◆ get_emit_counter()
auto Utopia::DataIO::MonitorManager::get_emit_counter |
( |
| ) |
|
|
inline |
Return the emit interval.
◆ get_emit_interval()
auto Utopia::DataIO::MonitorManager::get_emit_interval |
( |
| ) |
|
|
inline |
Return the emit interval.
◆ get_entries()
YAML::Node& Utopia::DataIO::MonitorManager::get_entries |
( |
| ) |
|
|
inline |
Get the reference to the monitor entries object.
◆ get_timer()
Timer& Utopia::DataIO::MonitorManager::get_timer |
( |
| ) |
|
|
inline |
◆ set_entry()
template<typename Value >
void Utopia::DataIO::MonitorManager::set_entry |
( |
const std::string & |
path, |
|
|
const std::string & |
key, |
|
|
const Value |
value |
|
) |
| |
|
inline |
Set an entry in the tree of monitor entries.
Sets an element at <path>.<key>
to value
, creating intermediate nodes within the monitor entries tree.
- Template Parameters
-
Value | The type of the value that should be monitored |
- Parameters
-
path | The path at which to add the key. This can be used to traverse the entries tree. To separate the path segments, the . character is used. |
key | The key of the new entry. It is suffixed onto the path with the . delimiter in between, becoming the last segment of the path. |
value | The value of the new entry |
◆ set_time_entries()
template<typename Time >
void Utopia::DataIO::MonitorManager::set_time_entries |
( |
const Time |
time, |
|
|
const Time |
time_max |
|
) |
| |
|
inline |
Set time- and progress-related top level entries.
Using the given parameters, this method sets the top-level entries 'time' and 'progress'
- Template Parameters
-
Time | The data type of the time |
- Parameters
-
time | The current time |
time_max | The maximum time of the simulation |
◆ _emit_counter
std::size_t Utopia::DataIO::MonitorManager::_emit_counter |
|
private |
Counts the number of emit operations.
◆ _emit_enabled
bool Utopia::DataIO::MonitorManager::_emit_enabled |
|
private |
The flag that determines whether to collect data.
◆ _emit_prefix
const std::string Utopia::DataIO::MonitorManager::_emit_prefix |
|
private |
A prefix to the emitted string.
◆ _emit_suffix
const std::string Utopia::DataIO::MonitorManager::_emit_suffix |
|
private |
A suffix to the emitted string.
◆ _entries
YAML::Node Utopia::DataIO::MonitorManager::_entries |
|
private |
◆ _timer
Timer Utopia::DataIO::MonitorManager::_timer |
|
private |
The documentation for this class was generated from the following file: