SST  9.1.0
StructuralSimulationToolkit
SST::Statistics::StatisticOutput Class Referenceabstract

Forms the base class for statistics output generation within the SST core. More...

#include <statoutput.h>

Inheritance diagram for SST::Statistics::StatisticOutput:
SST::Module SST::Statistics::StatisticOutputConsole SST::Statistics::StatisticOutputCSV SST::Statistics::StatisticOutputHDF5 SST::Statistics::StatisticOutputJSON SST::Statistics::StatisticOutputTxt

Public Types

using fieldType_t = StatisticFieldInfo::fieldType_t
 
using fieldHandle_t = StatisticFieldInfo::fieldHandle_t
 
using FieldInfoArray_t = std::vector< StatisticFieldInfo * >
 
using FieldNameMap_t = std::unordered_map< std::string, fieldHandle_t >
 

Public Member Functions

 StatisticOutput (Params &outputParameters)
 Construct a base StatisticOutput. More...
 
std::string & getStatisticOutputName ()
 Return the Statistic Output name.
 
ParamsgetOutputParameters ()
 Return the parameters for the StatisticOutput.
 
virtual bool acceptsGroups () const
 True if this StatOutput can handle StatisticGroups.
 
template<typename T >
fieldHandle_t registerField (const char *fieldName)
 Register a field to be output (templated function) More...
 
StatisticFieldInfogetRegisteredField (fieldHandle_t fieldHandle)
 Adjust the hierarchy of the fields (FUTURE SUPPORT) More...
 
template<typename T >
StatisticFieldInfogetRegisteredField (const char *statisticName, const char *fieldName)
 Return the information on a registered field via known names. More...
 
FieldInfoArray_t & getFieldInfoArray ()
 Return the array of registered field infos. More...
 
virtual void outputField (fieldHandle_t fieldHandle, int32_t data)
 Output field data. More...
 
virtual void outputField (fieldHandle_t fieldHandle, uint32_t data)
 
virtual void outputField (fieldHandle_t fieldHandle, int64_t data)
 
virtual void outputField (fieldHandle_t fieldHandle, uint64_t data)
 
virtual void outputField (fieldHandle_t fieldHandle, float data)
 
virtual void outputField (fieldHandle_t fieldHandle, double data)
 
const char * getFieldTypeShortName (fieldType_t type)
 Output field data. More...
 
- Public Member Functions inherited from SST::Module
 SST_ELI_DECLARE_CTORS (ELI_CTOR(SST::Params &),) Module()
 

Static Public Member Functions

static const std::vector
< SST::ElementInfoParam > & 
ELI_getParams ()
 

Protected Member Functions

virtual bool checkOutputParameters ()=0
 Have the Statistic Output check its parameters. More...
 
virtual void printUsage ()=0
 Have Statistic Object print out its usage and parameter info. More...
 
virtual void implStartRegisterFields (StatisticBase *UNUSED(statistic))
 
virtual void implRegisteredField (fieldHandle_t UNUSED(fieldHandle))
 
virtual void implStopRegisterFields ()
 
virtual void startOfSimulation ()=0
 Indicate to Statistic Output that simulation has started. More...
 
virtual void endOfSimulation ()=0
 Indicate to Statistic Output that simulation has ended. More...
 
virtual void implStartOutputEntries (StatisticBase *statistic)=0
 Indicate to Statistic Output that a statistic is about to send data to be output Allows object to perform any initialization before output. More...
 
virtual void implStopOutputEntries ()=0
 Indicate to Statistic Output that a statistic is finished sending data to be output Allows object to perform any cleanup. More...
 
virtual void implStartRegisterGroup (StatisticGroup *UNUSED(group))
 
virtual void implStopRegisterGroup ()
 
virtual void implStartOutputGroup (StatisticGroup *UNUSED(group))
 
virtual void implStopOutputGroup ()
 
void setStatisticOutputName (std::string name)
 
void lock ()
 
void unlock ()
 

Friends

class SST::Simulation
 
class SST::Statistics::StatisticProcessingEngine
 

Detailed Description

Forms the base class for statistics output generation within the SST core.

Statistics are gathered by the statistic objects and then processed sent to the derived output object either periodically or by event and/or also at the end of the simulation. A single statistic output will be created by the simulation (per node) and will collect the data per its design.

Constructor & Destructor Documentation

