The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::statistics::StatisticsArchives Class Reference

This class owns and coordinates a group of named archives. More...

#include <StatisticsArchives.hpp>

Inheritance diagram for sparta::statistics::StatisticsArchives:
Collaboration diagram for sparta::statistics::StatisticsArchives:

Public Member Functions

 StatisticsArchives ()=default
 
 StatisticsArchives (const std::string &db_dir)
 
void saveTo (const std::string &dir)
 
- Public Member Functions inherited from sparta::statistics::StatisticsHierRootNodes< RootArchiveNode >
void addHierarchyRoot (const std::string &storage_name, std::shared_ptr< RootArchiveNode > &root)
 Append a statistics hierarchy root node to this set.
 
std::vector< std::string > getRootNames () const
 Access the root node names in this set.
 
void mapRootNameToReportFilename (const std::string &root_name, const std::string &report_filename) const
 
RootArchiveNodegetRootByName (const std::string &root_name)
 

Detailed Description

This class owns and coordinates a group of named archives.

Definition at line 19 of file StatisticsArchives.hpp.

Constructor & Destructor Documentation

◆ StatisticsArchives() [1/2]

sparta::statistics::StatisticsArchives::StatisticsArchives ( )
default

Default (empty) archives objects are created from simulations. The archive hierarchy is inferred from sparta::Report and sparta::StatisticInstance objects during simulation.

◆ StatisticsArchives() [2/2]

sparta::statistics::StatisticsArchives::StatisticsArchives ( const std::string &  db_dir)
inlineexplicit

This constructor overload is used when you want to attach an archives object to an existing database. This can occur offline; the archive hierarchy is inferred from a metadata file in this database directory which describes the archive tree.

Definition at line 33 of file StatisticsArchives.hpp.

Member Function Documentation

◆ saveTo()

void sparta::statistics::StatisticsArchives::saveTo ( const std::string &  dir)

Save the database as-is to the given directory. This will save whatever is in the database when this method is called, even if it is in the middle of a simulation. In the case of active simulations, the file buffers will all be flushed to disk before the save is made so you won't be missing any data.


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