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"
16#include <climits>
17
18namespace Mantid {
19namespace DataHandling {
42class MANTID_DATAHANDLING_DLL LoadNexus final : public API::Algorithm {
43public:
45 LoadNexus();
47 const std::string name() const override { return "LoadNexus"; };
49 const std::string summary() const override {
50 return "The LoadNexus algorithm will try to identify the type of Nexus "
51 "file given to it and invoke the appropriate algorithm to read the "
52 "data and populate the named workspace.";
53 }
54
56 int version() const override { return 1; };
57 const std::vector<std::string> seeAlso() const override {
58 return {"LoadMcStas", "LoadNexusMonitors", "LoadNexusProcessed", "LoadTOFRawNexus",
59 "LoadILLDiffraction", "LoadILLTOF", "LoadILLIndirect", "LoadILLReflectometry",
60 "LoadILLSANS", "LoadMuonNexus", "LoadFlexiNexus"};
61 }
63 const std::string category() const override { return "DataHandling\\Nexus"; }
64
65 static const std::string muonTD;
66 static const std::string pulsedTD;
67
68 static int getNexusEntryTypes(const std::string &fileName, std::vector<std::string> &entryName,
69 std::vector<std::string> &definition);
70
71private:
73 void init() override;
74
76 void exec() override;
77
79 std::string m_filename;
80
82 std::string m_workspace;
83
85 void runLoadMuonNexus();
86
88 void runLoadIsisNexus();
89
91 void runLoadNexusProcessed();
92
94 void runLoadTOFRawNexus();
95
97 void setOutputWorkspace(const API::IAlgorithm_sptr &loader);
98};
99} // namespace DataHandling
100} // 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:42
std::string m_filename
The name and path of the input file.
Definition LoadNexus.h:79
int version() const override
Algorithm's version for identification overriding a virtual method.
Definition LoadNexus.h:56
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
Definition LoadNexus.h:63
std::string m_workspace
The name of the output workspace.
Definition LoadNexus.h:82
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:57
const std::string summary() const override
Summary of algorithms purpose.
Definition LoadNexus.h:49
static const std::string muonTD
Definition LoadNexus.h:65
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
Definition LoadNexus.h:47
static const std::string pulsedTD
Definition LoadNexus.h:66
std::shared_ptr< IAlgorithm > IAlgorithm_sptr
shared pointer to Mantid::API::IAlgorithm
Helper class which provides the Collimation Length for SANS instruments.