38#include <QActionGroup>
45#include <QRegularExpression>
46#include <QSignalMapper>
60std::string expandEnvironmentVariables(
const std::string &target) {
61 std::string result = target;
66 while ((pos = result.find(
'%', pos)) != std::string::npos) {
67 size_t end = result.find(
'%', pos + 1);
68 if (end == std::string::npos)
71 std::string varName = result.substr(pos + 1, end - pos - 1);
72 const char *envValue = std::getenv(varName.c_str());
75 result.replace(pos, end - pos + 1, envValue);
76 pos += std::strlen(envValue);
84 while ((pos = result.find(
'$', pos)) != std::string::npos) {
89 if (pos + 1 < result.length() && result[pos + 1] ==
'{') {
91 end = result.find(
'}', pos + 2);
92 if (end == std::string::npos) {
96 varName = result.substr(pos + 2, end - pos - 2);
101 while (end < result.length() && (std::isalnum(result[end]) || result[end] ==
'_')) {
104 varName = result.substr(pos + 1, end - pos - 1);
107 if (!varName.empty()) {
108 const char *envValue = std::getenv(varName.c_str());
110 result.replace(start, end - start, envValue);
111 pos = start + std::strlen(envValue);
128 : QWidget(parent), m_mantidDisplayModel(mdb), m_viewOnly(viewOnly), m_updateCount(0), m_treeUpdating(false),
131#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
133 m_mutex(QMutex::Recursive)
136 setObjectName(
"exploreMantid");
149 static bool registered_addtional_types =
false;
150 if (!registered_addtional_types) {
151 registered_addtional_types =
true;
152 qRegisterMetaType<TopLevelItems>();
161 m_tree->setDragEnabled(
true);
163 auto presenter = std::make_shared<WorkspacePresenter>(
this);
164 m_presenter = std::dynamic_pointer_cast<ViewNotifiable>(presenter);
181 m_tree->setHeaderLabel(
"Workspaces");
187 m_saveButton->setToolTip(
"Save the selected workspaces");
193 m_groupButton->setToolTip(
"Group together two or more selected workspaces");
195 m_sortButton->setToolTip(
"Sort all workspaces by name, size, or the last time they were modified");
213 auto *layout =
new QVBoxLayout();
214 layout->setContentsMargins(0, 0, 0, 0);
215 layout->addLayout(buttonLayout);
217 layout->addWidget(
m_tree);
218 this->setLayout(layout);
224 QAction *loadFileAction =
new QAction(
"File",
this);
225 QAction *liveDataAction =
new QAction(
"Live Data",
this);
226 connect(loadFileAction, SIGNAL(triggered()),
this, SLOT(
onClickLoad()));
227 connect(liveDataAction, SIGNAL(triggered()),
this, SLOT(
onClickLiveData()));
238 connect(
m_tree, SIGNAL(itemClicked(QTreeWidgetItem *,
int)),
this, SLOT(
clickedWorkspace(QTreeWidgetItem *,
int)));
242 m_tree->setContextMenuPolicy(Qt::CustomContextMenu);
243 connect(
m_tree, SIGNAL(customContextMenuRequested(
const QPoint &)),
this, SLOT(
popupMenu(
const QPoint &)));
245 Qt::QueuedConnection);
263 return std::dynamic_pointer_cast<WorkspacePresenter>(
m_presenter);
270 auto items =
m_tree->selectedItems();
272 names.reserve(
static_cast<size_t>(items.size()));
273 std::transform(items.cbegin(), items.cend(), std::back_inserter(names),
274 [](
auto const &item) { return item->text(0).toStdString(); });
280 auto items =
m_tree->selectedItems();
283 for (
auto &item : items) {
284 names.append(item->text(0));
293 auto items =
m_tree->selectedItems();
294 auto data = items[0]->data(0, Qt::UserRole).value<
Workspace_sptr>();
300 return QMessageBox::question(parentWidget(), QString::fromStdString(caption), QString::fromStdString(message),
301 QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes;
305 QMessageBox::critical(parentWidget(), QString::fromStdString(caption), QString::fromStdString(message));
309 QObject *sender = QObject::sender();
314 QString fn = MantidQt::API::AlgorithmInputHistory::Instance().previousInput(
"Load",
"Filename");
320 QMetaObject::invokeMethod(
dynamic_cast<QObject *
>(
m_mantidDisplayModel),
"showAlgorithmDialog", Qt::QueuedConnection,
321 Q_ARG(QString,
"Load"));
325 QMetaObject::invokeMethod(
dynamic_cast<QObject *
>(
m_mantidDisplayModel),
"showAlgorithmDialog", Qt::QueuedConnection,
326 Q_ARG(QString,
"StartLiveData"));
334 for (
const auto &ws : wsNames)
335 names.append(QString::fromStdString(ws));
348 QString qs_oldName = QString::fromStdString(oldName);
349 QString qs_newName = QString::fromStdString(newName);
351 QMutexLocker renameMapLock(&
m_mutex);
355 if (!oldNames.isEmpty()) {
356 for (
const auto &
name : oldNames)
371 return askUserYesNo(
"Delete Workspaces",
"Are you sure you want to delete the selected Workspaces?\n\nThis prompt "
372 "can be disabled from:\nFile->Settings->General");
377 for (
const auto &ws : wsNames)
378 names.append(QString::fromStdString(ws));
410 static int counter = 1;
449 const QAction *sendingAction =
dynamic_cast<QAction *
>(sender());
453 QString actionName = sendingAction->text();
455 if (actionName.compare(
"Nexus") == 0)
457 else if (actionName.compare(
"ASCII") == 0)
462 if (selectedNames.size() > 1) {
465 }
else if (selectedNames.size() == 1) {
475 if (!wsName.empty()) {
476 presets[
"InputWorkspace"] = QString::fromStdString(wsName);
479 std::string algorithmName;
483 algorithmName =
"SaveNexus";
486 algorithmName =
"SaveAscii";
495 if (items.size() < 2)
502 if (res != QFileDialog::Accepted)
507 std::string algorithmName;
508 std::string fileExtension;
512 algorithmName =
"SaveAscii";
513 fileExtension =
".dat";
517 algorithmName =
"SaveNexus";
518 fileExtension =
".nxs";
522 IAlgorithm_sptr saveAlg = AlgorithmManager::Instance().create(algorithmName);
523 saveAlg->initialize();
525 for (
auto &wsName : wsNames) {
526 std::string filename = folder +
"/" + wsName + fileExtension;
528 saveAlg->setProperty(
"InputWorkspace", wsName);
529 saveAlg->setProperty(
"Filename", filename);
531 }
catch (std::exception &ex) {
532 docklog.error() <<
"Error saving workspace " << wsName <<
": " << ex.what() <<
'\n';
540 const QString text = QString::fromStdString(filterText).trimmed();
541 QRegularExpression filterRegEx(text, QRegularExpression::CaseInsensitiveOption);
544 QTreeWidgetItemIterator unhideIter(
m_tree);
545 while (*unhideIter) {
546 (*unhideIter)->setHidden(
false);
551 if (!text.isEmpty()) {
555 QStringList expanded;
556 int n =
m_tree->topLevelItemCount();
557 for (
int i = 0; i <
n; ++i) {
558 auto item =
m_tree->topLevelItem(i);
559 if (item->isExpanded()) {
560 expanded << item->text(0);
564 item->setExpanded(
true);
569 QTreeWidgetItemIterator it(
m_tree, QTreeWidgetItemIterator::All);
571 QTreeWidgetItem *item = (*it);
572 QVariant userData = item->data(0, Qt::UserRole);
574 if (!userData.isNull()) {
578 if (item->text(0).contains(filterRegEx)) {
584 visibleGroups.append(item);
585 item->setHidden(
false);
588 if (item->parent() ==
nullptr) {
590 item->setHidden(
false);
594 item->setHidden(
false);
595 if (item->parent()->isHidden()) {
598 item->parent()->setHidden(
false);
599 expanded << item->parent()->text(0);
604 item->setHidden(
true);
613 for (
auto group : visibleGroups) {
614 for (
int i = 0; i <
group->childCount(); i++) {
615 QTreeWidgetItem *child =
group->child(i);
616 if (child->isHidden()) {
619 child->setHidden(
false);
625 for (
int i = 0; i <
n; ++i) {
626 auto item =
m_tree->topLevelItem(i);
627 item->setExpanded(expanded.contains(item->text(0)));
632 if (hiddenCount > 0) {
633 QString headerString = QString(
"Workspaces (%1 filtered)").arg(QString::number(hiddenCount));
634 m_tree->headerItem()->setText(0, headerString);
636 m_tree->headerItem()->setText(0,
"Workspaces");
647 item->setIcon(0, QIcon(WORKSPACE_ICONS.
getIcon(wsID)));
648 }
catch (std::runtime_error &) {
649 docklog.warning() <<
"Cannot find icon for workspace ID '" << wsID <<
"'\n";
657 m_showData =
new QAction(tr(
"Show Data"),
this);
660 m_showInst =
new QAction(tr(
"Show Instrument"),
this);
663 m_plotSpec =
new QAction(tr(
"Plot Spectrum..."),
this);
666 m_plotSpecErr =
new QAction(tr(
"Plot Spectrum with Errors..."),
this);
672 m_colorFill =
new QAction(tr(
"Color Fill Plot"),
this);
678 m_showBoxData =
new QAction(tr(
"Show Box Data Table"),
this);
693 icon.addFile(QString::fromUtf8(
":/SliceViewer/icons/SliceViewerWindow_icon.png"), QSize(), QIcon::Normal,
699 m_showLogs =
new QAction(tr(
"Sample Logs..."),
this);
705 m_showHist =
new QAction(tr(
"Show History"),
this);
711 m_rename =
new QAction(tr(
"Rename"),
this);
714 m_delete =
new QAction(tr(
"Delete"),
this);
728 m_clearUB =
new QAction(tr(
"Clear UB Matrix"),
this);
737 QMenu *sortMenu =
new QMenu(
this);
739 QAction *ascendingSortAction =
new QAction(
"Ascending",
this);
740 QAction *descendingSortAction =
new QAction(
"Descending",
this);
741 QAction *byNameChoice =
new QAction(
"Name",
this);
742 QAction *byLastModifiedChoice =
new QAction(
"Last Modified",
this);
743 QAction *byMemorySize =
new QAction(
"Size",
this);
745 ascendingSortAction->setCheckable(
true);
746 ascendingSortAction->setEnabled(
true);
748 descendingSortAction->setCheckable(
true);
749 descendingSortAction->setEnabled(
true);
751 QActionGroup *sortDirectionGroup =
new QActionGroup(sortMenu);
752 sortDirectionGroup->addAction(ascendingSortAction);
753 sortDirectionGroup->addAction(descendingSortAction);
754 sortDirectionGroup->setExclusive(
true);
755 ascendingSortAction->setChecked(
true);
757 byNameChoice->setCheckable(
true);
758 byNameChoice->setEnabled(
true);
760 byLastModifiedChoice->setCheckable(
true);
761 byLastModifiedChoice->setEnabled(
true);
763 byMemorySize->setCheckable(
true);
764 byMemorySize->setEnabled(
true);
766 QActionGroup *sortChoiceGroup =
new QActionGroup(sortMenu);
767 sortChoiceGroup->addAction(byNameChoice);
768 sortChoiceGroup->addAction(byLastModifiedChoice);
769 sortChoiceGroup->addAction(byMemorySize);
770 sortChoiceGroup->setExclusive(
true);
771 byNameChoice->setChecked(
true);
773 connect(ascendingSortAction, SIGNAL(triggered()),
this, SLOT(
sortAscending()));
774 connect(descendingSortAction, SIGNAL(triggered()),
this, SLOT(
sortDescending()));
775 connect(byNameChoice, SIGNAL(triggered()),
this, SLOT(
chooseByName()));
779 sortMenu->addActions(sortDirectionGroup->actions());
780 sortMenu->addSeparator();
781 sortMenu->addActions(sortChoiceGroup->actions());
790 QVariant userData = item->data(0, Qt::UserRole);
791 if (userData.isNull())
795 while (item->childCount() > 0) {
796 auto *widgetItem = item->takeChild(0);
802 if (
auto group = std::dynamic_pointer_cast<WorkspaceGroup>(
workspace)) {
803 auto members =
group->getAllItems();
804 auto visibleNames = AnalysisDataService::Instance().getObjectNames();
805 for (
const auto &ws : members) {
806 if (std::find(visibleNames.begin(), visibleNames.end(), ws->getName()) != visibleNames.end()) {
807 auto *node =
addTreeEntry(std::make_pair(ws->getName(), ws), item);
810 node->setSelected(
true);
817 }
catch (std::runtime_error &e) {
818 details = QString(
"Error: %1").arg(e.what());
820 QStringList rows = details.split(QLatin1Char(
'\n'), Qt::SkipEmptyParts);
821 rows.append(QString(
"Memory used: ") +
workspace->getMemorySizeAsStr().c_str());
823 auto iend = rows.constEnd();
824 for (
auto itr = rows.constBegin(); itr != iend; ++itr) {
826 data->setFlags(Qt::NoItemFlags);
828 item->addChild(data);
854 foreach (QTreeWidgetItem *item, selected) {
860 auto iend = topLevelItems.end();
861 for (
auto it = topLevelItems.begin(); it != iend; ++it) {
863 QString
name = node->text(0);
864 if (expanded.contains(
name))
865 node->setExpanded(
true);
868 node->setSelected(
true);
886 QTreeWidgetItem *parent) {
888 node->setData(0, Qt::UserRole, QVariant::fromValue(item.second));
892 const std::string wsID = item.second->id();
894 idNode->setFlags(Qt::NoItemFlags);
895 node->addChild(idNode);
899 parent->addChild(node);
901 m_tree->addTopLevelItem(node);
913 if (!renamed.isEmpty()) {
914 return std::any_of(renamed.cbegin(), renamed.cend(),
915 [&](
const auto &oldName) { return m_selectedNames.contains(oldName); });
924 auto items =
m_tree->selectedItems();
927 if (items.size() == 1) {
929 auto wsSptr = items.first()->data(0, Qt::UserRole).value<
Workspace_sptr>();
930 auto grpSptr = std::dynamic_pointer_cast<WorkspaceGroup>(wsSptr);
938 }
else if (items.size() >= 2) {
941 m_groupButton->setToolTip(
"Group together two or more selected workspaces");
942 }
else if (items.size() == 0) {
945 m_groupButton->setToolTip(
"Group together two or more selected workspaces");
955 if (items.size() > 0) {
956 auto item = *(items.begin());
975 m_showInst->setEnabled(matrixWS->getInstrument() && !matrixWS->getInstrument()->getName().empty() &&
976 matrixWS->getAxis(1)->isSpectra());
977 menu->addSeparator();
983 bool multipleBins =
false;
985 multipleBins = (matrixWS->blocksize() > 1);
987 const size_t numHist = matrixWS->getNumberHistograms();
988 for (
size_t i = 0; i < numHist; ++i) {
989 if (matrixWS->y(i).size() > 1) {
1003 m_colorFill->setEnabled((matrixWS->axes() > 1 && matrixWS->getNumberHistograms() > 1));
1005 menu->addSeparator();
1048 menu->addSeparator();
1067 menu->addSeparator();
1089 QMenu *clearMenu =
new QMenu(tr(
"Clear Options"),
this);
1094 menu->addMenu(clearMenu);
1099 Workspace_sptr ws = AnalysisDataService::Instance().retrieve(wsName);
1102 hasUB = wsIMD->hasOrientedLattice();
1116 if (menuEntryName.isEmpty())
1117 menuEntryName = algorithmString;
1120 QAction *saveAction =
new QAction(menuEntryName,
this);
1121 saveAction->setData(QVariant(algorithmString));
1149 return askUserYesNo(
"Clear Workspaces",
"This will delete all the workspaces, are you sure?");
1167 if (selectedNames.empty())
1183 if (qButtonName ==
"Group") {
1185 }
else if (qButtonName ==
"Ungroup") {
1208 QStringList expanded;
1209 int n =
m_tree->topLevelItemCount();
1210 for (
int i = 0; i <
n; ++i) {
1211 auto item =
m_tree->topLevelItem(i);
1212 if (item->isExpanded()) {
1213 expanded << item->text(0);
1250 m_tree->selectionModel()->clear();
1252 QMenu *menu(
nullptr);
1259 menu =
new QMenu(
this);
1260 menu->setObjectName(
"WorkspaceContextMenu");
1265 if (
auto matrixWS = std::dynamic_pointer_cast<const Mantid::API::MatrixWorkspace>(ws)) {
1267 }
else if (
auto mdeventWS = std::dynamic_pointer_cast<const IMDEventWorkspace>(ws)) {
1269 }
else if (
auto mdWS = std::dynamic_pointer_cast<const IMDWorkspace>(ws)) {
1271 }
else if (
auto peaksWS = std::dynamic_pointer_cast<const IPeaksWorkspace>(ws)) {
1273 }
else if (
auto groupWS = std::dynamic_pointer_cast<const WorkspaceGroup>(ws)) {
1275 }
else if (std::dynamic_pointer_cast<const Mantid::API::ITableWorkspace>(ws)) {
1284 std::vector<std::string> programNames =
1285 (Mantid::Kernel::ConfigService::Instance().getKeys(
"workspace.sendto.name"));
1286 bool firstPass(
true);
1288 for (
const auto &programName : programNames) {
1289 std::string visible =
1290 Mantid::Kernel::ConfigService::Instance().getString(
"workspace.sendto." + programName +
".visible");
1291 std::string target =
1292 Mantid::Kernel::ConfigService::Instance().getString(
"workspace.sendto." + programName +
".target");
1293 if (Mantid::Kernel::ConfigService::Instance().isExecutable(target) && visible ==
"Yes") {
1294 bool compatible(
true);
1295 std::string saveUsing(
1296 Mantid::Kernel::ConfigService::Instance().getString(
"workspace.sendto." + programName +
".saveusing"));
1299 alg->setPropertyValue(
"InputWorkspace",
selectedWsName.toStdString());
1300 }
catch (std::exception &) {
1311 QString
name = QString::fromStdString(programName);
1335 menu->addSeparator();
1340 menu->popup(QCursor::pos());
1363 std::map<std::string, std::string> programKeysAndDetails;
1364 programKeysAndDetails[
"name"] =
m_programName.toStdString();
1368 std::vector<std::string> programKeys = (Mantid::Kernel::ConfigService::Instance().getKeys(
1369 (
"workspace.sendto." + programKeysAndDetails.find(
"name")->second)));
1371 for (
const auto &programKey : programKeys) {
1373 programKeysAndDetails[programKey] = (Mantid::Kernel::ConfigService::Instance().getString(
1374 (
"workspace.sendto." + programKeysAndDetails.find(
"name")->second +
"." + programKey)));
1378 if ((programKeysAndDetails.count(
"name") != 0) && (programKeysAndDetails.count(
"target") != 0) &&
1379 (programKeysAndDetails.count(
"saveusing") != 0)) {
1380 std::string expTarget = expandEnvironmentVariables(programKeysAndDetails.find(
"target")->second);
1382 QFileInfo target(QString::fromStdString(expTarget));
1383 if (target.exists()) {
1386 QString saveUsing = QString::fromStdString(programKeysAndDetails.find(
"saveusing")->second);
1392 Property *prop = alg->getProperty(
"Filename");
1400 alg->setPropertyValue(
"fileName",
"auto_save_" +
selectedWsName.toStdString() + ext);
1403 alg->setPropertyValue(
"InputWorkspace",
selectedWsName.toStdString());
1406 if (programKeysAndDetails.count(
"saveparameters") != 0) {
1407 QString saveParametersGrouped = QString::fromStdString(programKeysAndDetails.find(
"saveparameters")->second);
1408 QStringList saveParameters = saveParametersGrouped.split(
',');
1411 for (
int i = 0; i < saveParameters.size(); i++) {
1412 QStringList sPNameAndDetail = saveParameters[i].split(
'=');
1413 std::string saveParameterName = sPNameAndDetail[0].trimmed().toStdString();
1414 std::string saveParameterDetail = sPNameAndDetail[1].trimmed().toStdString();
1415 if (saveParameterDetail ==
"True")
1416 alg->setProperty(saveParameterName,
true);
1417 else if (saveParameterDetail ==
"False")
1418 alg->setProperty(saveParameterName,
false);
1421 alg->setPropertyValue(saveParameterName, saveParameterDetail);
1430 QString savedFile = QString::fromStdString(alg->getProperty(
"Filename"));
1431 QStringList arguments;
1434 if (programKeysAndDetails.count(
"arguments") != 0) {
1435 QString temp = QString::fromStdString(programKeysAndDetails.find(
"arguments")->second);
1436 temp.replace(QString(
"[file]"), savedFile);
1438 arguments = temp.split(
",");
1440 arguments.insert(0, savedFile);
1443 std::vector<std::string> argumentsV;
1445 for (
int i = 0; i < arguments.size(); i++) {
1446 argumentsV.assign(1, (arguments[i].toStdString()));
1451 Mantid::Kernel::ConfigService::Instance().launchProcess(expTarget, argumentsV);
1452 }
catch (std::runtime_error &) {
1453 QMessageBox::information(
this,
"Error",
1454 "User tried to open program from: " + QString::fromStdString(expTarget) +
1455 " There was an error opening the program. "
1456 "Please check the target and arguments list "
1457 "to ensure that these are correct");
1459 }
catch (std::exception &) {
1460 QMessageBox::information(
this,
"Mantid - Send to Program",
1461 "A file property wasn't found. Please check that the correct" +
1462 QString(
"save algorithm was used.\n(View -> Preferences -> "
1463 "Mantid -> SendTo -> Edit -> SaveUsing)"));
1466 QMessageBox::information(
this,
"Target Path Error",
1467 "User tried to open program from: " + QString::fromStdString(expTarget) +
1468 " The target file path for the program "
1469 "can't be found. Please check that the full "
1488 const bool isAdvanced = type ==
"Advanced";
1492 if (userInput.plots.empty()) {
1495 bool showErrorBars = ((type ==
"Errors") || (type ==
"Advanced" && userInput.errors));
1498 if (userInput.tiled) {
1500 }
else if (userInput.simple || userInput.waterfall) {
1501 if (userInput.isAdvanced) {
1502 const auto advancedUserInput = userInput.advanced.value();
1504 userInput.waterfall, advancedUserInput.logName, advancedUserInput.customLogValues);
1507 userInput.waterfall);
1510 }
else if (userInput.surface) {
1511 const auto advancedUserInput = userInput.advanced.value();
1513 advancedUserInput.axisName, advancedUserInput.logName,
1514 advancedUserInput.customLogValues, advancedUserInput.workspaceNames);
1515 }
else if (userInput.contour) {
1516 const auto advancedUserInput = userInput.advanced.value();
1518 advancedUserInput.axisName, advancedUserInput.logName,
1519 advancedUserInput.customLogValues, advancedUserInput.workspaceNames);
1534 auto items =
m_tree->selectedItems();
1540 QStringList allWsNames;
1542 for (
auto &item : items) {
1545 if (
auto wsGroup = std::dynamic_pointer_cast<WorkspaceGroup>(ws)) {
1546 for (
const auto &
name : wsGroup->getNames())
1547 allWsNames.append(QString::fromStdString(
name));
1549 allWsNames.append(item->text(0));
1553 allWsNames.removeDuplicates();
1560 case Qt::Key_Delete:
1561 case Qt::Key_Backspace:
1576 QMessageBox::information(
this,
"Error", QString(
"Cannot create detectors tables for workspace ") + ws);
IPeaksWorkspace_sptr workspace
This class should be the basis for all customised algorithm dialogs.
Defines a mapping between a workspace ID and a pixmap to use for an icon.
QPixmap getIcon(const std::string &workspaceID) const
Returns an icon for the given ID.
A specialized class for dealing with file properties.
const std::string & getDefaultExt() const
Returns the main file extension that's used.
The Logger class is in charge of the publishing messages from the framework through various channels.
Base class for properties.
EXPORT_OPT_MANTIDQT_COMMON QPixmap getQPixmap(const std::string &name)
Function that returns a QPixmap given a string name.
std::shared_ptr< const IMDEventWorkspace > IMDEventWorkspace_const_sptr
Shared pointer to Mantid::API::IMDEventWorkspace (const version)
std::shared_ptr< IAlgorithm > IAlgorithm_sptr
shared pointer to Mantid::API::IAlgorithm
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
std::shared_ptr< const IMDWorkspace > IMDWorkspace_const_sptr
Shared pointer to the IMDWorkspace base class (const version)
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< IMDWorkspace > IMDWorkspace_sptr
Shared pointer to the IMDWorkspace base class.
std::shared_ptr< const IPeaksWorkspace > IPeaksWorkspace_const_sptr
shared pointer to Mantid::API::IPeaksWorkspace (const version)