00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef _H_SST_CORE_STATISTICS_OUTPUTTXT
00013 #define _H_SST_CORE_STATISTICS_OUTPUTTXT
00014
00015 #include "sst/core/sst_types.h"
00016 #include <sst/core/serialization.h>
00017
00018 #include <sst/core/statapi/statoutput.h>
00019
00020 namespace SST {
00021 namespace Statistics {
00022
00023
00024
00025
00026
00027
00028 class StatisticOutputTxt : public StatisticOutput
00029 {
00030 public:
00031
00032
00033
00034 StatisticOutputTxt(Params& outputParameters);
00035
00036 protected:
00037
00038
00039
00040 bool checkOutputParameters();
00041
00042
00043 void printUsage();
00044
00045
00046
00047
00048 void startOfSimulation();
00049
00050
00051
00052
00053 void endOfSimulation();
00054
00055
00056
00057
00058
00059
00060
00061 void implStartOutputEntries(StatisticBase* statistic);
00062
00063
00064
00065
00066
00067
00068 void implStopOutputEntries();
00069
00070
00071
00072
00073
00074
00075
00076 void implOutputField(fieldHandle_t fieldHandle, int32_t data);
00077 void implOutputField(fieldHandle_t fieldHandle, uint32_t data);
00078 void implOutputField(fieldHandle_t fieldHandle, int64_t data);
00079 void implOutputField(fieldHandle_t fieldHandle, uint64_t data);
00080 void implOutputField(fieldHandle_t fieldHandle, float data);
00081 void implOutputField(fieldHandle_t fieldHandle, double data);
00082
00083 protected:
00084 StatisticOutputTxt() {;}
00085
00086 private:
00087 FILE* m_hFile;
00088 std::string m_outputBuffer;
00089 std::string m_FilePath;
00090 bool m_outputTopHeader;
00091 bool m_outputInlineHeader;
00092 bool m_outputSimTime;
00093 bool m_outputRank;
00094
00095 friend class boost::serialization::access;
00096 template<class Archive>
00097 void serialize(Archive & ar, const unsigned int version)
00098 {
00099 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(StatisticOutput);
00100 ar & BOOST_SERIALIZATION_NVP(m_outputBuffer);
00101 ar & BOOST_SERIALIZATION_NVP(m_FilePath);
00102 ar & BOOST_SERIALIZATION_NVP(m_outputTopHeader);
00103 ar & BOOST_SERIALIZATION_NVP(m_outputInlineHeader);
00104 ar & BOOST_SERIALIZATION_NVP(m_outputSimTime);
00105 ar & BOOST_SERIALIZATION_NVP(m_outputRank);
00106 }
00107 };
00108
00109 }
00110 }
00111
00112 BOOST_CLASS_EXPORT_KEY(SST::Statistics::StatisticOutputTxt)
00113
00114 #endif