|
OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
|
#include <StatBaseWriter.h>


Public Types | |
| typedef std::pair< std::string, std::string > | desc_t |
| typedef std::tuple< std::string, std::string, std::string > | param_t |
| typedef std::pair< std::string, size_t > | data_t |
| typedef std::tuple< std::string, std::string, std::string, std::string > | cols_t |
Public Member Functions | |
| StatBaseWriter (const std::string &fname, bool restart) | |
| unsigned int | rewindToSpos (double maxSpos) |
| delete the last 'numberOfLines' lines of the statistics file More... | |
| virtual void | write (PartBunchBase< double, 3 > *) |
| void | rewindLines (size_t numberOfLines) |
| delete the last 'numberOfLines' lines of the file 'fileName' More... | |
| void | replaceVersionString () |
| double | getLastValue (const std::string &column) |
| bool | exists () const |
Protected Member Functions | |
| void | addDescription (const std::string &text, const std::string &content) |
| template<typename T > | |
| void | addParameter (const std::string &name, const std::string &type, const std::string &desc, const T &value) |
| void | addDefaultParameters () |
| void | addColumn (const std::string &name, const std::string &type, const std::string &unit, const std::string &desc) |
| void | addInfo (const std::string &mode, const size_t &no_row_counts) |
| void | writeRow () |
| void | open () |
| void | close () |
| void | writeHeader () |
| Write SDDS header. More... | |
| template<typename T > | |
| std::string | toString (const T &val) |
| bool | hasColumns () const |
Protected Attributes | |
| std::string | fname_m |
| std::ios_base::openmode | mode_m |
| First write to the statistics output file. More... | |
| SDDSColumnSet | columns_m |
Private Member Functions | |
| void | writeDescription () |
| void | writeParameters () |
| void | writeColumns () |
| void | writeInfo () |
Private Attributes | |
| std::ofstream | os_m |
| std::string | indent_m |
| desc_t | desc_m |
| std::queue< param_t > | params_m |
| std::queue< std::string > | paramValues_m |
| data_t | info_m |
Static Private Attributes | |
| static constexpr unsigned int | precision_m = 15 |
Definition at line 27 of file StatBaseWriter.h.
|
inherited |
Definition at line 57 of file SDDSWriter.h.
|
inherited |
Definition at line 51 of file SDDSWriter.h.
|
inherited |
Definition at line 43 of file SDDSWriter.h.
|
inherited |
Definition at line 48 of file SDDSWriter.h.
| StatBaseWriter::StatBaseWriter | ( | const std::string & | fname, |
| bool | restart | ||
| ) |
Definition at line 23 of file StatBaseWriter.cpp.
|
protectedinherited |
|
protectedinherited |
Definition at line 209 of file SDDSWriter.cpp.
References SDDSWriter::addParameter(), Util::getGitRevision(), OpalData::getInstance(), and IpplInfo::getNodes().
Referenced by ElementPositionWriter::fillHeader(), MemoryWriter::fillHeader(), MonitorStatisticsWriter::fillHeader(), MultiBunchDump::fillHeader(), StatWriter::fillHeader(), GridLBalWriter::fillHeader(), LBalWriter::fillHeader(), and MemoryProfiler::header().

|
inlineprotectedinherited |
Definition at line 159 of file SDDSWriter.h.
References SDDSWriter::desc_m.
Referenced by ElementPositionWriter::fillHeader(), MemoryWriter::fillHeader(), MonitorStatisticsWriter::fillHeader(), MultiBunchDump::fillHeader(), StatWriter::fillHeader(), GridLBalWriter::fillHeader(), LBalWriter::fillHeader(), and MemoryProfiler::header().
|
inlineprotectedinherited |
Definition at line 178 of file SDDSWriter.h.
References SDDSWriter::info_m.
Referenced by ElementPositionWriter::fillHeader(), MemoryWriter::fillHeader(), MonitorStatisticsWriter::fillHeader(), MultiBunchDump::fillHeader(), StatWriter::fillHeader(), GridLBalWriter::fillHeader(), LBalWriter::fillHeader(), and MemoryProfiler::header().
|
protectedinherited |
Definition at line 166 of file SDDSWriter.h.
References name, SDDSWriter::params_m, and SDDSWriter::paramValues_m.
Referenced by SDDSWriter::addDefaultParameters().
|
protectedinherited |
Definition at line 142 of file SDDSWriter.cpp.
References IpplInfo::myNode(), and SDDSWriter::os_m.
Referenced by MonitorStatisticsWriter::addRow(), ElementPositionWriter::addRow(), MultiBunchDump::write(), StatWriter::write(), GridLBalWriter::write(), LBalWriter::write(), MemoryProfiler::write(), and MemoryWriter::write().

|
inlineinherited |
Definition at line 153 of file SDDSWriter.h.
References SDDSWriter::fname_m.
|
inherited |
Definition at line 123 of file SDDSWriter.cpp.
References SDDSWriter::fname_m, SDDS::SDDSParser::getValue(), and SDDS::SDDSParser::run().

|
inlineprotectedinherited |
Definition at line 200 of file SDDSWriter.h.
References SDDSWriter::columns_m, and SDDSColumnSet::hasColumns().
Referenced by ElementPositionWriter::fillHeader(), MemoryWriter::fillHeader(), MonitorStatisticsWriter::fillHeader(), MultiBunchDump::fillHeader(), StatWriter::fillHeader(), GridLBalWriter::fillHeader(), LBalWriter::fillHeader(), and MemoryProfiler::header().

|
protectedinherited |
Definition at line 132 of file SDDSWriter.cpp.
References SDDSWriter::fname_m, SDDSWriter::mode_m, IpplInfo::myNode(), SDDSWriter::os_m, and SDDSWriter::precision_m.
Referenced by MonitorStatisticsWriter::addRow(), ElementPositionWriter::addRow(), MultiBunchDump::write(), StatWriter::write(), GridLBalWriter::write(), LBalWriter::write(), MemoryProfiler::write(), and MemoryWriter::write().

|
inherited |
Definition at line 78 of file SDDSWriter.cpp.
References SDDSWriter::fname_m, Hypervolume::fs, Util::getGitRevision(), SDDS::SDDSParser::getParameterValue(), IpplInfo::myNode(), and SDDS::SDDSParser::run().

|
inherited |
delete the last 'numberOfLines' lines of the file 'fileName'
Definition at line 48 of file SDDSWriter.cpp.
References SDDSWriter::fname_m, Hypervolume::fs, and IpplInfo::myNode().

|
inline |
delete the last 'numberOfLines' lines of the statistics file
Definition at line 40 of file StatBaseWriter.h.
References SDDSWriter::fname_m, IpplInfo::myNode(), and Util::rewindLinesSDDS().

|
protectedinherited |
Definition at line 191 of file SDDSWriter.h.
References SDDSWriter::precision_m.
Referenced by GridLBalWriter::write(), and MemoryProfiler::write().
|
inlinevirtualinherited |
Reimplemented in MultiBunchDump, StatWriter, GridLBalWriter, LBalWriter, MemoryProfiler, and MemoryWriter.
Definition at line 63 of file SDDSWriter.h.
|
privateinherited |
Definition at line 189 of file SDDSWriter.cpp.
References SDDSWriter::columns_m, SDDSWriter::indent_m, SDDSWriter::os_m, and SDDSColumnSet::writeHeader().
Referenced by SDDSWriter::writeHeader().

|
privateinherited |
Definition at line 165 of file SDDSWriter.cpp.
References SDDSWriter::desc_m, endl(), SDDSWriter::indent_m, and SDDSWriter::os_m.
Referenced by SDDSWriter::writeHeader().

|
protectedinherited |
Write SDDS header.
Writes the appropriate SDDS format header information, The SDDS tools can be used for plotting data.
Definition at line 149 of file SDDSWriter.cpp.
References SDDSWriter::mode_m, IpplInfo::myNode(), SDDSWriter::writeColumns(), SDDSWriter::writeDescription(), SDDSWriter::writeInfo(), and SDDSWriter::writeParameters().
Referenced by MonitorStatisticsWriter::addRow(), ElementPositionWriter::addRow(), MultiBunchDump::write(), StatWriter::write(), GridLBalWriter::write(), LBalWriter::write(), MemoryProfiler::write(), and MemoryWriter::write().

