Mantid
Loading...
Searching...
No Matches
LoadNexus.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 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
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
12#include "MantidAPI/Algorithm.h"
15#include "MantidDataHandling/DllConfig.h"
17#include <climits>
18
19namespace Mantid {
20namespace DataHandling {
43class MANTID_DATAHANDLING_DLL LoadNexus final : public API::Algorithm {
44public:
46 LoadNexus();
48 const std::string name() const override { return "LoadNexus"; };
50 const std::string summary() const override {
51 return "The LoadNexus algorithm will try to identify the type of Nexus "
52 "file given to it and invoke the appropriate algorithm to read the "
53 "data and populate the named workspace.";
54 }
55
57 int version() const override { return 1; };
58 const std::vector<std::string> seeAlso() const override {
59 return {"LoadMcStasNexus", "LoadNexusMonitors", "LoadNexusProcessed", "LoadTOFRawNexus",
60 "LoadILLDiffraction", "LoadILLTOF", "LoadILLIndirect", "LoadILLReflectometry",
61 "LoadILLSANS", "LoadMuonNexus", "LoadFlexiNexus"};
62 }
64 const std::string category() const override { return "DataHandling\\Nexus"; }
65
66 static const std::string muonTD;
67 static const std::string pulsedTD;
68
69private:
71 void init() override;
72
74 void exec() override;
75
77 std::string m_filename;
78
80 std::string m_workspace;
81
83 void runLoadMuonNexus();
84
86 void runLoadIsisNexus();
87
89 void runLoadNexusProcessed();
90
92 void runLoadTOFRawNexus();
93
95 void setOutputWorkspace(const API::IAlgorithm_sptr &loader);
96};
97} // namespace DataHandling
98} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Loads a file in NeXus format and stores it in a 2D workspace (Workspace2D class).
Definition: LoadNexus.h:43
std::string m_filename
The name and path of the input file.
Definition: LoadNexus.h:77
int version() const override
Algorithm's version for identification overriding a virtual method.
Definition: LoadNexus.h:57
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
Definition: LoadNexus.h:64
std::string m_workspace
The name of the output workspace.
Definition: LoadNexus.h:80
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
Definition: LoadNexus.h:58
const std::string summary() const override
Summary of algorithms purpose.
Definition: LoadNexus.h:50
static const std::string muonTD
Definition: LoadNexus.h:66
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
Definition: LoadNexus.h:48
static const std::string pulsedTD
Definition: LoadNexus.h:67
std::shared_ptr< IAlgorithm > IAlgorithm_sptr
shared pointer to Mantid::API::IAlgorithm
Helper class which provides the Collimation Length for SANS instruments.