#include <gromacs/analysisdata/datamodulemanager.h>
Encapsulates handling of data modules attached to AbstractAnalysisData.
See IAnalysisDataModule and Parallelizable Handling of Output Data (analysisdata) for more details on the notifications and the order in which they should be raised.
Identifies data properties to check with data modules.
- See Also
- IAnalysisDataModule::Flag
Enumerator |
---|
eMultipleDataSets |
Data has multiple data sets.
|
eMultipleColumns |
Data has multiple columns.
|
eMultipoint |
Data is multipoint.
|
eDataPropertyNR |
Number of properties; for internal use only.
|
Adds a module to process the data.
- Parameters
-
data | Data object to add the module to. |
module | Module to add. |
- Exceptions
-
std::bad_alloc | if out of memory. |
APIError | if
module is not compatible with the data object
- data has already been added to the data object and everything is not available through getDataFrame().
|
unspecified | Any exception thrown by module in its notification methods (if data has been added). |
- See Also
- AbstractAnalysisData::addModule()
Applies a module to process data that is ready.
- Parameters
-
data | Data object to apply the module to. |
module | Module to apply. |
- Exceptions
-
APIError | in same situations as addModule(). |
unspecified | Any exception thrown by module in its notification methods. |
- See Also
- AbstractAnalysisData::applyModule()
void gmx::AnalysisDataModuleManager::dataPropertyAboutToChange |
( |
DataProperty |
property, |
|
|
bool |
bSet |
|
) |
| |
Allows the manager to check modules for compatibility with the data.
- Exceptions
-
APIError | if any data module already added is not compatible with the new setting. |
Does two things: checks any modules already attached to the data and throws if any of them is not compatible, and stores the property to check modules attached in the future.
Strong exception safety.
bool gmx::AnalysisDataModuleManager::hasSerialModules |
( |
| ) |
const |
Whether there are modules that do not support parallel processing.
Must not be called before notifyDataStart()/notifyParallelDataStart(). If notifyDataStart() has been called, returns true if there are any modules (all modules are treated as serial).
Does not throw.
void gmx::AnalysisDataModuleManager::notifyDataFinish |
( |
| ) |
const |
Notifies attached modules of the end of data.
- Exceptions
-
Should be called once, after all the other notification calls.
Notifies attached modules of the start of serial data.
- Parameters
-
data | Data object that is starting. |
- Exceptions
-
Should be called once, after data properties have been set with the methods in AbstractAnalysisData, and before any other notification methods. The caller should be prepared for requestStorage() calls to data
from the attached modules.
data
should typically be this
when calling from a class derived from AbstractAnalysisData.
This method initializes all modules for serial processing by calling IAnalysisDataModule::dataStarted().
Notifies attached serial modules of the end of a frame.
- Parameters
-
[in] | header | Header information for the frame that is ending. |
- Exceptions
-
Should be called once for each call of notifyFrameStart(), after any notifyPointsAdd() calls for the frame. header
should be identical to that used in the corresponding notifyFrameStart() call.
This method also notifies parallel modules about serial end of frame.
Notifies attached serial modules of the start of a frame.
- Parameters
-
[in] | header | Header information for the frame that is starting. |
- Exceptions
-
Should be called once for each frame, before notifyPointsAdd() calls for that frame.
Notifies attached modules of the start of parallel data.
- Parameters
-
| data | Data object that is starting. |
[in] | options | Parallelization properties of the input data. |
- Exceptions
-
Can be called instead of notifyDataStart() if data
supports non-sequential creation of frames. Works as notifyDataStart(), but instead calls IAnalysisDataModule::parallelDataStarted() and records whether the module supports the parallel mode. Subsequent notification calls then notify the modules according to the mode they accept.
See notifyDataStart() for general constraints.
Notifies attached parallel modules of the start of a frame.
- Parameters
-
[in] | header | Header information for the frame that is starting. |
- Exceptions
-
If notifyParallelDataStart() has been called, should be called once for each frame, before notifyParallelPointsAdd() calls for that frame. It is allowed to call this method in any order for the frames, but should be called exactly once for each frame.
Notifies attached parallel modules of the addition of points to a frame.
- Parameters
-
[in] | points | Set of points added (also provides access to frame-level data). |
- Exceptions
-
See notifyPointsAdd() for information on the structure of the point sets.
Notifies attached serial modules of the addition of points to the current frame.
- Parameters
-
[in] | points | Set of points added (also provides access to frame-level data). |
- Exceptions
-
Can be called zero or more times for each frame. The caller should ensure that any column occurs at most once in the calls, unless the data is multipoint. For efficiency reasons, calls to this method should be aggregated whenever possible, i.e., it's better to handle multiple columns or even the whole frame in a single call rather than calling the method for each column separately.
The documentation for this class was generated from the following files: