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
69 static int getNexusEntryTypes(const std::string &fileName, std::vector<std::string> &entryName,
70 std::vector<std::string> &definition);
71
72private:
74 void init() override;
75
77 void exec() override;
78
80 std::string m_filename;
81
83 std::string m_workspace;
84
86 void runLoadMuonNexus();
87
89 void runLoadIsisNexus();
90
92 void runLoadNexusProcessed();
93
95 void runLoadTOFRawNexus();
96
98 void setOutputWorkspace(const API::IAlgorithm_sptr &loader);
99};
100} // namespace DataHandling
101} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
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:80
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:83
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.