void AnalysisDataModuleManager::notifyPointsAdd(const AnalysisDataPointSetRef &points) const { GMX_ASSERT(impl_->state_ == Impl::eInFrame, "notifyFrameStart() not called"); // TODO: Add checks for column spans (requires passing the information // about the column counts from somewhere). //GMX_ASSERT(points.lastColumn() < columnCount(points.dataSetIndex()), // "Invalid columns"); GMX_ASSERT(points.frameIndex() == impl_->currIndex_, "Points do not correspond to current frame"); if (impl_->bSerialModules_) { if (!impl_->bAllowMissing_ && !points.allPresent()) { GMX_THROW(APIError("Missing data not supported by a module")); } Impl::ModuleList::const_iterator i; for (i = impl_->modules_.begin(); i != impl_->modules_.end(); ++i) { if (!i->bParallel) { i->module->pointsAdded(points); } } } }
void AnalysisDataModuleManager::notifyParallelPointsAdd( const AnalysisDataPointSetRef &points) const { // TODO: Add checks for column spans (requires passing the information // about the column counts from somewhere). //GMX_ASSERT(points.lastColumn() < columnCount(points.dataSetIndex()), // "Invalid columns"); if (impl_->bParallelModules_) { if (!impl_->bAllowMissing_ && !points.allPresent()) { GMX_THROW(APIError("Missing data not supported by a module")); } Impl::ModuleList::const_iterator i; for (i = impl_->modules_.begin(); i != impl_->modules_.end(); ++i) { if (i->bParallel) { i->module->pointsAdded(points); } } } }
void AbstractAnalysisData::notifyPointsAdd(const AnalysisDataPointSetRef &points) const { GMX_ASSERT(impl_->bInData_, "notifyDataStart() not called"); GMX_ASSERT(impl_->bInFrame_, "notifyFrameStart() not called"); GMX_ASSERT(points.lastColumn() < columnCount(), "Invalid columns"); GMX_ASSERT(points.frameIndex() == impl_->currIndex_, "Points do not correspond to current frame"); if (!impl_->bAllowMissing_ && !points.allPresent()) { GMX_THROW(APIError("Missing data not supported by a module")); } Impl::ModuleList::const_iterator i; for (i = impl_->modules_.begin(); i != impl_->modules_.end(); ++i) { (*i)->pointsAdded(points); } }