|
iMSTK
Interactive Medical Simulation Toolkit
|
Store time based data to write to a file. More...
#include <imstkDataTracker.h>
Classes | |
| struct | Element |
| struct | ePhysics |
| Common data values to track. More... | |
| struct | Physics |
| Header names of the common data values to track. More... | |
Public Types | |
| enum | eDecimalFormat_Type { SystemFormatting = 0, DefaultFloat, FixedMantissa, SignificantDigits } |
| C++ I/O manipulation flags. | |
Public Member Functions | |
| void | useTabDelimiter () |
| void | useCommaDelimiter () |
| void | setFilename (const std::string &fn) |
| StopWatch & | getStopWatch (int idx) |
| An available timer for each data item tracked. | |
| void | probe (int idx, double value) |
| Track a data value associated with a header id. More... | |
| int | probe (const std::string &name, double value) |
| Track a data value associated with a header string. More... | |
| void | probeElapsedTime_s (int idx) |
| Track a time duration associated with a header. More... | |
| int | configureProbe (const std::string &name, std::streamsize precision=3, eDecimalFormat_Type notation=eDecimalFormat_Type::SystemFormatting) |
| Create and configure a probe and how it is written to file. More... | |
| int | configureProbe (const std::string &name, int index, std::streamsize precision=6, eDecimalFormat_Type notation=eDecimalFormat_Type::SystemFormatting) |
| Create and configure a probe and how it is written to file. More... | |
| double | getValue (int idx) |
| double | getValue (const std::string &name) |
| std::string | getName (int idx) |
| void | streamProbesToFile (double time) |
| Write the current probe values to a row in the data file. More... | |
Protected Member Functions | |
| void | createFile () |
| Element & | getElement (int idx) |
| Element & | getElement (std::string const &name) |
Protected Attributes | |
| std::string | m_filename |
| char | m_delimiter |
| std::vector< Element > | m_elements |
| std::ofstream | m_file |
| std::map< int, StopWatch > | m_timers |
| int | m_nextIndex |
Store time based data to write to a file.
Definition at line 24 of file imstkDataTracker.h.
| int imstk::DataTracker::configureProbe | ( | const std::string & | name, |
| std::streamsize | precision = 3, |
||
| eDecimalFormat_Type | notation = eDecimalFormat_Type::SystemFormatting |
||
| ) |
Create and configure a probe and how it is written to file.
| header | name |
| C++ | precision |
| C++ | I/O manipulation type |
Definition at line 28 of file imstkDataTracker.cpp.
| int imstk::DataTracker::configureProbe | ( | const std::string & | name, |
| int | index, | ||
| std::streamsize | precision = 6, |
||
| eDecimalFormat_Type | notation = eDecimalFormat_Type::SystemFormatting |
||
| ) |
Create and configure a probe and how it is written to file.
| ID | of the header added |
| Index | ID to associate with this header Note, if you are going to mix probing via index and name, use a negative number, as auto indexing uses positive |
| C++ | precision |
| C++ | I/O manipulation type |
Definition at line 37 of file imstkDataTracker.cpp.
| void imstk::DataTracker::probe | ( | int | idx, |
| double | value | ||
| ) |
Track a data value associated with a header id.
| ID | of the header to add to, This is the ID returned from configureProbe |
| value | to track |
Definition at line 55 of file imstkDataTracker.cpp.
| int imstk::DataTracker::probe | ( | const std::string & | name, |
| double | value | ||
| ) |
Track a data value associated with a header string.
| String | of the header to add to |
| value | to track |
Definition at line 47 of file imstkDataTracker.cpp.
| void imstk::DataTracker::probeElapsedTime_s | ( | int | idx | ) |
Track a time duration associated with a header.
| ID | of the header to add to, This is the ID returned from configureProbe |
Definition at line 62 of file imstkDataTracker.cpp.

| void imstk::DataTracker::streamProbesToFile | ( | double | time | ) |
Write the current probe values to a row in the data file.
| Current | simulation time |
Definition at line 152 of file imstkDataTracker.cpp.
1.8.13