Mantid
Loading...
Searching...
No Matches
SaveDetectorsGrouping.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2011 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
10#include "MantidDataHandling/DllConfig.h"
12
13namespace Mantid {
14namespace DataHandling {
15
20class MANTID_DATAHANDLING_DLL SaveDetectorsGrouping final : public API::Algorithm {
21public:
23 const std::string name() const override { return "SaveDetectorsGrouping"; };
25 const std::string summary() const override { return "Save a GroupingWorkspace to an XML file."; }
26
28 int version() const override { return 1; };
29 const std::vector<std::string> seeAlso() const override { return {"LoadDetectorsGroupingFile", "GroupDetectors"}; }
31 const std::string category() const override { return "DataHandling\\Grouping;Transforms\\Grouping"; }
32
33private:
35 void init() override;
36
38 void exec() override;
39
41 void createGroupDetectorIDMap(std::map<int, std::vector<detid_t>> &groupwkspmap);
42
44 void convertToDetectorsRanges(std::map<int, std::vector<detid_t>> groupdetidsmap,
45 std::map<int, std::vector<detid_t>> &groupdetidrangemap);
46
48 void printToXML(const std::map<int, std::vector<detid_t>> &groupdetidrangemap, const std::string &xmlfilename);
49
50 // GroupingWorkspace
52};
53
54} // namespace DataHandling
55} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
SaveDetectorsGrouping : TODO: DESCRIPTION.
const std::string category() const override
Algorithm's category for identification.
const std::string summary() const override
Summary of algorithms purpose.
DataObjects::GroupingWorkspace_const_sptr mGroupWS
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
const std::string name() const override
Algorithm's name for identification.
int version() const override
Algorithm's version for identification.
std::shared_ptr< const GroupingWorkspace > GroupingWorkspace_const_sptr
shared pointer to a const GroupingWorkspace
Helper class which provides the Collimation Length for SANS instruments.