Gromacs  2020-beta1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Friends
gmx::AnalysisDataStorageFrame Class Reference

#include <gromacs/analysisdata/datastorage.h>

Description

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...
 
realvalue (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.
 

Constructor & Destructor Documentation

gmx::AnalysisDataStorageFrame::~AnalysisDataStorageFrame ( )

Frees the frame object.

Should not be called outside AnalysisDataStorage.

Member Function Documentation

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.

Parameters
[in]indexZero-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.

void gmx::AnalysisDataStorageFrame::setValue ( int  column,
real  value,
bool  bPresent = true 
)
inline

Sets value for a column.

Parameters
[in]columnZero-based column index.
[in]valueValue to set for the column.
[in]bPresentPresent 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.

void gmx::AnalysisDataStorageFrame::setValue ( int  column,
real  value,
real  error,
bool  bPresent = true 
)
inline

Sets value for a column.

Parameters
[in]columnZero-based column index.
[in]valueValue to set for the column.
[in]errorError estimate to set for the column.
[in]bPresentPresent 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.

real& gmx::AnalysisDataStorageFrame::value ( int  column)
inline

Access value for a column.

Parameters
[in]columnZero-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.

real gmx::AnalysisDataStorageFrame::value ( int  column) const
inline

Access value for a column.

Parameters
[in]columnZero-based column index.

Should only be called after the column value has been set using setValue().

Does not throw.


The documentation for this class was generated from the following files: