当前位置: 首页>>代码示例>>C++>>正文


C++ IAlgorithm_sptr::getPropertyValue方法代码示例

本文整理汇总了C++中mantid::api::IAlgorithm_sptr::getPropertyValue方法的典型用法代码示例。如果您正苦于以下问题:C++ IAlgorithm_sptr::getPropertyValue方法的具体用法?C++ IAlgorithm_sptr::getPropertyValue怎么用?C++ IAlgorithm_sptr::getPropertyValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mantid::api::IAlgorithm_sptr的用法示例。


在下文中一共展示了IAlgorithm_sptr::getPropertyValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: makeFileBackedMDEW

 /** Make a (optionally) file backed MDEventWorkspace with nEvents fake data points
  * the points are randomly distributed within the box (nEvents>0) or homoheneously and regularly spread through the box (nEvents<0)
  *
  * @param wsName :: name of the workspace in ADS
  * @param fileBacked :: true for file-backed
  * @param numEvents :: number of events in the target workspace distributed randomly if numEvents>0 or regularly & homogeneously if numEvents<0
  * @return MDEW sptr
  */
 MDEventWorkspace3Lean::sptr makeFileBackedMDEW(std::string wsName, bool fileBacked,long numEvents)
 {
   // ---------- Make a file-backed MDEventWorkspace -----------------------
   std::string snEvents = boost::lexical_cast<std::string>(numEvents);
   MDEventWorkspace3Lean::sptr ws1 = MDEventsTestHelper::makeMDEW<3>(10, 0.0, 10.0, 0);
   ws1->getBoxController()->setSplitThreshold(100);
   Mantid::API::AnalysisDataService::Instance().addOrReplace(wsName,
       boost::dynamic_pointer_cast< Mantid::API::IMDEventWorkspace>(ws1));
   FrameworkManager::Instance().exec("FakeMDEventData", 6,
       "InputWorkspace", wsName.c_str(),
       "UniformParams", snEvents.c_str(), "RandomizeSignal", "1");
   if (fileBacked)
   {
     std::string filename = wsName + ".nxs";
     Mantid::API::IAlgorithm_sptr saver = FrameworkManager::Instance().exec("SaveMD", 4,
         "InputWorkspace", wsName.c_str(),
         "Filename", filename.c_str());
     FrameworkManager::Instance().exec("LoadMD", 8,
         "OutputWorkspace", wsName.c_str(),
         "Filename", saver->getPropertyValue("Filename").c_str(),
         "FileBackEnd", "1", "Memory", "0");
   }
   return boost::dynamic_pointer_cast<MDEventWorkspace3Lean>(  Mantid::API::AnalysisDataService::Instance().retrieve(wsName) );
 }
开发者ID:AlistairMills,项目名称:mantid,代码行数:32,代码来源:MDEventsTestHelper.cpp


注:本文中的mantid::api::IAlgorithm_sptr::getPropertyValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。