SST::Statistics::StatisticOutput::StatisticOutput ( Params outputParameters)

Construct a base StatisticOutput.

Parameters
outputParameters- The parameters for the statistic Output.

Member Function Documentation

virtual bool SST::Statistics::StatisticOutput::checkOutputParameters ( )
protectedpure virtual

Have the Statistic Output check its parameters.

Returns
True if all parameters are ok; False if a parameter is missing or incorrect.

Implemented in SST::Statistics::StatisticOutputHDF5, SST::Statistics::StatisticOutputCSV, SST::Statistics::StatisticOutputTxt, SST::Statistics::StatisticOutputConsole, and SST::Statistics::StatisticOutputJSON.

virtual void SST::Statistics::StatisticOutput::endOfSimulation ( )
protectedpure virtual
FieldInfoArray_t& SST::Statistics::StatisticOutput::getFieldInfoArray ( )
inline
const char * SST::Statistics::StatisticOutput::getFieldTypeShortName ( fieldType_t  type)

Output field data.

Parameters
type- The field type to get name of.
Returns
String name of the field type.

Referenced by SST::Statistics::StatisticOutputConsole::outputField(), SST::Statistics::StatisticOutputTxt::outputField(), and SST::Statistics::StatisticOutputCSV::startOfSimulation().

StatisticFieldInfo * SST::Statistics::StatisticOutput::getRegisteredField ( fieldHandle_t  fieldHandle)

Adjust the hierarchy of the fields (FUTURE SUPPORT)

Parameters
fieldHandle- The handle of the field to adjust.
Level- The level of the field.
parent- The parent field of the field. Return the information on a registered field via the field handle.
fieldHandle- The handle of the registered field.
Returns
Pointer to the registered field info.

Referenced by SST::Statistics::StatisticOutputConsole::outputField(), and SST::Statistics::StatisticOutputTxt::outputField().

template<typename T >
StatisticFieldInfo* SST::Statistics::StatisticOutput::getRegisteredField ( const char *  statisticName,
const char *  fieldName 
)
inline

Return the information on a registered field via known names.

Parameters
componentName- The name of the component.
statisticName- The name of the statistic.
fieldName- The name of the field .
Returns
Pointer to the registered field info.
virtual void SST::Statistics::StatisticOutput::implStartOutputEntries ( StatisticBase statistic)
protectedpure virtual

Indicate to Statistic Output that a statistic is about to send data to be output Allows object to perform any initialization before output.

Implemented in SST::Statistics::StatisticOutputHDF5, SST::Statistics::StatisticOutputCSV, SST::Statistics::StatisticOutputTxt, SST::Statistics::StatisticOutputConsole, and SST::Statistics::StatisticOutputJSON.

virtual void SST::Statistics::StatisticOutput::implStopOutputEntries ( )
protectedpure virtual

Indicate to Statistic Output that a statistic is finished sending data to be output Allows object to perform any cleanup.

Implemented in SST::Statistics::StatisticOutputHDF5, SST::Statistics::StatisticOutputCSV, SST::Statistics::StatisticOutputTxt, SST::Statistics::StatisticOutputConsole, and SST::Statistics::StatisticOutputJSON.

virtual void SST::Statistics::StatisticOutput::outputField ( fieldHandle_t  fieldHandle,
int32_t  data 
)
virtual

Output field data.

Parameters
fieldHandle- The handle of the registered field.
data- The data to be output.

Reimplemented in SST::Statistics::StatisticOutputHDF5, SST::Statistics::StatisticOutputCSV, SST::Statistics::StatisticOutputTxt, SST::Statistics::StatisticOutputConsole, and SST::Statistics::StatisticOutputJSON.

virtual void SST::Statistics::StatisticOutput::printUsage ( )
protectedpure virtual
template<typename T >
fieldHandle_t SST::Statistics::StatisticOutput::registerField ( const char *  fieldName)
inline

Register a field to be output (templated function)

Parameters
fieldName- The name of the field.
Returns
The handle of the registered field or -1 if type is not supported. Note: Any field names (of the same data type) that are previously registered by a statistic will return the previously handle.

Referenced by SST::Statistics::AccumulatorStatistic< NumberBase >::registerOutputFields().

virtual void SST::Statistics::StatisticOutput::startOfSimulation ( )
protectedpure virtual

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