CYCLUS
|
Collects and manages output data generation for the cyclus core and agents during a simulation.
By default, datum managers are auto-initialized with a unique uuid simulation id.
Example usage:
Definition at line 45 of file recorder.h.
#include <recorder.h>
Public Member Functions | |
void | Close () |
unsigned int | dump_count () |
void | Flush () |
bool | inject_sim_id () |
void | inject_sim_id (bool x) |
Datum * | NewDatum (std::string title) |
Recorder () | |
Recorder (bool inject_sim_id) | |
Recorder (boost::uuids::uuid simid) | |
Recorder (unsigned int dump_count) | |
void | RegisterBackend (RecBackend *b) |
void | set_dump_count (unsigned int count) |
boost::uuids::uuid | sim_id () |
~Recorder () | |
cyclus::Recorder::Recorder | ( | ) |
create a new recorder with default dump frequency, random simulation id, and simulation id injection.
Definition at line 13 of file recorder.cc.
cyclus::Recorder::Recorder | ( | bool | inject_sim_id | ) |
create a new recorder with the given dump count, random simulation id, and given flag for injecting the simulation id.
Definition at line 18 of file recorder.cc.
create a new recorder with the given dump count and random simulation id.
Definition at line 23 of file recorder.cc.
cyclus::Recorder::Recorder | ( | boost::uuids::uuid | simid | ) |
create a new recorder with default dump frequency.
the specified simulation id, and simulation id injection.
Definition at line 28 of file recorder.cc.
cyclus::Recorder::~Recorder | ( | ) |
Definition at line 33 of file recorder.cc.
void cyclus::Recorder::Close | ( | ) |
Flushes all buffered Datum objects and flushes all registered backends.
Unregisters all backends and resets.
Definition at line 117 of file recorder.cc.
Return the dump frequency, # Datum objects buffered between flushes to backends.
Definition at line 45 of file recorder.cc.
void cyclus::Recorder::Flush | ( | ) |
Flushes all buffered Datum objects and flushes all registered backends.
Definition at line 92 of file recorder.cc.
|
inline |
returns whether or not the unique simulation id will be injected.
Definition at line 83 of file recorder.h.
sets whether or not the unique simulation id will be injected.
Definition at line 86 of file recorder.h.
Datum * cyclus::Recorder::NewDatum | ( | std::string | title | ) |
Creates a new datum namespaced under the specified title.
Definition at line 69 of file recorder.cc.
void cyclus::Recorder::RegisterBackend | ( | RecBackend * | b | ) |
set the Recorder to flush its collected Datum objects to registered backends every [count] Datum objects.
If count == 0 then Datum objects will be flushed immediately as they come.
count | # Datum objects to buffer before flushing to backends. |
Definition at line 53 of file recorder.cc.
boost::uuids::uuid cyclus::Recorder::sim_id | ( | ) |
returns the unique id associated with this cyclus simulation.
Definition at line 49 of file recorder.cc.