Skip to content
Snippets Groups Projects
Commit ab22cd70 authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Add new required method for finding filename property

parent 7e27c698
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,8 @@ public:
void
exec() override final; // makes sure the NexusHDF5Descriptor is initialized
virtual void execLoader() = 0; // what would normally be called exec
// the name of the property that the NexusHDF5Descriptor should be created against
virtual std::string getFilenamePropertyName() const = 0;
boost::shared_ptr<Algorithm> createChildAlgorithm(
const std::string &name, const double startProgress = -1.,
const double endProgress = -1., const bool enableLogging = true,
......
......@@ -5,15 +5,12 @@
// & Institut Laue - Langevin
// SPDX - License - Identifier: GPL - 3.0 +
#include "MantidAPI/NexusFileLoader.h"
//include "MantidDataHandling/Load.h"
namespace Mantid::DataHandling {
void NexusFileLoader::exec() {
// make sure the descriptor is initialized
if (!m_fileInfo) {
// TODO move this functionality elsewhere
const std::string filePropName = "Filename"; //Load::findFilenamePropertyName(this);
const std::string filename = this->getPropertyValue(filePropName);
const std::string filename = this->getPropertyValue(this->getFilenamePropertyName());
m_fileInfo =
std::make_shared<Mantid::Kernel::NexusHDF5Descriptor>(filename);
}
......
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