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#include "MantidKernel/System.h"
13
14namespace Mantid {
15namespace DataHandling {
16
21class MANTID_DATAHANDLING_DLL SaveDetectorsGrouping final : public API::Algorithm {
22public:
24 const std::string name() const override { return "SaveDetectorsGrouping"; };
26 const std::string summary() const override { return "Save a GroupingWorkspace to an XML file."; }
27
29 int version() const override { return 1; };
30 const std::vector<std::string> seeAlso() const override { return {"LoadDetectorsGroupingFile", "GroupDetectors"}; }
32 const std::string category() const override { return "DataHandling\\Grouping;Transforms\\Grouping"; }
33
34private:
36 void init() override;
37
39 void exec() override;
40
42 void createGroupDetectorIDMap(std::map<int, std::vector<detid_t>> &groupwkspmap);
43
45 void convertToDetectorsRanges(std::map<int, std::vector<detid_t>> groupdetidsmap,
46 std::map<int, std::vector<detid_t>> &groupdetidrangemap);
47
49 void printToXML(const std::map<int, std::vector<detid_t>> &groupdetidrangemap, const std::string &xmlfilename);
50
51 // GroupingWorkspace
53};
54
55} // namespace DataHandling
56} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
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.