/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2013, by the GROMACS development team, led by
- * David van der Spoel, Berk Hess, Erik Lindahl, and including many
- * others, as listed in the AUTHORS file in the top-level source
- * directory and at http://www.gromacs.org.
+ * Copyright (c) 2010,2011,2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
*
* GROMACS is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* \author Teemu Murtola <teemu.murtola@gmail.com>
* \ingroup module_analysisdata
*/
-#include "gromacs/analysisdata/analysisdata.h"
+#include "gmxpre.h"
+
+#include "analysisdata.h"
#include "gromacs/analysisdata/dataframe.h"
#include "gromacs/analysisdata/datastorage.h"
void
-AnalysisData::setColumnCount(int ncol)
+AnalysisData::setDataSetCount(int dataSetCount)
{
- GMX_RELEASE_ASSERT(ncol > 0, "Number of columns must be positive");
GMX_RELEASE_ASSERT(impl_->handles_.empty(),
"Cannot change data dimensionality after creating handles");
- AbstractAnalysisData::setColumnCount(ncol);
+ AbstractAnalysisData::setDataSetCount(dataSetCount);
+}
+
+
+void
+AnalysisData::setColumnCount(int dataSet, int columnCount)
+{
+ GMX_RELEASE_ASSERT(impl_->handles_.empty(),
+ "Cannot change data dimensionality after creating handles");
+ AbstractAnalysisData::setColumnCount(dataSet, columnCount);
}
GMX_RELEASE_ASSERT(impl_->handles_.empty(),
"Cannot change data type after creating handles");
AbstractAnalysisData::setMultipoint(bMultipoint);
- impl_->storage_.setMultipoint(bMultipoint);
+}
+
+
+int
+AnalysisData::frameCount() const
+{
+ return impl_->storage_.frameCount();
}
"Too many calls to startData() compared to provided options");
if (impl_->handles_.empty())
{
- notifyDataStart();
- impl_->storage_.setParallelOptions(opt);
- impl_->storage_.startDataStorage(this);
- }
- else if (isMultipoint())
- {
- GMX_THROW(NotImplementedError("Parallelism not supported for multipoint data"));
+ impl_->storage_.startParallelDataStorage(this, &moduleManager(), opt);
}
Impl::HandlePointer handle(new internal::AnalysisDataHandleImpl(this));
if (impl_->handles_.empty())
{
- notifyDataFinish();
+ impl_->storage_.finishDataStorage();
}
}
}
+void
+AnalysisDataHandle::selectDataSet(int index)
+{
+ GMX_RELEASE_ASSERT(impl_ != NULL, "Invalid data handle used");
+ GMX_RELEASE_ASSERT(impl_->currentFrame_ != NULL,
+ "selectDataSet() called without calling startFrame()");
+ impl_->currentFrame_->selectDataSet(index);
+}
+
+
void
AnalysisDataHandle::setPoint(int column, real value, bool bPresent)
{