Example #1
0
/**
 * @brief Gets the X range of the first curve whose data is stored in the query
 * workspace.
 * @param workspace pointer to query workspace
 * @return the range of the first curve associated to the workspace
 * @exception std::runtime_error no stored curves are associated to the query
 * workspace
 */
QPair<double, double> DisplayCurveFit::getCurveRange(
    const Mantid::API::MatrixWorkspace_sptr workspace) {
  curveTypes typesFound = this->getCurvesForWorkspace(workspace);
  if (typesFound.size() == 0) {
    throw std::runtime_error("No fitting curves associated to workspace" +
                             workspace->name());
  }
  return getCurveRange(typesFound[0]);
}