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

Wrapper around the StatisticsHierRootNodes<T> class. This class holds onto root StreamNode's that sit at the top of a report hierarchy. Say we have this hierarchy of two reports: More...

#include <StatisticsStreams.hpp>

Public Member Functions

void addHierarchyRoot (const std::string &storage_name, std::shared_ptr< StreamNode > &root)
 
std::vector< std::string > getRootNames () const
 
void mapRootNameToReportFilename (const std::string &root_name, const std::string &report_filename) const
 
StreamNodegetRootByName (const std::string &root_name)
 

Detailed Description

Wrapper around the StatisticsHierRootNodes<T> class. This class holds onto root StreamNode's that sit at the top of a report hierarchy. Say we have this hierarchy of two reports:

foo_csv              <-- root StreamNode* at 0xA
  top
    core0
      ...
bar_csv              <-- root StreamNode* at 0xB
  rob
    ipc

So the StatisticsStreams object would have two things in it:

[ "foo_csv" -> 0xA ],
[ "bar_csv" -> 0xB ]

Definition at line 30 of file StatisticsStreams.hpp.

Member Function Documentation

◆ addHierarchyRoot()

void sparta::statistics::StatisticsStreams::addHierarchyRoot ( const std::string &  storage_name,
std::shared_ptr< StreamNode > &  root 
)
inline

Add a root StreamNode by name. This will throw if there is already a root node by that name in this collection. Call the 'getRootByName()' to see if a root already exists by a given name - it will return null if not.

Definition at line 37 of file StatisticsStreams.hpp.

◆ getRootByName()

StreamNode * sparta::statistics::StatisticsStreams::getRootByName ( const std::string &  root_name)
inline

Ask for a hierarchy root node by name. The name should be one that you originally gave to addHierarchyRoot(), or this method will return null.

Definition at line 63 of file StatisticsStreams.hpp.

◆ getRootNames()

std::vector< std::string > sparta::statistics::StatisticsStreams::getRootNames ( ) const
inline

Returns a list of the names of the root StreamNode's in this collection, sorted alphabetically (A -> Z)

Definition at line 45 of file StatisticsStreams.hpp.

◆ mapRootNameToReportFilename()

void sparta::statistics::StatisticsStreams::mapRootNameToReportFilename ( const std::string &  root_name,
const std::string &  report_filename 
) const
inline

Maintain a mapping from report filenames like 'out.csv' to the equivalent root name like 'out_csv'. This is to support tab completion for Python shell users (Python won't allow dots in node names).

Definition at line 54 of file StatisticsStreams.hpp.


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