12 #ifndef SST_CORE_STATAPI_STATOUTPUTTXT_H 13 #define SST_CORE_STATAPI_STATOUTPUTTXT_H 15 #include "sst/core/sst_types.h" 16 #include "sst/core/statapi/statoutput.h" 80 void outputField(fieldHandle_t fieldHandle, int32_t data)
override;
81 void outputField(fieldHandle_t fieldHandle, uint32_t data)
override;
82 void outputField(fieldHandle_t fieldHandle, int64_t data)
override;
83 void outputField(fieldHandle_t fieldHandle, uint64_t data)
override;
84 void outputField(fieldHandle_t fieldHandle,
float data)
override;
85 void outputField(fieldHandle_t fieldHandle,
double data)
override;
90 bool m_outputTopHeader;
91 bool m_outputInlineHeader;
94 bool m_useCompression;
99 int print(
const char* fmt, ...) __attribute__((format(printf, 2, 3)));
106 std::string m_outputBuffer;
107 std::string m_FilePath;
112 virtual bool outputsToFile() = 0;
118 virtual bool supportsCompression() = 0;
123 virtual std::string getStartOutputPrefix() = 0;
130 virtual bool getOutputTopHeaderDefault() = 0;
131 virtual bool getOutputInlineHeaderDefault() = 0;
132 virtual bool getOutputSimTimeDefault() = 0;
133 virtual bool getOutputRankDefault() = 0;
135 virtual std::string getDefaultFileName() {
return ""; }
138 virtual bool acceptsGroups()
const override {
return true; }
150 SST_ELI_REGISTER_DERIVED(
155 SST_ELI_ELEMENT_VERSION(1,0,0),
156 "Output to text file" 159 SST_ELI_DOCUMENT_PARAMS(
160 {
"outputtopheader",
"Whether to print a header at the top of the output",
"False" },
161 {
"outputinlineheader",
"Whether to print a field names inline with statistic output",
"True" },
162 {
"outputsimtime",
"Whether to print the simulation time in the output",
"True" },
163 {
"outputrank",
"Whether to print the rank in the output",
"True" },
164 {
"filepath",
"Filepath for the output file",
"./StatisticOutput.txt" },
165 {
"compressed",
"Whether to compress the output file",
"False" }
184 bool outputsToFile()
override {
return true; }
190 bool supportsCompression()
override 201 std::string getStartOutputPrefix()
override {
return ""; }
208 bool getOutputTopHeaderDefault()
override {
return false; }
209 bool getOutputInlineHeaderDefault()
override {
return true; }
210 bool getOutputSimTimeDefault()
override {
return true; }
211 bool getOutputRankDefault()
override {
return true; }
213 std::string getDefaultFileName()
override {
return "StatisticOutput.txt"; }
224 SST_ELI_REGISTER_DERIVED(
229 SST_ELI_ELEMENT_VERSION(1,0,0),
233 SST_ELI_DOCUMENT_PARAMS(
234 {
"outputtopheader",
"Whether to print a header at the top of the output",
"False" },
235 {
"outputinlineheader",
"Whether to print a field names inline with statistic output",
"True" },
236 {
"outputsimtime",
"Whether to print the simulation time in the output",
"False" },
237 {
"outputrank",
"Whether to print the rank in the output",
"False" },
255 bool outputsToFile()
override {
return false; }
261 bool supportsCompression()
override {
return false; }
266 std::string getStartOutputPrefix()
override {
return " "; }
273 bool getOutputTopHeaderDefault()
override {
return false; }
274 bool getOutputInlineHeaderDefault()
override {
return true; }
275 bool getOutputSimTimeDefault()
override {
return false; }
276 bool getOutputRankDefault()
override {
return false; }
281 #endif // SST_CORE_STATAPI_STATOUTPUTTXT_H This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:42
void implStopOutputEntries() override
Implementation function for the end of output.
Definition: statoutputtxt.cc:152
Definition: statoutputtxt.h:27
void implStartOutputEntries(StatisticBase *statistic) override
Implementation function for the start of output.
Definition: statoutputtxt.cc:112
Forms the base class for statistics output generation within the SST core.
Definition: statoutput.h:52
Forms the base class for statistics gathering within SST.
Definition: statbase.h:49
virtual bool supportsDynamicRegistration() const override
This output supports adding statistics during runtime if the header is embedded in the output...
Definition: statoutputtxt.h:36
The class for statistics output to a text file.
Definition: statoutputtxt.h:147
void startOfSimulation() override
Indicate to Statistic Output that simulation started.
Definition: statoutputtxt.cc:59
Definition: statoutput.h:170
bool checkOutputParameters() override
Perform a check of provided parameters.
Definition: statoutputtxt.cc:30
void outputField(fieldHandle_t fieldHandle, int32_t data) override
Implementation functions for output.
Definition: statoutputtxt.cc:160
Parameter store.
Definition: params.h:63
StatisticOutputConsole(Params &outputParameters)
Construct a StatOutputTxt.
Definition: statoutputtxt.cc:429
void endOfSimulation() override
Indicate to Statistic Output that simulation ended.
Definition: statoutputtxt.cc:104
Definition: elementinfo.h:44
The class for statistics output to the console.
Definition: statoutputtxt.h:221