|
privateinherited |
Definition at line 194 of file SDDSWriter.cpp.
References endl(), SDDSWriter::indent_m, SDDSWriter::info_m, SDDSWriter::os_m, and SDDSWriter::paramValues_m.
Referenced by SDDSWriter::writeHeader().

|
privateinherited |
Definition at line 174 of file SDDSWriter.cpp.
References SDDSWriter::indent_m, SDDSWriter::os_m, and SDDSWriter::params_m.
Referenced by SDDSWriter::writeHeader().
|
inlineprotectedinherited |
Definition at line 185 of file SDDSWriter.h.
References SDDSWriter::columns_m, SDDSWriter::os_m, and SDDSColumnSet::writeRow().
Referenced by MonitorStatisticsWriter::addRow(), ElementPositionWriter::addRow(), MultiBunchDump::write(), StatWriter::write(), GridLBalWriter::write(), LBalWriter::write(), MemoryProfiler::write(), and MemoryWriter::write().

|
protectedinherited |
Definition at line 122 of file SDDSWriter.h.
Referenced by MonitorStatisticsWriter::addRow(), ElementPositionWriter::addRow(), ElementPositionWriter::fillHeader(), MemoryWriter::fillHeader(), MonitorStatisticsWriter::fillHeader(), MultiBunchDump::fillHeader(), StatWriter::fillHeader(), GridLBalWriter::fillHeader(), LBalWriter::fillHeader(), SDDSWriter::hasColumns(), MemoryProfiler::header(), MultiBunchDump::write(), StatWriter::write(), GridLBalWriter::write(), LBalWriter::write(), MemoryProfiler::write(), MemoryWriter::write(), SDDSWriter::writeColumns(), and SDDSWriter::writeRow().
|
privateinherited |
Definition at line 142 of file SDDSWriter.h.
Referenced by SDDSWriter::addDescription(), and SDDSWriter::writeDescription().
|
protectedinherited |
Definition at line 112 of file SDDSWriter.h.
Referenced by SDDSWriter::exists(), SDDSWriter::getLastValue(), SDDSWriter::open(), SDDSWriter::replaceVersionString(), SDDSWriter::rewindLines(), rewindToSpos(), and SDDSWriter::SDDSWriter().
|
privateinherited |
Definition at line 140 of file SDDSWriter.h.
Referenced by SDDSWriter::writeColumns(), SDDSWriter::writeDescription(), SDDSWriter::writeInfo(), and SDDSWriter::writeParameters().
|
privateinherited |
Definition at line 145 of file SDDSWriter.h.
Referenced by SDDSWriter::addInfo(), and SDDSWriter::writeInfo().
|
protectedinherited |
First write to the statistics output file.
Initially set to std::ios::out so that SDDS format header information is written to file during the first write call to the statistics output file. Variable is then reset to std::ios::app so that header information is only written once.
Definition at line 120 of file SDDSWriter.h.
Referenced by MemoryWriter::fillHeader(), MultiBunchDump::fillHeader(), StatWriter::fillHeader(), GridLBalWriter::fillHeader(), LBalWriter::fillHeader(), MemoryProfiler::header(), SDDSWriter::open(), SDDSWriter::SDDSWriter(), and SDDSWriter::writeHeader().
|
privateinherited |
Definition at line 138 of file SDDSWriter.h.
Referenced by SDDSWriter::close(), SDDSWriter::open(), SDDSWriter::writeColumns(), SDDSWriter::writeDescription(), SDDSWriter::writeInfo(), SDDSWriter::writeParameters(), and SDDSWriter::writeRow().
|
privateinherited |
Definition at line 143 of file SDDSWriter.h.
Referenced by SDDSWriter::addParameter(), and SDDSWriter::writeParameters().
|
privateinherited |
Definition at line 144 of file SDDSWriter.h.
Referenced by SDDSWriter::addParameter(), and SDDSWriter::writeInfo().
|
staticconstexprprivateinherited |
Definition at line 148 of file SDDSWriter.h.
Referenced by SDDSWriter::open(), and SDDSWriter::toString().