The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::statistics::ArchiveController Class Referenceabstract

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>

Inheritance diagram for sparta::statistics::ArchiveController:

Public Member Functions

virtual bool synchronize ()=0
 
virtual void saveTo (const std::string &dir)=0
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~ArchiveController()

virtual sparta::statistics::ArchiveController::~ArchiveController ( )
inlinevirtual

Definition at line 20 of file ArchiveController.hpp.

Member Function Documentation

◆ saveTo()

virtual void sparta::statistics::ArchiveController::saveTo ( const std::string &  dir)
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.

◆ synchronize()

virtual bool sparta::statistics::ArchiveController::synchronize ( )
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.


The documentation for this class was generated from the following file: