Gromacs
2020-beta1
|
#include <gromacs/analysisdata/datastorage.h>
Allows assigning values for a data frame in AnalysisDataStorage.
This class implements the necessary methods to add new data into the storage. AnalysisDataStorage::startFrame() returns an object of this type, which can be used to add one or more point sets to that data frame. When all data has been added, finishFrame() needs to be called.
Public Member Functions | |
~AnalysisDataStorageFrame () | |
Frees the frame object. More... | |
void | selectDataSet (int index) |
Select data set that all other methods operate on. More... | |
int | columnCount () const |
Returns number of columns for the frame. | |
void | setValue (int column, real value, bool bPresent=true) |
Sets value for a column. More... | |
void | setValue (int column, real value, real error, bool bPresent=true) |
Sets value for a column. More... | |
real & | value (int column) |
Access value for a column. More... | |
real | value (int column) const |
Access value for a column. More... | |
void | finishPointSet () |
Mark point set as finished for multipoint data. More... | |
void | finishFrame () |
Finish storing a frame. More... | |
Friends | |
class | internal::AnalysisDataStorageImpl |
Needed for access to the constructor. | |
class | internal::AnalysisDataStorageFrameData |
Needed for managing the frame the object points to. | |
gmx::AnalysisDataStorageFrame::~AnalysisDataStorageFrame | ( | ) |
Frees the frame object.
Should not be called outside AnalysisDataStorage.
void gmx::AnalysisDataStorageFrame::finishFrame | ( | ) |
Finish storing a frame.
Must be called exactly once for each frame returned by startFrame(), after the corresponding call. The frame object must not be accessed after the call.
Calls notification methods in AnalysisDataModuleManager, and may throw any exceptions these methods throw.
void gmx::AnalysisDataStorageFrame::finishPointSet | ( | ) |
Mark point set as finished for multipoint data.
Must be called after each point set for multipoint data, including the last (i.e., no values must be set between the last call to this method and AnalysisDataStorage::finishFrame()). Must not be called for non-multipoint data.
After this method has been called, all values appear as not set.
May call AnalysisDataModuleManager::notifyPointsAdd() and AnalysisDataModuleManager::notifyParallelPointsAdd(), and may throw any exception these methods throw.
void gmx::AnalysisDataStorageFrame::selectDataSet | ( | int | index | ) |
Select data set that all other methods operate on.
[in] | index | Zero-based data set index to select. |
With multipoint data, a single point set can only contain values in a single data set. With non-multipoint data, arbitrary sequences of selectDataSet() and setValue() are supported. The full frame is notified to the modules once it is finished.
Does not throw.
|
inline |
Sets value for a column.
[in] | column | Zero-based column index. |
[in] | value | Value to set for the column. |
[in] | bPresent | Present flag to set for the column. |
If called multiple times for a column (within one point set for multipoint data), old values are overwritten.
Does not throw.
|
inline |
Sets value for a column.
[in] | column | Zero-based column index. |
[in] | value | Value to set for the column. |
[in] | error | Error estimate to set for the column. |
[in] | bPresent | Present flag to set for the column. |
If called multiple times for a column (within one point set for multipoint data), old values are overwritten.
Does not throw.
|
inline |
Access value for a column.
[in] | column | Zero-based column index. |
Should only be called after the column value has been set using setValue(); assigning a value to value(i)
does not mark the column as set.
Does not throw.
|
inline |
Access value for a column.
[in] | column | Zero-based column index. |
Should only be called after the column value has been set using setValue().
Does not throw.