SST
7.2.0
StructuralSimulationToolkit
|
Forms the base class for statistics output generation within the SST core.More...
#include <statoutput.h>
Public Types | |
typedef StatisticFieldInfo::fieldType_t | fieldType_t |
typedef StatisticFieldInfo::fieldHandle_t | fieldHandle_t |
typedef std::vector< StatisticFieldInfo * > | FieldInfoArray_t |
typedef std::unordered_map< std::string, fieldHandle_t > | FieldNameMap_t |
Public Member Functions | |
StatisticOutput (Params &outputParameters) | |
Construct a base StatisticOutput. More... | |
std::string & | getStatisticOutputName () |
Return the Statistic Output name. | |
Params & | getOutputParameters () |
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... | |
StatisticFieldInfo * | getRegisteredField (fieldHandle_t fieldHandle) |
Adjust the heirarchy of the fields (FUTURE SUPPORT) More... | |
template<typename T > | |
StatisticFieldInfo * | getRegisteredField (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... | |
void | outputField (fieldHandle_t fieldHandle, int32_t data) |
Output field data. More... | |
void | outputField (fieldHandle_t fieldHandle, uint32_t data) |
void | outputField (fieldHandle_t fieldHandle, int64_t data) |
void | outputField (fieldHandle_t fieldHandle, uint64_t data) |
void | outputField (fieldHandle_t fieldHandle, float data) |
void | outputField (fieldHandle_t fieldHandle, double data) |
const char * | getFieldTypeShortName (fieldType_t type) |
Output field data. More... | |
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 () |
virtual void | implOutputField (fieldHandle_t fieldHandle, int32_t data)=0 |
Implementation of outputField() for derived classes. More... | |
virtual void | implOutputField (fieldHandle_t fieldHandle, uint32_t data)=0 |
virtual void | implOutputField (fieldHandle_t fieldHandle, int64_t data)=0 |
virtual void | implOutputField (fieldHandle_t fieldHandle, uint64_t data)=0 |
virtual void | implOutputField (fieldHandle_t fieldHandle, float data)=0 |
virtual void | implOutputField (fieldHandle_t fieldHandle, double data)=0 |
void | setStatisticOutputName (std::string name) |
void | lock () |
void | unlock () |
Friends | |
class | SST::Simulation |
class | SST::Statistics::StatisticProcessingEngine |
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 simuation. A single statistic output will be created by the simuation (per node) and will collect the data per its design.
SST::Statistics::StatisticOutput::StatisticOutput | ( | Params & | outputParameters | ) |
Construct a base StatisticOutput.
outputParameters | - The parameters for the statistic Output. |
References SST::Statistics::StatisticFieldInfo::getFieldHandle(), SST::Statistics::StatisticFieldInfo::getFieldUniqueName(), SST::Statistics::StatisticBase::getStatName(), and SST::Statistics::StatisticFieldInfo::setFieldHandle().
|
protectedpure virtual |
Have the Statistic Output check its parameters.
Implemented in SST::Statistics::StatisticOutputHDF5, SST::Statistics::StatisticOutputCSV, SST::Statistics::StatisticOutputTxt, SST::Statistics::StatisticOutputConsole, and SST::Statistics::StatisticOutputJSON.
Referenced by getFieldInfoArray().
|
protectedpure virtual |
Indicate to Statistic Output that simulation has ended.
Allows object to perform any shutdown required.
Implemented in SST::Statistics::StatisticOutputHDF5, SST::Statistics::StatisticOutputCSV, SST::Statistics::StatisticOutputTxt, SST::Statistics::StatisticOutputConsole, and SST::Statistics::StatisticOutputJSON.
Referenced by getFieldInfoArray().
|
inline |
Return the array of registered field infos.
References checkOutputParameters(), endOfSimulation(), getFieldTypeShortName(), implOutputField(), implStartOutputEntries(), implStopOutputEntries(), outputField(), printUsage(), and startOfSimulation().
Referenced by SST::Statistics::StatisticOutputCSV::implStartOutputEntries(), SST::Statistics::StatisticOutputTxt::startOfSimulation(), and SST::Statistics::StatisticOutputCSV::startOfSimulation().
const char * SST::Statistics::StatisticOutput::getFieldTypeShortName | ( | fieldType_t | type | ) |
Output field data.
type | - The field type to get name of. |
Referenced by getFieldInfoArray(), SST::Statistics::StatisticOutputConsole::implOutputField(), SST::Statistics::StatisticOutputTxt::implOutputField(), and SST::Statistics::StatisticOutputCSV::startOfSimulation().
StatisticFieldInfo * SST::Statistics::StatisticOutput::getRegisteredField | ( | fieldHandle_t | fieldHandle | ) |
Adjust the heirarchy of the fields (FUTURE SUPPORT)
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. |
References SST::Statistics::StatisticBase::getStatName(), implStartOutputEntries(), and implStopOutputEntries().
Referenced by SST::Statistics::StatisticOutputConsole::implOutputField(), SST::Statistics::StatisticOutputTxt::implOutputField(), SST::Statistics::StatisticOutputHDF5::printUsage(), and registerField().
|
inline |
Return the information on a registered field via known names.
componentName | - The name of the component. |
statisticName | - The name of the statistic. |
fieldName | - The name of the field . |
|
protectedpure virtual |
Implementation of outputField() for derived classes.
Perform the actual implementation of the output.
Implemented in SST::Statistics::StatisticOutputHDF5, SST::Statistics::StatisticOutputCSV, SST::Statistics::StatisticOutputTxt, SST::Statistics::StatisticOutputConsole, and SST::Statistics::StatisticOutputJSON.
Referenced by getFieldInfoArray(), and outputField().
|
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.
Referenced by getFieldInfoArray(), and getRegisteredField().
|
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.
Referenced by getFieldInfoArray(), and getRegisteredField().
void SST::Statistics::StatisticOutput::outputField | ( | fieldHandle_t | fieldHandle, |
int32_t | data | ||
) |
Output field data.
fieldHandle | - The handle of the registered field. |
data | - The data to be output. |
References implOutputField().
Referenced by SST::Statistics::UniqueCountStatistic< T >::addData_impl(), SST::Statistics::HistogramStatistic< BinDataType >::addData_impl(), getFieldInfoArray(), and SST::Statistics::AccumulatorStatistic< NumberBase >::registerOutputFields().
|
protectedpure virtual |
Have Statistic Object print out its usage and parameter info.
Called when checkOutputParameters() returns false
Implemented in SST::Statistics::StatisticOutputHDF5, SST::Statistics::StatisticOutputCSV, SST::Statistics::StatisticOutputTxt, SST::Statistics::StatisticOutputConsole, and SST::Statistics::StatisticOutputJSON.
Referenced by getFieldInfoArray().
|
inline |
Register a field to be output (templated function)
fieldName | - The name of the field. |
References getRegisteredField().
Referenced by SST::Statistics::StatisticOutputHDF5::acceptsGroups(), SST::Statistics::UniqueCountStatistic< T >::addData_impl(), SST::Statistics::HistogramStatistic< BinDataType >::addData_impl(), and SST::Statistics::AccumulatorStatistic< NumberBase >::registerOutputFields().
|
protectedpure virtual |
Indicate to Statistic Output that simulation has started.
Allows object to perform any setup required.
Implemented in SST::Statistics::StatisticOutputHDF5, SST::Statistics::StatisticOutputCSV, SST::Statistics::StatisticOutputTxt, SST::Statistics::StatisticOutputConsole, and SST::Statistics::StatisticOutputJSON.
Referenced by getFieldInfoArray().