SST  6.1.0
StructuralSimulationToolkit
statoutputconsole.h
1 // Copyright 2009-2016 Sandia Corporation. Under the terms
2 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
3 // Government retains certain rights in this software.
4 //
5 // Copyright (c) 2009-2016, Sandia Corporation
6 // All rights reserved.
7 //
8 // This file is part of the SST software package. For license
9 // information, see the LICENSE file in the top level directory of the
10 // distribution.
11 
12 #ifndef _H_SST_CORE_STATISTICS_OUTPUTCONSOLE
13 #define _H_SST_CORE_STATISTICS_OUTPUTCONSOLE
14 
15 #include "sst/core/sst_types.h"
16 
17 #include <sst/core/statapi/statoutput.h>
18 
19 namespace SST {
20 namespace Statistics {
21 
22 /**
23  \class StatisticOutputConsole
24 
25  The class for statistics output to the console. This will be the
26  default statistic output in SST.
27 */
29 {
30 public:
31  /** Construct a StatOutputConsole
32  * @param outputParameters - Parameters used for this Statistic Output
33  */
34  StatisticOutputConsole(Params& outputParameters);
35 
36 protected:
37  /** Perform a check of provided parameters
38  * @return True if all required parameters and options are acceptable
39  */
40  bool checkOutputParameters();
41 
42  /** Print out usage for this Statistic Output */
43  void printUsage();
44 
45  /** Indicate to Statistic Output that simulation started.
46  * Statistic output may perform any startup code here as necessary.
47  */
48  void startOfSimulation();
49 
50  /** Indicate to Statistic Output that simulation ended.
51  * Statistic output may perform any shutdown code here as necessary.
52  */
53  void endOfSimulation();
54 
55  /** Implementation function for the start of output.
56  * This will be called by the Statistic Processing Engine to indicate that
57  * a Statistic is about to send data to the Statistic Output for processing.
58  * @param statistic - Pointer to the statistic object than the output can
59  * retrieve data from.
60  */
61  void implStartOutputEntries(StatisticBase* statistic);
62 
63  /** Implementation function for the end of output.
64  * This will be called by the Statistic Processing Engine to indicate that
65  * a Statistic is finished sendind data to the Statistic Output for processing.
66  * The Statisic Output can perform any output related functions here.
67  */
68  void implStopOutputEntries();
69 
70  /** Implementation functions for output.
71  * These will be called by the statistic to provide Statistic defined
72  * data to be output.
73  * @param fieldHandle - The handle to the registered statistic field.
74  * @param data - The data related to the registered field to be output.
75  */
76  void implOutputField(fieldHandle_t fieldHandle, int32_t data);
77  void implOutputField(fieldHandle_t fieldHandle, uint32_t data);
78  void implOutputField(fieldHandle_t fieldHandle, int64_t data);
79  void implOutputField(fieldHandle_t fieldHandle, uint64_t data);
80  void implOutputField(fieldHandle_t fieldHandle, float data);
81  void implOutputField(fieldHandle_t fieldHandle, double data);
82 
83 protected:
84  StatisticOutputConsole() {;} // For serialization
85 
86 private:
87  std::string m_OutputBuffer;
88 
89 };
90 
91 } //namespace Statistics
92 } //namespace SST
93 
94 #endif
void implOutputField(fieldHandle_t fieldHandle, int32_t data)
Implementation functions for output.
Definition: statoutputconsole.cc:72
void implStopOutputEntries()
Implementation function for the end of output.
Definition: statoutputconsole.cc:66
Forms the base class for statistics output generation within the SST core.
Definition: statoutput.h:47
Forms the base class for statistics gathering within SST.
Definition: statbase.h:36
Definition: action.cc:17
bool checkOutputParameters()
Perform a check of provided parameters.
Definition: statoutputconsole.cc:28
Parameter store.
Definition: params.h:44
void endOfSimulation()
Indicate to Statistic Output that simulation ended.
Definition: statoutputconsole.cc:52
void implStartOutputEntries(StatisticBase *statistic)
Implementation function for the start of output.
Definition: statoutputconsole.cc:56
void printUsage()
Print out usage for this Statistic Output.
Definition: statoutputconsole.cc:40
void startOfSimulation()
Indicate to Statistic Output that simulation started.
Definition: statoutputconsole.cc:48
The class for statistics output to the console.
Definition: statoutputconsole.h:28