Mantid
Loading...
Searching...
No Matches
GroupWorkspaces.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
12#include "MantidAlgorithms/DllConfig.h"
14
15namespace Mantid {
16namespace Algorithms {
17
26class MANTID_ALGORITHMS_DLL GroupWorkspaces final : public API::Algorithm {
27public:
29 const std::string name() const override { return "GroupWorkspaces"; }
31 const std::string summary() const override {
32 return "Takes workspaces as input and groups similar workspaces together.";
33 }
34
36 int version() const override { return 1; }
37 const std::vector<std::string> seeAlso() const override { return {"UnGroupWorkspace"}; }
39 const std::string category() const override { return "Transforms\\Grouping;Utility\\Workspaces"; }
40
41 std::map<std::string, std::string> validateInputs() override;
42
43protected:
44 Parallel::ExecutionMode
45 getParallelExecutionMode(const std::map<std::string, Parallel::StorageMode> &storageModes) const override;
46
47private:
49 void init() override;
51 void exec() override;
53 void addToGroup(const std::vector<std::string> &names);
56 void addToGroup(const API::Workspace_sptr &workspace);
58 void addToGroup(const std::string &globExpression);
61};
62
63} // namespace Algorithms
64} // namespace Mantid
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Takes workspaces as input and groups the workspaces.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
const std::string summary() const override
Summary of algorithms purpose.
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
API::WorkspaceGroup_sptr m_group
A pointer to the new group.
int version() const override
Algorithm's version for identification overriding a virtual method.
std::shared_ptr< WorkspaceGroup > WorkspaceGroup_sptr
shared pointer to Mantid::API::WorkspaceGroup
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
Definition: Workspace_fwd.h:20
Helper class which provides the Collimation Length for SANS instruments.