本文整理汇总了C++中mantid::api::MatrixWorkspace_const_sptr::getName方法的典型用法代码示例。如果您正苦于以下问题:C++ MatrixWorkspace_const_sptr::getName方法的具体用法?C++ MatrixWorkspace_const_sptr::getName怎么用?C++ MatrixWorkspace_const_sptr::getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mantid::api::MatrixWorkspace_const_sptr
的用法示例。
在下文中一共展示了MatrixWorkspace_const_sptr::getName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: runPreprocessDetectorsToMDChildUpdatingMasks
DataObjects::TableWorkspace_sptr ConvertToMDParent::runPreprocessDetectorsToMDChildUpdatingMasks(Mantid::API::MatrixWorkspace_const_sptr InWS2D,
const std::string &OutWSName,const std::string &dEModeRequested,Kernel::DeltaEMode::Type &Emode)
{
// prospective result
DataObjects::TableWorkspace_sptr TargTableWS;
// if input workspace does not exist in analysis data service, we have to add it there to work with the Child Algorithm
std::string InWSName = InWS2D->getName();
if(!API::AnalysisDataService::Instance().doesExist(InWSName))
{
throw std::runtime_error("Can not retrieve input matrix workspace "+InWSName+" from the analysis data service");
}
Mantid::API::Algorithm_sptr childAlg = createChildAlgorithm("PreprocessDetectorsToMD",0.,1.);
if(!childAlg)throw(std::runtime_error("Can not create child ChildAlgorithm to preprocess detectors"));
childAlg->setProperty("InputWorkspace",InWSName);
childAlg->setProperty("OutputWorkspace",OutWSName);
childAlg->setProperty("GetMaskState",true);
childAlg->setProperty("UpdateMasksInfo",true);
childAlg->setProperty("OutputWorkspace",OutWSName);
// check and get energy conversion mode to define additional ChildAlgorithm parameters
Emode = Kernel::DeltaEMode().fromString(dEModeRequested);
if(Emode == Kernel::DeltaEMode::Indirect)
childAlg->setProperty("GetEFixed",true);
childAlg->execute();
if(!childAlg->isExecuted())throw(std::runtime_error("Can not properly execute child algorithm PreprocessDetectorsToMD"));
TargTableWS = childAlg->getProperty("OutputWorkspace");
if(!TargTableWS)throw(std::runtime_error("Can not retrieve results of child algorithm PreprocessDetectorsToMD"));
return TargTableWS;
}