Mantid
Loading...
Searching...
No Matches
CreateSimulationWorkspace.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2012 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"
13
14namespace Mantid {
15namespace HistogramData {
16class BinEdges;
17}
18namespace DataHandling {
19
20class MANTID_DATAHANDLING_DLL CreateSimulationWorkspace final : public API::Algorithm {
21public:
22 const std::string name() const override;
24 const std::string summary() const override { return "Create a blank workspace for a given instrument."; }
25
26 int version() const override;
27 const std::string category() const override;
28
29private:
30 void init() override;
31 void exec() override;
32
34 void createInstrument();
36 void createOutputWorkspace();
38 size_t createDetectorMapping();
40 void createOneToOneMapping();
42 void loadMappingFromFile(const std::string &filename);
44 void loadMappingFromRAW(const std::string &filename);
46 void loadMappingFromISISNXS(const std::string &filename);
48 void createGroupingsFromTables(const int *specTable, const int *udetTable, int ndets);
50 HistogramData::BinEdges createBinBoundaries() const;
52 void applyDetectorMapping();
54 void adjustInstrument(const std::string &filename);
56 void setStartDate(const API::MatrixWorkspace_sptr &workspace);
57
59 std::shared_ptr<API::Progress> m_progress;
65 std::map<specnum_t, std::set<detid_t>> m_detGroups;
66};
67
68} // namespace DataHandling
69} // namespace Mantid
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
API::MatrixWorkspace_sptr m_outputWS
Pointer to the new workspace.
std::shared_ptr< API::Progress > m_progress
Pointer to a progress object.
std::map< specnum_t, std::set< detid_t > > m_detGroups
List of detector groupings.
const std::string summary() const override
Summary of algorithms purpose.
Geometry::Instrument_const_sptr m_instrument
Pointer to the new instrument.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< const Instrument > Instrument_const_sptr
Shared pointer to an const instrument object.
Helper class which provides the Collimation Length for SANS instruments.