Mantid
Loading...
Searching...
No Matches
SNSAppendGeometryToNexus.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
11#include "MantidDataHandling/DllConfig.h"
12
13namespace Mantid {
14namespace DataHandling {
15
20class MANTID_DATAHANDLING_DLL SNSAppendGeometryToNexus final : public API::Algorithm, public API::DeprecatedAlias {
21public:
24
25 const std::string name() const override;
27 const std::string summary() const override {
28 return "Appends the resolved instrument geometry (detectors and monitors "
29 "for now) to a SNS ADARA NeXus file.";
30 }
31
32 int version() const override;
33 const std::string category() const override;
34 const std::string alias() const override { return "AppendGeometryToSNSNexus"; };
35
36private:
37 void init() override;
38 void exec() override;
39
41 std::string m_filename;
42
44 std::string m_instrument;
45
47 std::string m_idf_filename;
48
50 std::string getInstrumentName(const std::string &nxfilename);
51
53 bool runLoadInstrument(const std::string &idf_filename, const API::MatrixWorkspace_sptr &localWorkspace,
54 Algorithm *alg);
55
57 static bool runLoadNexusLogs(const std::string &nexusFileName, const API::MatrixWorkspace_sptr &localWorkspace,
58 Algorithm *alg);
59
62
65
68
71};
72
73} // namespace DataHandling
74} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
DeprecatedAlias : Class for making algorithm with deprecated names (aliases).
SNSAppendGeometryToNexus : Appends geometry information to a NeXus file.
std::string m_filename
The filename of the NeXus file to append geometry info to.
API::MatrixWorkspace_sptr ws
The workspace to load instrument and logs.
bool m_instrumentLoadedCorrectly
Was the instrument loaded?
const std::string summary() const override
Summary of algorithms purpose.
const std::string alias() const override
function to return any aliases to the algorithm; A default implementation is provided
bool m_makeNexusCopy
Are we going to make a copy of the NeXus file to operate on ?
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.