コード例 #1
0
ファイル: SofQW.cpp プロジェクト: DiegoMonserrat/mantid
void SofQW::exec() {
  // Find the approopriate algorithm
  std::string method = this->getProperty("Method");
  std::string child = "SofQW" + method;
  
  // Setup and run
  Algorithm_sptr childAlg = boost::dynamic_pointer_cast<Algorithm>(
      createChildAlgorithm(child, 0.0, 1.0));
  // This will add the Method property to the child algorithm but it will be
  // ignored anyway...
  childAlg->copyPropertiesFrom(*this);
  childAlg->execute();

  MatrixWorkspace_sptr outputWS = childAlg->getProperty("OutputWorkspace");
  this->setProperty("OutputWorkspace", outputWS);
}
コード例 #2
0
ファイル: SofQW.cpp プロジェクト: DanNixon/mantid
void SofQW::exec() {
  // Find the approopriate algorithm
  std::string method = this->getProperty("Method");
  std::string child = "SofQW" + method;

  // Setup and run
  Algorithm_sptr childAlg = boost::dynamic_pointer_cast<Algorithm>(
      createChildAlgorithm(child, 0.0, 1.0));
  // This will add the Method property to the child algorithm but it will be
  // ignored anyway...
  childAlg->copyPropertiesFrom(*this);
  childAlg->execute();

  MatrixWorkspace_sptr outputWS = childAlg->getProperty("OutputWorkspace");

  this->setProperty("OutputWorkspace", outputWS);

  // Progress reports & cancellation
  MatrixWorkspace_const_sptr inputWorkspace = getProperty("InputWorkspace");
  const size_t nHistos = inputWorkspace->getNumberHistograms();
  auto m_progress = make_unique<Progress>(this, 0.0, 1.0, nHistos);
  m_progress->report("Creating output workspace");
}