本文整理汇总了C++中Algorithm_sptr::copyPropertiesFrom方法的典型用法代码示例。如果您正苦于以下问题:C++ Algorithm_sptr::copyPropertiesFrom方法的具体用法?C++ Algorithm_sptr::copyPropertiesFrom怎么用?C++ Algorithm_sptr::copyPropertiesFrom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Algorithm_sptr
的用法示例。
在下文中一共展示了Algorithm_sptr::copyPropertiesFrom方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: exec
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: exec
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");
}