The Sparta Modeling Framework
|
Base class used by the RootArchiveNode to have some control over its data source, whether it is a live simulation, or an offline archive (no simulation) More...
#include <ArchiveController.hpp>
Public Member Functions | |
virtual bool | synchronize ()=0 |
virtual void | saveTo (const std::string &dir)=0 |
Base class used by the RootArchiveNode to have some control over its data source, whether it is a live simulation, or an offline archive (no simulation)
Definition at line 17 of file ArchiveController.hpp.
|
inlinevirtual |
Definition at line 20 of file ArchiveController.hpp.
|
pure virtual |
Save (or re-save) the entire archive to a new directory. This does not simply point the archive streams to put new data in this directory; the archives will still be putting data into the original directory (such as the temp dir), whereas calling saveTo() is a deep copy of whatever is currently archived.
Implemented in sparta::statistics::LiveSimulationArchiveController, and sparta::statistics::OfflineArchiveController.
|
pure virtual |
Some archive sources/sinks may buffer data or perform asynchronous operations, which can lead to non-deterministic behavior when accessing data. For example, ofstream buffers that have not been flushed will appear to be missing data in the archive. A synchronization in that case would flush the ofstream's. Other implementations may have different notions of synchronization.
Implemented in sparta::statistics::LiveSimulationArchiveController, and sparta::statistics::OfflineArchiveController.