本文整理汇总了C++中mantid::api::MatrixWorkspace_sptr::run方法的典型用法代码示例。如果您正苦于以下问题:C++ MatrixWorkspace_sptr::run方法的具体用法?C++ MatrixWorkspace_sptr::run怎么用?C++ MatrixWorkspace_sptr::run使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mantid::api::MatrixWorkspace_sptr
的用法示例。
在下文中一共展示了MatrixWorkspace_sptr::run方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setGoniometer
/*
* Set the goniometer values for the workspace
*
* @param workspace :: the workspace to set the goniometer values in
*/
void CreateMD::setGoniometer(Mantid::API::MatrixWorkspace_sptr workspace) {
Algorithm_sptr log_alg = createChildAlgorithm("SetGoniometer");
if (!workspace->run().getProperty("gl")) {
std::ostringstream temp_ss;
temp_ss << "Value of gl in log is: "
<< workspace->run().getPropertyAsSingleValue("gl");
throw std::invalid_argument(temp_ss.str());
}
log_alg->setProperty("Workspace", workspace);
log_alg->setProperty("Axis0", "gl,0,0,1,1");
log_alg->setProperty("Axis1", "gs,1,0,0,1");
log_alg->setProperty("Axis2", "psi,0,1,0,1");
log_alg->executeAsChildAlg();
}
示例2:
/**
Check for a set of synthetic logs associated with multi-period log data. Raise
warnings where necessary.
*/
void
LoadISISNexus2::validateMultiPeriodLogs(Mantid::API::MatrixWorkspace_sptr ws) {
const Run &run = ws->run();
if (!run.hasProperty("current_period")) {
g_log.warning("Workspace has no current_period log.");
}
if (!run.hasProperty("nperiods")) {
g_log.warning("Workspace has no nperiods log");
}
if (!run.hasProperty("proton_charge_by_period")) {
g_log.warning("Workspace has not proton_charge_by_period log");
}
}