From 473cad0dda4628c13932d9659dbe34bca79d09a6 Mon Sep 17 00:00:00 2001 From: Steven Hahn <hahnse@ornl.gov> Date: Sun, 22 Mar 2020 19:28:10 -0400 Subject: [PATCH] Add NexusFileLoader class Signed-off-by: Steven Hahn <hahnse@ornl.gov> --- Framework/DataHandling/CMakeLists.txt | 2 ++ .../inc/MantidDataHandling/NexusFileLoader.h | 27 +++++++++++++++++++ .../DataHandling/src/NexusFileLoader.cpp | 7 +++++ 3 files changed, 36 insertions(+) create mode 100644 Framework/DataHandling/inc/MantidDataHandling/NexusFileLoader.h create mode 100644 Framework/DataHandling/src/NexusFileLoader.cpp diff --git a/Framework/DataHandling/CMakeLists.txt b/Framework/DataHandling/CMakeLists.txt index 0de48b0bcab..27368db1511 100644 --- a/Framework/DataHandling/CMakeLists.txt +++ b/Framework/DataHandling/CMakeLists.txt @@ -132,6 +132,7 @@ set(SRC_FILES src/MeshFileIO.cpp src/ModifyDetectorDotDatFile.cpp src/MoveInstrumentComponent.cpp + src/NexusFileLoader.cpp src/NexusTester.cpp src/ORNLDataArchive.cpp src/PDLoadCharacterizations.cpp @@ -336,6 +337,7 @@ set(INC_FILES inc/MantidDataHandling/ModifyDetectorDotDatFile.h inc/MantidDataHandling/MoveInstrumentComponent.h inc/MantidDataHandling/NXcanSASDefinitions.h + inc/MantidDataHandling/NexusFileLoader.h inc/MantidDataHandling/NexusTester.h inc/MantidDataHandling/ORNLDataArchive.h inc/MantidDataHandling/PDLoadCharacterizations.h diff --git a/Framework/DataHandling/inc/MantidDataHandling/NexusFileLoader.h b/Framework/DataHandling/inc/MantidDataHandling/NexusFileLoader.h new file mode 100644 index 00000000000..61b83884ef3 --- /dev/null +++ b/Framework/DataHandling/inc/MantidDataHandling/NexusFileLoader.h @@ -0,0 +1,27 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "MantidAPI/IFileLoader.h" +#include "MantidKernel/NexusDescriptor.h" +#include "MantidKernel/System.h" + +namespace Mantid { +namespace API { + +class DLLExport NexusFileLoader : public IFileLoader<NexusDescriptor> { +public: + void exec() override; + void createChildAlgorithm(const std::string &name, + const double startProgress = -1., + const double endProgress = -1., + const bool enableLogging = true, + const int &version = -1) override; + setFileInfo() override; +}; +} // namespace API +} // namespace Mantid diff --git a/Framework/DataHandling/src/NexusFileLoader.cpp b/Framework/DataHandling/src/NexusFileLoader.cpp new file mode 100644 index 00000000000..28f3f336d7c --- /dev/null +++ b/Framework/DataHandling/src/NexusFileLoader.cpp @@ -0,0 +1,7 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#include "MantidDataHandling/NexusFileLoader.h" -- GitLab