Skip to content
Snippets Groups Projects
Commit 942cf6a9 authored by Hahn, Steven's avatar Hahn, Steven
Browse files

Implment NexusFileLoader class


Signed-off-by: default avatarSteven Hahn <hahnse@ornl.gov>
parent 74ef539d
No related branches found
No related tags found
No related merge requests found
......@@ -16,12 +16,14 @@ class DLLExport NexusFileLoader
: public API::IFileLoader<Mantid::Kernel::NexusHDF5Descriptor> {
public:
void exec() override;
virtual void execLoader();
boost::shared_ptr<Algorithm> createChildAlgorithm(
const std::string &name, const double startProgress = -1.,
const double endProgress = -1., const bool enableLogging = true,
const int &version = -1) override;
void
virtual void
setFileInfo(std::shared_ptr<Mantid::Kernel::NexusHDF5Descriptor> fileInfo);
private:
std::shared_ptr<Mantid::Kernel::NexusHDF5Descriptor> m_fileInfo;
};
......
......@@ -7,14 +7,22 @@
#include "MantidDataHandling/NexusFileLoader.h"
namespace Mantid::DataHandling {
void NexusFileLoader::exec() {}
boost::shared_ptr<Mantid::API::Algorithm>
NexusFileLoader::createChildAlgorithm(const std::string &name,
const double startProgress,
const double endProgress,
const bool enableLogging,
const int &version) {
return nullptr;
void NexusFileLoader::exec() { execLoader(); }
void NexusFileLoader::execLoader() {}
boost::shared_ptr<Mantid::API::Algorithm> NexusFileLoader::createChildAlgorithm(
const std::string &name, const double startProgress,
const double endProgress, const bool enableLogging, const int &version) {
auto child = API::IFileLoader<
Mantid::Kernel::NexusHDF5Descriptor>::createChildAlgorithm(name,
startProgress,
endProgress,
enableLogging,
version);
auto nfl = boost::dynamic_pointer_cast<NexusFileLoader>(child);
if (nfl) {
nfl->setFileInfo(m_fileInfo);
}
return child;
}
void NexusFileLoader::setFileInfo(
std::shared_ptr<Mantid::Kernel::NexusHDF5Descriptor> fileInfo) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment