Commit 9b30271e authored by David Fairbrother's avatar David Fairbrother
Browse files

Rename FileFinderUtils -> FileFinderHelpers

Renames the class and associated files, as utils is more generic when
these are really a collection of helpers for users. As under the hood
it's using FileFinder but not supplimenting the functionality
parent 5a1b0c25
...@@ -39,7 +39,7 @@ set(SRC_FILES ...@@ -39,7 +39,7 @@ set(SRC_FILES
src/Expression.cpp src/Expression.cpp
src/FileBackedExperimentInfo.cpp src/FileBackedExperimentInfo.cpp
src/FileFinder.cpp src/FileFinder.cpp
src/FileFinderUtils.cpp src/FileFinderHelpers.cpp
src/FileLoaderRegistry.cpp src/FileLoaderRegistry.cpp
src/FileProperty.cpp src/FileProperty.cpp
src/FrameworkManager.cpp src/FrameworkManager.cpp
...@@ -211,7 +211,7 @@ set(INC_FILES ...@@ -211,7 +211,7 @@ set(INC_FILES
inc/MantidAPI/Expression.h inc/MantidAPI/Expression.h
inc/MantidAPI/FileBackedExperimentInfo.h inc/MantidAPI/FileBackedExperimentInfo.h
inc/MantidAPI/FileFinder.h inc/MantidAPI/FileFinder.h
inc/MantidAPI/FileFinderUtils.h inc/MantidAPI/FileFinderHelpers.h
inc/MantidAPI/FileLoaderRegistry.h inc/MantidAPI/FileLoaderRegistry.h
inc/MantidAPI/FileProperty.h inc/MantidAPI/FileProperty.h
inc/MantidAPI/FrameworkManager.h inc/MantidAPI/FrameworkManager.h
...@@ -407,7 +407,7 @@ set(TEST_FILES ...@@ -407,7 +407,7 @@ set(TEST_FILES
ExpressionTest.h ExpressionTest.h
FileBackedExperimentInfoTest.h FileBackedExperimentInfoTest.h
FileFinderTest.h FileFinderTest.h
FileFinderUtilsTest.h FileFinderHelpersTest.h
FilePropertyTest.h FilePropertyTest.h
FrameworkManagerTest.h FrameworkManagerTest.h
FuncMinimizerFactoryTest.h FuncMinimizerFactoryTest.h
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
namespace Mantid::API { namespace Mantid::API {
class MANTID_API_DLL FileFinderUtils { class MANTID_API_DLL FileFinderHelpers {
public: public:
/// Search instrument directories for Parameter file, /// Search instrument directories for Parameter file,
/// return full path name if found, else "". /// return full path name if found, else "".
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 + // SPDX - License - Identifier: GPL - 3.0 +
#include "MantidAPI/ExperimentInfo.h" #include "MantidAPI/ExperimentInfo.h"
#include "MantidAPI/FileFinderUtils.h" #include "MantidAPI/FileFinderHelpers.h"
#include "MantidAPI/InstrumentDataService.h" #include "MantidAPI/InstrumentDataService.h"
#include "MantidAPI/ResizeRectangularDetectorHelper.h" #include "MantidAPI/ResizeRectangularDetectorHelper.h"
#include "MantidAPI/Run.h" #include "MantidAPI/Run.h"
...@@ -1099,7 +1099,7 @@ void ExperimentInfo::setInstumentFromXML(const std::string &nxFilename, ...@@ -1099,7 +1099,7 @@ void ExperimentInfo::setInstumentFromXML(const std::string &nxFilename,
} else { } else {
// XML was not included or was empty // XML was not included or was empty
// Use the instrument name to find the file // Use the instrument name to find the file
instrumentFilename = FileFinderUtils::getInstrumentFilename( instrumentFilename = FileFinderHelpers::getInstrumentFilename(
instrumentName, getWorkspaceStartDate()); instrumentName, getWorkspaceStartDate());
// And now load the contents // And now load the contents
instrumentXml = loadInstrumentXML(instrumentFilename); instrumentXml = loadInstrumentXML(instrumentFilename);
......
#include "MantidAPI/FileFinderUtils.h" #include "MantidAPI/FileFinderHelpers.h"
#include "MantidKernel/ConfigService.h" #include "MantidKernel/ConfigService.h"
#include "MantidKernel/DateAndTime.h" #include "MantidKernel/DateAndTime.h"
...@@ -23,7 +23,7 @@ using namespace Poco::XML; ...@@ -23,7 +23,7 @@ using namespace Poco::XML;
namespace { namespace {
/// static logger object /// static logger object
Mantid::Kernel::Logger g_log("FileFinderUtils"); Mantid::Kernel::Logger g_log("FileFinderHelpers");
// used to terminate SAX process // used to terminate SAX process
class DummyException { class DummyException {
...@@ -87,8 +87,8 @@ namespace Mantid::API { ...@@ -87,8 +87,8 @@ namespace Mantid::API {
*is found *is found
*/ */
std::string std::string
FileFinderUtils::getInstrumentFilename(const std::string &instrumentName, FileFinderHelpers::getInstrumentFilename(const std::string &instrumentName,
const std::string &date) { const std::string &date) {
const std::vector<std::string> validFormats = {"xml", "nxs", "hdf5"}; const std::vector<std::string> validFormats = {"xml", "nxs", "hdf5"};
g_log.debug() << "Looking for instrument file for " << instrumentName g_log.debug() << "Looking for instrument file for " << instrumentName
<< " that is valid on '" << date << "'\n"; << " that is valid on '" << date << "'\n";
...@@ -116,8 +116,8 @@ FileFinderUtils::getInstrumentFilename(const std::string &instrumentName, ...@@ -116,8 +116,8 @@ FileFinderUtils::getInstrumentFilename(const std::string &instrumentName,
/// Search the directory for the Parameter IDF file and return full path name if /// Search the directory for the Parameter IDF file and return full path name if
/// found, else return "". /// found, else return "".
// directoryName must include a final '/'. // directoryName must include a final '/'.
std::string FileFinderUtils::getFullPathParamIDF(std::string instName, std::string FileFinderHelpers::getFullPathParamIDF(std::string instName,
const std::string &dirHint) { const std::string &dirHint) {
constexpr auto lookupFile = [](const std::string &dir, constexpr auto lookupFile = [](const std::string &dir,
const std::string &filename) { const std::string &filename) {
...@@ -208,7 +208,7 @@ std::string FileFinderUtils::getFullPathParamIDF(std::string instName, ...@@ -208,7 +208,7 @@ std::string FileFinderUtils::getFullPathParamIDF(std::string instName,
* this date * this date
* @return list of absolute paths for each valid file * @return list of absolute paths for each valid file
*/ */
std::vector<std::string> FileFinderUtils::getResourceFilenames( std::vector<std::string> FileFinderHelpers::getResourceFilenames(
const std::string &prefix, const std::vector<std::string> &fileFormats, const std::string &prefix, const std::vector<std::string> &fileFormats,
const std::vector<std::string> &directoryNames, const std::string &date) { const std::vector<std::string> &directoryNames, const std::string &date) {
...@@ -218,8 +218,8 @@ std::vector<std::string> FileFinderUtils::getResourceFilenames( ...@@ -218,8 +218,8 @@ std::vector<std::string> FileFinderUtils::getResourceFilenames(
const std::string now = const std::string now =
Types::Core::DateAndTime::getCurrentTime().toISO8601String(); Types::Core::DateAndTime::getCurrentTime().toISO8601String();
// Recursively call this method, but with all parameters. // Recursively call this method, but with all parameters.
return FileFinderUtils::getResourceFilenames(prefix, fileFormats, return FileFinderHelpers::getResourceFilenames(prefix, fileFormats,
directoryNames, now); directoryNames, now);
} }
// Join all the file formats into a single string // Join all the file formats into a single string
...@@ -314,9 +314,9 @@ std::vector<std::string> FileFinderUtils::getResourceFilenames( ...@@ -314,9 +314,9 @@ std::vector<std::string> FileFinderUtils::getResourceFilenames(
* @param[out] outValidFrom :: Used to return valid-from date * @param[out] outValidFrom :: Used to return valid-from date
* @param[out] outValidTo :: Used to return valid-to date * @param[out] outValidTo :: Used to return valid-to date
*/ */
void FileFinderUtils::getValidFromTo(const std::string &IDFfilename, void FileFinderHelpers::getValidFromTo(const std::string &IDFfilename,
std::string &outValidFrom, std::string &outValidFrom,
std::string &outValidTo) { std::string &outValidTo) {
SAXParser pParser; SAXParser pParser;
// Create on stack to ensure deletion. Relies on pParser also being local // Create on stack to ensure deletion. Relies on pParser also being local
// variable. // variable.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// SPDX - License - Identifier: GPL - 3.0 + // SPDX - License - Identifier: GPL - 3.0 +
#pragma once #pragma once
#include "MantidAPI/FileFinderUtils.h" #include "MantidAPI/FileFinderHelpers.h"
#include "MantidKernel/ConfigService.h" #include "MantidKernel/ConfigService.h"
#include "MantidKernel/DateAndTime.h" #include "MantidKernel/DateAndTime.h"
...@@ -25,7 +25,7 @@ using namespace Mantid::Kernel; ...@@ -25,7 +25,7 @@ using namespace Mantid::Kernel;
using namespace Mantid::API; using namespace Mantid::API;
using Mantid::Types::Core::DateAndTime; using Mantid::Types::Core::DateAndTime;
class FileFinderUtilsTest : public CxxTest::TestSuite { class FileFinderHelpersTest : public CxxTest::TestSuite {
public: public:
struct fromToEntry { struct fromToEntry {
std::string path; std::string path;
...@@ -54,7 +54,7 @@ public: ...@@ -54,7 +54,7 @@ public:
if (boost::regex_match(l_filenamePart, regex)) { if (boost::regex_match(l_filenamePart, regex)) {
std::string validFrom, validTo; std::string validFrom, validTo;
FileFinderUtils::getValidFromTo(dir_itr->path(), validFrom, validTo); FileFinderHelpers::getValidFromTo(dir_itr->path(), validFrom, validTo);
size_t found; size_t found;
found = l_filenamePart.find("_Definition"); found = l_filenamePart.find("_Definition");
...@@ -102,16 +102,16 @@ public: ...@@ -102,16 +102,16 @@ public:
// Check that instrument dirs are searched correctly // Check that instrument dirs are searched correctly
const std::string expectedFileName = "GEM_parameters.xml"; const std::string expectedFileName = "GEM_parameters.xml";
const auto result = FileFinderUtils::getFullPathParamIDF("GEM"); const auto result = FileFinderHelpers::getFullPathParamIDF("GEM");
TS_ASSERT(boost::icontains(result, expectedFileName)); TS_ASSERT(boost::icontains(result, expectedFileName));
// Should be case insensitive // Should be case insensitive
const auto mixedResult = FileFinderUtils::getFullPathParamIDF("GeM"); const auto mixedResult = FileFinderHelpers::getFullPathParamIDF("GeM");
TS_ASSERT_EQUALS(result, mixedResult); TS_ASSERT_EQUALS(result, mixedResult);
} }
void testFindIPFNonExistant() { void testFindIPFNonExistant() {
const auto result = FileFinderUtils::getFullPathParamIDF("NotThere"); const auto result = FileFinderHelpers::getFullPathParamIDF("NotThere");
TS_ASSERT_EQUALS("", result); TS_ASSERT_EQUALS("", result);
} }
...@@ -124,7 +124,7 @@ public: ...@@ -124,7 +124,7 @@ public:
Poco::File fileHandle(expectedPath); Poco::File fileHandle(expectedPath);
fileHandle.createFile(); fileHandle.createFile();
const auto result = FileFinderUtils::getFullPathParamIDF("test", tmpDir); const auto result = FileFinderHelpers::getFullPathParamIDF("test", tmpDir);
// Ensure file was found and it's in the tmp dir // Ensure file was found and it's in the tmp dir
TS_ASSERT(result.find(filename) != std::string::npos); TS_ASSERT(result.find(filename) != std::string::npos);
TS_ASSERT(result.find(tmpDir) != std::string::npos); TS_ASSERT(result.find(tmpDir) != std::string::npos);
...@@ -133,14 +133,14 @@ public: ...@@ -133,14 +133,14 @@ public:
void testNonExistantIPFWithHint() { void testNonExistantIPFWithHint() {
const auto tmpDir = Poco::Path::temp(); const auto tmpDir = Poco::Path::temp();
const auto result = const auto result =
FileFinderUtils::getFullPathParamIDF("notThere", tmpDir); FileFinderHelpers::getFullPathParamIDF("notThere", tmpDir);
TS_ASSERT(result.empty()); TS_ASSERT(result.empty());
} }
// //
void testHelperFunctions() { void testHelperFunctions() {
ConfigService::Instance().updateFacilities(); ConfigService::Instance().updateFacilities();
FileFinderUtils helper; FileFinderHelpers helper;
std::string boevs = std::string boevs =
helper.getInstrumentFilename("BIOSANS", "2100-01-31 22:59:59"); helper.getInstrumentFilename("BIOSANS", "2100-01-31 22:59:59");
TS_ASSERT(!boevs.empty()); TS_ASSERT(!boevs.empty());
...@@ -148,7 +148,7 @@ public: ...@@ -148,7 +148,7 @@ public:
// //
void testHelper_TOPAZ_No_To_Date() { void testHelper_TOPAZ_No_To_Date() {
FileFinderUtils helper; FileFinderHelpers helper;
std::string boevs = std::string boevs =
helper.getInstrumentFilename("TOPAZ", "2011-01-31 22:59:59"); helper.getInstrumentFilename("TOPAZ", "2011-01-31 22:59:59");
TS_ASSERT(!boevs.empty()); TS_ASSERT(!boevs.empty());
...@@ -160,7 +160,7 @@ public: ...@@ -160,7 +160,7 @@ public:
const std::string testDir = instDir + "unit_testing"; const std::string testDir = instDir + "unit_testing";
ConfigService::Instance().setString("instrumentDefinition.directory", ConfigService::Instance().setString("instrumentDefinition.directory",
testDir); testDir);
FileFinderUtils helper; FileFinderHelpers helper;
std::string boevs = std::string boevs =
helper.getInstrumentFilename("ARGUS", "1909-01-31 22:59:59"); helper.getInstrumentFilename("ARGUS", "1909-01-31 22:59:59");
TS_ASSERT_DIFFERS(boevs.find("TEST1_ValidDateOverlap"), std::string::npos); TS_ASSERT_DIFFERS(boevs.find("TEST1_ValidDateOverlap"), std::string::npos);
...@@ -194,7 +194,7 @@ public: ...@@ -194,7 +194,7 @@ public:
void test_nexus_geometry_getInstrumentFilename() { void test_nexus_geometry_getInstrumentFilename() {
const std::string instrumentName = "LOKI"; const std::string instrumentName = "LOKI";
FileFinderUtils info; FileFinderHelpers info;
const auto path = info.getInstrumentFilename(instrumentName, ""); const auto path = info.getInstrumentFilename(instrumentName, "");
TS_ASSERT(!path.empty()); TS_ASSERT(!path.empty());
TS_ASSERT( TS_ASSERT(
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "MantidAlgorithms/VesuvioL1ThetaResolution.h" #include "MantidAlgorithms/VesuvioL1ThetaResolution.h"
#include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/FileFinderUtils.h" #include "MantidAPI/FileFinderHelpers.h"
#include "MantidAPI/FileProperty.h" #include "MantidAPI/FileProperty.h"
#include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/MatrixWorkspace.h"
#include "MantidAPI/SpectrumInfo.h" #include "MantidAPI/SpectrumInfo.h"
...@@ -269,7 +269,7 @@ void VesuvioL1ThetaResolution::loadInstrument() { ...@@ -269,7 +269,7 @@ void VesuvioL1ThetaResolution::loadInstrument() {
MatrixWorkspace_sptr tempWS = MatrixWorkspace_sptr tempWS =
WorkspaceFactory::Instance().create("Workspace2D", 1, 1, 1); WorkspaceFactory::Instance().create("Workspace2D", 1, 1, 1);
const std::string vesuvioIPF = const std::string vesuvioIPF =
FileFinderUtils::getInstrumentFilename("VESUVIO"); FileFinderHelpers::getInstrumentFilename("VESUVIO");
// Load an empty VESUVIO instrument workspace // Load an empty VESUVIO instrument workspace
IAlgorithm_sptr loadInst = IAlgorithm_sptr loadInst =
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 + // SPDX - License - Identifier: GPL - 3.0 +
#include "MantidDataHandling/AppendGeometryToSNSNexus.h" #include "MantidDataHandling/AppendGeometryToSNSNexus.h"
#include "MantidAPI/FileFinderUtils.h" #include "MantidAPI/FileFinderHelpers.h"
#include "MantidAPI/FileProperty.h" #include "MantidAPI/FileProperty.h"
#include "MantidAPI/WorkspaceFactory.h" #include "MantidAPI/WorkspaceFactory.h"
#include "MantidDataObjects/Workspace2D.h" #include "MantidDataObjects/Workspace2D.h"
...@@ -145,7 +145,7 @@ void AppendGeometryToSNSNexus::exec() { ...@@ -145,7 +145,7 @@ void AppendGeometryToSNSNexus::exec() {
// Now what is the instrument definition filename ? // Now what is the instrument definition filename ?
// TODO: Modify to use /entry/instrument/instrument_xml/data after // TODO: Modify to use /entry/instrument/instrument_xml/data after
// establishing a way to maintain ADARA Geometry Packet // establishing a way to maintain ADARA Geometry Packet
m_idf_filename = FileFinderUtils::getInstrumentFilename(m_instrument); m_idf_filename = FileFinderHelpers::getInstrumentFilename(m_instrument);
g_log.debug() << "Loading instrument definition from " << m_idf_filename g_log.debug() << "Loading instrument definition from " << m_idf_filename
<< ".\n"; << ".\n";
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// SPDX - License - Identifier: GPL - 3.0 + // SPDX - License - Identifier: GPL - 3.0 +
#include <sstream> #include <sstream>
#include "MantidAPI/FileFinderUtils.h" #include "MantidAPI/FileFinderHelpers.h"
#include "MantidAPI/FileProperty.h" #include "MantidAPI/FileProperty.h"
#include "MantidAPI/Run.h" #include "MantidAPI/Run.h"
#include "MantidAPI/SpectraAxis.h" #include "MantidAPI/SpectraAxis.h"
...@@ -105,7 +105,7 @@ void LoadDetectorsGroupingFile::exec() { ...@@ -105,7 +105,7 @@ void LoadDetectorsGroupingFile::exec() {
// empty - // empty -
// the most recent will be used. // the most recent will be used.
const std::string instrumentFilename = const std::string instrumentFilename =
FileFinderUtils::getInstrumentFilename(instrumentName, date); FileFinderHelpers::getInstrumentFilename(instrumentName, date);
// Load an instrument // Load an instrument
Algorithm_sptr childAlg = this->createChildAlgorithm("LoadInstrument"); Algorithm_sptr childAlg = this->createChildAlgorithm("LoadInstrument");
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 + // SPDX - License - Identifier: GPL - 3.0 +
#include "MantidDataHandling/LoadInstrument.h" #include "MantidDataHandling/LoadInstrument.h"
#include "MantidAPI/FileFinderUtils.h" #include "MantidAPI/FileFinderHelpers.h"
#include "MantidAPI/FileProperty.h" #include "MantidAPI/FileProperty.h"
#include "MantidAPI/InstrumentDataService.h" #include "MantidAPI/InstrumentDataService.h"
#include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/MatrixWorkspace.h"
...@@ -139,7 +139,7 @@ void LoadInstrument::exec() { ...@@ -139,7 +139,7 @@ void LoadInstrument::exec() {
"must be specified to load an instrument", "must be specified to load an instrument",
filename); filename);
} else { } else {
filename = FileFinderUtils::getInstrumentFilename( filename = FileFinderHelpers::getInstrumentFilename(
instname, ws->getWorkspaceStartDate()); instname, ws->getWorkspaceStartDate());
setPropertyValue("Filename", filename); setPropertyValue("Filename", filename);
} }
...@@ -265,7 +265,7 @@ void LoadInstrument::runLoadParameterFile( ...@@ -265,7 +265,7 @@ void LoadInstrument::runLoadParameterFile(
std::string directoryName = std::string directoryName =
filename.substr(0, dir_end + 1); // include final '/'. filename.substr(0, dir_end + 1); // include final '/'.
std::string fullPathParamIDF = std::string fullPathParamIDF =
FileFinderUtils::getFullPathParamIDF(filename, directoryName); FileFinderHelpers::getFullPathParamIDF(filename, directoryName);
if (!fullPathParamIDF.empty()) { if (!fullPathParamIDF.empty()) {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// SPDX - License - Identifier: GPL - 3.0 + // SPDX - License - Identifier: GPL - 3.0 +
#include "MantidDataHandling/LoadNXSPE.h" #include "MantidDataHandling/LoadNXSPE.h"
#include "MantidAPI/ExperimentInfo.h" #include "MantidAPI/ExperimentInfo.h"
#include "MantidAPI/FileFinderUtils.h" #include "MantidAPI/FileFinderHelpers.h"
#include "MantidAPI/FileProperty.h" #include "MantidAPI/FileProperty.h"
#include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/MatrixWorkspace.h"
#include "MantidAPI/RegisterFileLoader.h" #include "MantidAPI/RegisterFileLoader.h"
...@@ -331,7 +331,7 @@ void LoadNXSPE::exec() { ...@@ -331,7 +331,7 @@ void LoadNXSPE::exec() {
// NB. LoadParameterFile must be used on a workspace with an instrument // NB. LoadParameterFile must be used on a workspace with an instrument
if (!instrument_name.empty() && instrument_name != "NXSPE") { if (!instrument_name.empty() && instrument_name != "NXSPE") {
std::string IDF_filename = std::string IDF_filename =
FileFinderUtils::getInstrumentFilename(instrument_name); FileFinderHelpers::getInstrumentFilename(instrument_name);
std::string instrument_parfile = std::string instrument_parfile =
IDF_filename.substr(0, IDF_filename.find("_Definition")) + IDF_filename.substr(0, IDF_filename.find("_Definition")) +
"_Parameters.xml"; "_Parameters.xml";
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "MantidAPI/Axis.h" #include "MantidAPI/Axis.h"
#include "MantidAPI/CommonBinsValidator.h" #include "MantidAPI/CommonBinsValidator.h"
#include "MantidAPI/ExperimentInfo.h" #include "MantidAPI/ExperimentInfo.h"
#include "MantidAPI/FileFinderUtils.h" #include "MantidAPI/FileFinderHelpers.h"
#include "MantidAPI/FileProperty.h" #include "MantidAPI/FileProperty.h"
#include "MantidAPI/Progress.h" #include "MantidAPI/Progress.h"
#include "MantidAPI/Run.h" #include "MantidAPI/Run.h"
...@@ -212,7 +212,7 @@ getInstrumentName(const Mantid::API::MatrixWorkspace_sptr &workspace) { ...@@ -212,7 +212,7 @@ getInstrumentName(const Mantid::API::MatrixWorkspace_sptr &workspace) {
std::string getIDF(const Mantid::API::MatrixWorkspace_sptr &workspace) { std::string getIDF(const Mantid::API::MatrixWorkspace_sptr &workspace) {
auto date = workspace->getWorkspaceStartDate(); auto date = workspace->getWorkspaceStartDate();
auto instrumentName = getInstrumentName(workspace); auto instrumentName = getInstrumentName(workspace);
return FileFinderUtils::getInstrumentFilename(instrumentName, date); return FileFinderHelpers::getInstrumentFilename(instrumentName, date);
} }
void addDetectors(H5::Group &group, void addDetectors(H5::Group &group,
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/AnalysisDataService.h" #include "MantidAPI/AnalysisDataService.h"
#include "MantidAPI/FileFinderUtils.h" #include "MantidAPI/FileFinderHelpers.h"
#include "MantidAPI/SpectrumInfo.h" #include "MantidAPI/SpectrumInfo.h"
#include "MantidDataHandling/LoadMask.h" #include "MantidDataHandling/LoadMask.h"
#include "MantidDataObjects/MaskWorkspace.h" #include "MantidDataObjects/MaskWorkspace.h"
...@@ -364,7 +364,7 @@ public: ...@@ -364,7 +364,7 @@ public:
TS_ASSERT(source); TS_ASSERT(source);
std::string IDF_name = std::string IDF_name =
API::FileFinderUtils::getInstrumentFilename("MARI", ""); API::FileFinderHelpers::getInstrumentFilename("MARI", "");
/*Fake export mask algorithm: */ /*Fake export mask algorithm: */
std::string mask_contents("4 10-12 100 110 120 130 140 200 300"); std::string mask_contents("4 10-12 100 110 120 130 140 200 300");
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "NXcanSASTestHelper.h" #include "NXcanSASTestHelper.h"
#include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/Axis.h" #include "MantidAPI/Axis.h"
#include "MantidAPI/FileFinderUtils.h" #include "MantidAPI/FileFinderHelpers.h"
#include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/MatrixWorkspace.h"
#include "MantidAPI/NumericAxis.h" #include "MantidAPI/NumericAxis.h"
#include "MantidDataHandling/NXcanSASDefinitions.h" #include "MantidDataHandling/NXcanSASDefinitions.h"
...@@ -35,7 +35,7 @@ getIDFfromWorkspace(const Mantid::API::MatrixWorkspace_sptr &workspace) { ...@@ -35,7 +35,7 @@ getIDFfromWorkspace(const Mantid::API::MatrixWorkspace_sptr &workspace) {
auto instrument = workspace->getInstrument(); auto instrument = workspace->getInstrument();
auto name = instrument->getFullName(); auto name = instrument->getFullName();
auto date = workspace->getWorkspaceStartDate(); auto date = workspace->getWorkspaceStartDate();
return Mantid::API::FileFinderUtils::getInstrumentFilename(name, date); return Mantid::API::FileFinderHelpers::getInstrumentFilename(name, date);
} }
void setXValuesOn1DWorkspaceWithPointData( void setXValuesOn1DWorkspaceWithPointData(
......
...@@ -19,7 +19,7 @@ set(EXPORT_FILES ...@@ -19,7 +19,7 @@ set(EXPORT_FILES
src/Exports/AlgorithmManager.cpp src/Exports/AlgorithmManager.cpp
src/Exports/AnalysisDataService.cpp src/Exports/AnalysisDataService.cpp
src/Exports/FileProperty.cpp src/Exports/FileProperty.cpp
src/Exports/FileFinderUtils.cpp src/Exports/FileFinderHelpers.cpp
src/Exports/MultipleFileProperty.cpp src/Exports/MultipleFileProperty.cpp
src/Exports/FrameworkManager.cpp src/Exports/FrameworkManager.cpp
src/Exports/ISpectrum.cpp src/Exports/ISpectrum.cpp
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 + // SPDX - License - Identifier: GPL - 3.0 +
#include "MantidAPI/ExperimentInfo.h" #include "MantidAPI/ExperimentInfo.h"
#include "MantidAPI/FileFinderUtils.h" #include "MantidAPI/FileFinderHelpers.h"
#include "MantidAPI/Run.h" #include "MantidAPI/Run.h"
#include "MantidAPI/Sample.h" #include "MantidAPI/Sample.h"
#include "MantidAPI/SpectrumInfo.h" #include "MantidAPI/SpectrumInfo.h"
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <boost/python/register_ptr_to_python.hpp> #include <boost/python/register_ptr_to_python.hpp>
using Mantid::API::ExperimentInfo; using Mantid::API::ExperimentInfo;
using Mantid::API::FileFinderUtils; using Mantid::API::FileFinderHelpers;
using Mantid::PythonInterface::Policies::RemoveConstSharedPtr; using Mantid::PythonInterface::Policies::RemoveConstSharedPtr;