Commit b6fd30d6 authored by Nick Draper's avatar Nick Draper
Browse files

Remove dangerous lifetime FrameworkManager::CreateAlgorithm Methods

Replaced in tests and code with AlgorithmManager::create

Not expecting to pass all tests yet, just checkpointing
parent 1df12955
......@@ -58,19 +58,6 @@ public:
/// Clear memory associated with the PropertyManagers
void clearPropertyManagers();
/// Creates and instance of an algorithm
IAlgorithm *createAlgorithm(const std::string &algName,
const int &version = -1);
/// Creates an instance of an algorithm and sets the properties provided
IAlgorithm *createAlgorithm(const std::string &algName,
const std::string &propertiesArray,
const int &version = -1);
/// Creates an instance of an algorithm, sets the properties provided & then
/// executes it.
IAlgorithm *exec(const std::string &algName,
const std::string &propertiesArray, const int &version = -1);
/// Creates an algorithm and runs it, with variadic arguments
boost::shared_ptr<IAlgorithm> exec(const std::string &algorithmName,
......
......@@ -259,76 +259,6 @@ void FrameworkManagerImpl::clearPropertyManagers() {
PropertyManagerDataService::Instance().clear();
}
/** Creates and initialises an instance of an algorithm
*
* @param algName :: The name of the algorithm required
* @param version :: The version of the algorithm
* @return A pointer to the created algorithm.
* WARNING! DO NOT DELETE THIS POINTER, because it is owned
* by a shared pointer in the AlgorithmManager.
*
* @throw NotFoundError Thrown if algorithm requested is not registered
*/
IAlgorithm *FrameworkManagerImpl::createAlgorithm(const std::string &algName,
const int &version) {
IAlgorithm *alg = AlgorithmManager::Instance().create(algName, version).get();
return alg;
}
/** Creates an instance of an algorithm and sets the properties provided
*
* @param algName :: The name of the algorithm required
* @param propertiesArray :: A single string containing properties in the
* form "Property1=Value1;Property2=Value2;..."
* @param version :: The version of the algorithm
* @return A pointer to the created algorithm
* WARNING! DO NOT DELETE THIS POINTER, because it is owned
* by a shared pointer in the AlgorithmManager.
*
* @throw NotFoundError Thrown if algorithm requested is not registered
* @throw std::invalid_argument Thrown if properties string is ill-formed
*/
IAlgorithm *
FrameworkManagerImpl::createAlgorithm(const std::string &algName,
const std::string &propertiesArray,
const int &version) {
// Use the previous method to create the algorithm
IAlgorithm *alg = AlgorithmManager::Instance()
.create(algName, version)
.get(); // createAlgorithm(algName);
alg->setPropertiesWithString(propertiesArray);
return alg;
}
/** Creates an instance of an algorithm, sets the properties provided and
* then executes it.
*
* @param algName :: The name of the algorithm required
* @param propertiesArray :: A single string containing properties in the
* form "Property1=Value1;Property2=Value2;..."
* @param version :: The version of the algorithm
* @return A pointer to the executed algorithm
* WARNING! DO NOT DELETE THIS POINTER, because it is owned
* by a shared pointer in the AlgorithmManager.
*
* @throw NotFoundError Thrown if algorithm requested is not registered
* @throw std::invalid_argument Thrown if properties string is ill-formed
* @throw runtime_error Thrown if algorithm cannot be executed
*/
IAlgorithm *FrameworkManagerImpl::exec(const std::string &algName,
const std::string &propertiesArray,
const int &version) {
// Make use of the previous method for algorithm creation and property
// setting
IAlgorithm *alg = createAlgorithm(algName, propertiesArray, version);
// Now execute the algorithm
alg->execute();
return alg;
}
/** Run any algorithm with a variable number of parameters
*
* @param algorithmName
......@@ -500,8 +430,8 @@ void FrameworkManagerImpl::setupUsageReporting() {
/// Update instrument definitions from github
void FrameworkManagerImpl::updateInstrumentDefinitions() {
try {
IAlgorithm *algDownloadInstrument =
this->createAlgorithm("DownloadInstrument");
auto algDownloadInstrument =
Mantid::API::AlgorithmManager::Instance().create("DownloadInstrument");
algDownloadInstrument->setAlgStartupLogging(false);
algDownloadInstrument->executeAsync();
} catch (Kernel::Exception::NotFoundError &) {
......@@ -513,7 +443,8 @@ void FrameworkManagerImpl::updateInstrumentDefinitions() {
/// Check if a newer release of Mantid is available
void FrameworkManagerImpl::checkIfNewerVersionIsAvailable() {
try {
IAlgorithm *algCheckVersion = this->createAlgorithm("CheckMantidVersion");
auto algCheckVersion =
Mantid::API::AlgorithmManager::Instance().create("CheckMantidVersion");
algCheckVersion->setAlgStartupLogging(false);
algCheckVersion->executeAsync();
} catch (Kernel::Exception::NotFoundError &) {
......
......@@ -6,7 +6,7 @@
// SPDX - License - Identifier: GPL - 3.0 +
#include "MantidAlgorithms/RenameWorkspace.h"
#include "MantidAPI/AnalysisDataService.h"
#include "MantidAPI/FrameworkManager.h"
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/MatrixWorkspace.h"
#include "MantidAPI/WorkspaceGroup.h"
#include "MantidAPI/WorkspaceHistory.h"
......@@ -174,8 +174,9 @@ bool RenameWorkspace::processGroups() {
suffix << i + 1;
std::string wsName = outputwsName + "_" + suffix.str();
IAlgorithm *alg = API::FrameworkManager::Instance().createAlgorithm(
auto alg = API::AlgorithmManager::Instance().createUnmanaged(
this->name(), this->version());
alg->initialize();
alg->setPropertyValue("InputWorkspace", names[i]);
alg->setPropertyValue("OutputWorkspace", wsName);
alg->setChild(true);
......
......@@ -9,7 +9,7 @@
#include <cxxtest/TestSuite.h>
#include "MantidAPI/Axis.h"
#include "MantidAPI/FrameworkManager.h"
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAlgorithms/AnyShapeAbsorption.h"
#include "MantidAlgorithms/CylinderAbsorption.h"
#include "MantidAlgorithms/FlatPlateAbsorption.h"
......@@ -18,7 +18,7 @@
#include "MantidTestHelpers/WorkspaceCreationHelper.h"
using Mantid::API::AnalysisDataService;
using Mantid::API::FrameworkManager;
using Mantid::API::AlgorithmManager;
using Mantid::API::MatrixWorkspace_sptr;
class AnyShapeAbsorptionTest : public CxxTest::TestSuite {
......@@ -273,7 +273,7 @@ public:
// set the sample/can geometry
auto setSampleAlg =
FrameworkManager::Instance().createAlgorithm("SetSample");
AlgorithmManager::Instance().createUnmanaged("SetSample");
setSampleAlg->setRethrows(true);
setSampleAlg->initialize();
setSampleAlg->setPropertyValue("InputWorkspace", "bobby");
......
......@@ -8,7 +8,7 @@
#include "MantidAPI/AnalysisDataService.h"
#include "MantidAPI/Axis.h"
#include "MantidAPI/FrameworkManager.h"
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/SpectrumInfo.h"
#include "MantidAlgorithms/AppendSpectra.h"
#include "MantidDataHandling/LoadRaw3.h"
......@@ -418,7 +418,7 @@ private:
const std::string &inputWorkspace2,
const std::string &outputWorkspace) {
auto appendSpectra =
Mantid::API::FrameworkManager::Instance().createAlgorithm(
Mantid::API::AlgorithmManager::Instance().create(
"AppendSpectra");
TS_ASSERT_THROWS_NOTHING(appendSpectra->setRethrows(true));
TS_ASSERT_THROWS_NOTHING(
......@@ -449,7 +449,7 @@ private:
dataY.emplace_back(double(i));
}
auto createWS = Mantid::API::FrameworkManager::Instance().createAlgorithm(
auto createWS = Mantid::API::AlgorithmManager::Instance().create(
"CreateWorkspace");
TS_ASSERT_THROWS_NOTHING(createWS->setProperty("OutputWorkspace", "we"));
TS_ASSERT_THROWS_NOTHING(createWS->setProperty("DataX", dataX));
......@@ -465,7 +465,7 @@ private:
// we do a rebin so we can have nice bins
auto rebin =
Mantid::API::FrameworkManager::Instance().createAlgorithm("Rebin");
Mantid::API::AlgorithmManager::Instance().create("Rebin");
TS_ASSERT_THROWS_NOTHING(rebin->setProperty("InputWorkspace", "we"));
TS_ASSERT_THROWS_NOTHING(
rebin->setProperty("Params", std::vector<double>{1}));
......
......@@ -10,7 +10,7 @@
#include <vector>
#include "MantidAPI/Axis.h"
#include "MantidAPI/FrameworkManager.h"
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/WorkspaceGroup.h"
#include "MantidAlgorithms/CalculateCarpenterSampleCorrection.h"
#include "MantidDataObjects/WorkspaceCreation.h"
......@@ -85,7 +85,7 @@ public:
// convert to wavelength
auto convertUnitsAlg =
Mantid::API::FrameworkManager::Instance().createAlgorithm(
Mantid::API::AlgorithmManager::Instance().create(
"ConvertUnits");
convertUnitsAlg->setPropertyValue("InputWorkspace", "TestInputWS");
convertUnitsAlg->setPropertyValue("OutputWorkspace", "TestInputWS");
......@@ -142,7 +142,7 @@ public:
// Check applying absorption correction
auto divide =
Mantid::API::FrameworkManager::Instance().createAlgorithm("Divide");
Mantid::API::AlgorithmManager::Instance().create("Divide");
divide->initialize();
divide->setPropertyValue("LHSWorkspace", "TestInputWS");
divide->setPropertyValue("RHSWorkspace", absWksp->getName());
......@@ -170,7 +170,7 @@ public:
// Check applying multiple scattering correction
auto multiply =
Mantid::API::FrameworkManager::Instance().createAlgorithm("Multiply");
Mantid::API::AlgorithmManager::Instance().create("Multiply");
multiply->initialize();
multiply->setPropertyValue("LHSWorkspace", "TestInputWS");
multiply->setPropertyValue("RHSWorkspace", msWksp->getName());
......@@ -189,8 +189,7 @@ public:
TS_ASSERT_DELTA(ms_ws_actual[i], ms_ws_expected[i], 0.00001);
// Check full correction comparison
auto minus =
Mantid::API::FrameworkManager::Instance().createAlgorithm("Minus");
auto minus = Mantid::API::AlgorithmManager::Instance().create("Minus");
minus->initialize();
minus->setPropertyValue("LHSWorkspace", "TestAbsWS");
minus->setPropertyValue("RHSWorkspace", "TestMultScatWS");
......
......@@ -11,7 +11,7 @@
#include "MantidAPI/AnalysisDataService.h"
#include "MantidAPI/Axis.h"
#include "MantidAPI/FrameworkManager.h"
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAlgorithms/CarpenterSampleCorrection.h"
#include "MantidDataObjects/WorkspaceCreation.h"
#include "MantidHistogramData/LinearGenerator.h"
......@@ -78,7 +78,7 @@ public:
// convert to wavelength
auto convertUnitsAlg =
Mantid::API::FrameworkManager::Instance().createAlgorithm(
Mantid::API::AlgorithmManager::Instance().create(
"ConvertUnits");
convertUnitsAlg->setPropertyValue("InputWorkspace", "TestInputWS");
convertUnitsAlg->setPropertyValue("OutputWorkspace", "TestInputWS");
......
......@@ -11,7 +11,7 @@
#include "MantidAPI/AnalysisDataService.h"
#include "MantidAPI/Axis.h"
#include "MantidAPI/FrameworkManager.h"
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/MatrixWorkspace.h"
#include "MantidAlgorithms/ConvertToDistribution.h"
#include "MantidAlgorithms/ConvertUnits.h"
......@@ -838,10 +838,14 @@ public:
static void destroySuite(ConvertUnitsTestPerformance *suite) { delete suite; }
void setUp() override {
FrameworkManager::Instance().exec(
"Load", "Filename=HET15869;OutputWorkspace=hist_tof");
FrameworkManager::Instance().exec(
"Load", "Filename=CNCS_7860_event;OutputWorkspace=event_tof");
auto algo = AlgorithmManager::Instance().create("Load");
algo->setPropertyValue("Filename", "HET15869");
algo->setPropertyValue("OutputWorkspace", "hist_tof");
algo->execute();
algo = AlgorithmManager::Instance().create("Load");
algo->setPropertyValue("Filename", "CNCS_7860_event");
algo->setPropertyValue("OutputWorkspace", "event_tof");
algo->execute();
std::string WSname = "inputWS";
setup_Points_WS(WSname);
}
......@@ -866,26 +870,32 @@ public:
}
void test_histogram_workspace() {
IAlgorithm *alg;
alg = FrameworkManager::Instance().exec(
"ConvertUnits",
"InputWorkspace=hist_tof;OutputWorkspace=hist_wave;Target=Wavelength");
auto alg = AlgorithmManager::Instance().create("ConvertUnits");
alg->setPropertyValue("InputWorkspace", "hist_tof");
alg->setPropertyValue("OutputWorkspace", "hist_wave");
alg->setPropertyValue("Target", "Wavelength");
alg->execute();
TS_ASSERT(alg->isExecuted());
alg = FrameworkManager::Instance().exec(
"ConvertUnits", "InputWorkspace=hist_wave;OutputWorkspace=hist_"
"dSpacing;Target=dSpacing");
alg = AlgorithmManager::Instance().create("ConvertUnits");
alg->setPropertyValue("InputWorkspace", "hist_tof");
alg->setPropertyValue("OutputWorkspace", "hist_dSpacing");
alg->setPropertyValue("Target", "dSpacing");
alg->execute();
TS_ASSERT(alg->isExecuted());
}
void test_event_workspace() {
IAlgorithm *alg;
alg = FrameworkManager::Instance().exec(
"ConvertUnits", "InputWorkspace=event_tof;OutputWorkspace=event_wave;"
"Target=Wavelength");
auto alg = AlgorithmManager::Instance().create("ConvertUnits");
alg->setPropertyValue("InputWorkspace", "event_tof");
alg->setPropertyValue("OutputWorkspace", "event_wave");
alg->setPropertyValue("Target", "Wavelength");
alg->execute();
TS_ASSERT(alg->isExecuted());
alg = FrameworkManager::Instance().exec(
"ConvertUnits", "InputWorkspace=event_wave;OutputWorkspace=event_"
"dSpacing;Target=dSpacing");
alg = AlgorithmManager::Instance().create("ConvertUnits");
alg->setPropertyValue("InputWorkspace", "event_tof");
alg->setPropertyValue("OutputWorkspace", "event_dSpacing");
alg->setPropertyValue("Target", "dSpacing");
alg->execute();
TS_ASSERT(alg->isExecuted());
}
......
......@@ -9,7 +9,7 @@
#include <cxxtest/TestSuite.h>
#include "MantidAPI/AnalysisDataService.h"
#include "MantidAPI/FrameworkManager.h"
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/MatrixWorkspace.h"
#include "MantidAPI/WorkspaceFactory.h"
#include "MantidAlgorithms/FFTDerivative.h"
......@@ -25,7 +25,7 @@ public:
createWS(N, 0, "exp");
IAlgorithm *fft = Mantid::API::FrameworkManager::Instance().createAlgorithm(
auto fft = Mantid::API::AlgorithmManager::Instance().create(
"FFTDerivative");
fft->initialize();
fft->setPropertyValue("InputWorkspace", "FFTDerivative_WS_exp");
......@@ -45,8 +45,8 @@ public:
TS_ASSERT_DELTA(Y[i], (-4 * xx * exp(-(xx * xx) * 2)), 0.000001);
}
FrameworkManager::Instance().deleteWorkspace("FFTDerivative_WS_exp");
FrameworkManager::Instance().deleteWorkspace("FFTDerivative_out");
AnalysisDataService::Instance().remove("FFTDerivative_WS_exp");
AnalysisDataService::Instance().remove("FFTDerivative_out");
}
void testGaussianSecondOrderDerivative() {
......@@ -54,7 +54,7 @@ public:
createWS(N, 0, "exp");
IAlgorithm *fft = Mantid::API::FrameworkManager::Instance().createAlgorithm(
auto fft = Mantid::API::AlgorithmManager::Instance().create(
"FFTDerivative");
fft->initialize();
fft->setPropertyValue("InputWorkspace", "FFTDerivative_WS_exp");
......@@ -76,13 +76,12 @@ public:
TS_ASSERT_DELTA(Y[i], (16 * xx * xx * ex - 4 * ex), 0.000001);
}
FrameworkManager::Instance().deleteWorkspace("FFTDerivative_WS_exp");
FrameworkManager::Instance().deleteWorkspace("FFTDerivative_out");
AnalysisDataService::Instance().remove("FFTDerivative_WS_exp");
AnalysisDataService::Instance().remove("FFTDerivative_out");
}
private:
MatrixWorkspace_sptr createWS(int n, int dn, const std::string &name) {
FrameworkManager::Instance();
Mantid::DataObjects::Workspace2D_sptr ws =
boost::dynamic_pointer_cast<Mantid::DataObjects::Workspace2D>(
WorkspaceFactory::Instance().create("Workspace2D", 1, n + dn, n));
......
......@@ -11,7 +11,7 @@
#include "MantidAPI/AnalysisDataService.h"
#include "MantidAPI/Axis.h"
#include "MantidAPI/FrameworkManager.h"
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/MatrixWorkspace.h"
#include "MantidAPI/WorkspaceFactory.h"
#include "MantidAPI/WorkspaceGroup.h"
......@@ -51,8 +51,7 @@ public:
const auto inputWS = createWS(N, 0);
IAlgorithm *fft =
Mantid::API::FrameworkManager::Instance().createAlgorithm("FFT");
auto fft = Mantid::API::AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", inputWS);
......@@ -88,8 +87,8 @@ public:
MatrixWorkspace_sptr inputWS = createWS(N, 0);
IAlgorithm *fft =
Mantid::API::FrameworkManager::Instance().createAlgorithm("FFT");
auto fft =
Mantid::API::AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", inputWS);
......@@ -100,7 +99,7 @@ public:
MatrixWorkspace_sptr intermediate = fft->getProperty("OutputWorkspace");
TS_ASSERT(intermediate);
fft = Mantid::API::FrameworkManager::Instance().createAlgorithm("FFT");
fft = Mantid::API::AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", intermediate);
......@@ -131,8 +130,8 @@ public:
auto inputWS = createWS(N, 1);
IAlgorithm *fft =
Mantid::API::FrameworkManager::Instance().createAlgorithm("FFT");
auto fft =
Mantid::API::AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", inputWS);
......@@ -168,8 +167,8 @@ public:
MatrixWorkspace_sptr inWS = createWS(N, 1);
IAlgorithm *fft =
Mantid::API::FrameworkManager::Instance().createAlgorithm("FFT");
auto fft =
Mantid::API::AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", inWS);
......@@ -180,7 +179,7 @@ public:
MatrixWorkspace_sptr intermediate = fft->getProperty("OutputWorkspace");
TS_ASSERT(intermediate);
fft = Mantid::API::FrameworkManager::Instance().createAlgorithm("FFT");
fft = Mantid::API::AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", intermediate);
......@@ -211,8 +210,8 @@ public:
const auto inWS = createWS(N, 0);
IAlgorithm *fft =
Mantid::API::FrameworkManager::Instance().createAlgorithm("FFT");
auto fft =
Mantid::API::AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", inWS);
......@@ -248,8 +247,8 @@ public:
const MatrixWorkspace_sptr inWS = createWS(N, 0);
IAlgorithm *fft =
Mantid::API::FrameworkManager::Instance().createAlgorithm("FFT");
auto fft =
Mantid::API::AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", inWS);
......@@ -261,7 +260,7 @@ public:
fft->getProperty("OutputWorkspace");
TS_ASSERT(intermediate);
fft = Mantid::API::FrameworkManager::Instance().createAlgorithm("FFT");
fft = Mantid::API::AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", intermediate);
......@@ -292,8 +291,8 @@ public:
const auto inWS = createWS(N, 1);
IAlgorithm *fft =
Mantid::API::FrameworkManager::Instance().createAlgorithm("FFT");
auto fft =
Mantid::API::AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", inWS);
......@@ -329,8 +328,8 @@ public:
const MatrixWorkspace_sptr inWS = createWS(N, 1);
IAlgorithm *fft =
Mantid::API::FrameworkManager::Instance().createAlgorithm("FFT");
auto fft =
Mantid::API::AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", inWS);
......@@ -342,7 +341,7 @@ public:
fft->getProperty("OutputWorkspace");
TS_ASSERT(intermediate);
fft = Mantid::API::FrameworkManager::Instance().createAlgorithm("FFT");
fft = Mantid::API::AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", intermediate);
......@@ -373,8 +372,8 @@ public:
const auto realWS = createWS(N, 0);
const auto imagWS = createWS(N, 0);
IAlgorithm *fft =
Mantid::API::FrameworkManager::Instance().createAlgorithm("FFT");
auto fft =
Mantid::API::AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", realWS);
......@@ -423,8 +422,8 @@ public:
inWS->getAxis(0)->unit() =
Mantid::Kernel::UnitFactory::Instance().create("Energy");
IAlgorithm *fft =
Mantid::API::FrameworkManager::Instance().createAlgorithm("FFT");
auto fft =
Mantid::API::AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", inWS);
......@@ -462,7 +461,7 @@ public:
double aveX = (X[51] + X[49]) / 2.0;
X[50] = aveX + 0.01;
auto fft = FrameworkManager::Instance().createAlgorithm("FFT");
auto fft = AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", inputWS);
......@@ -480,7 +479,7 @@ public:
double aveX = (X[51] + X[49]) / 2.0;
X[50] = aveX + 0.01;
auto fft = FrameworkManager::Instance().createAlgorithm("FFT");
auto fft = AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", inputWS);
......@@ -493,7 +492,7 @@ public:
// Test that algorithm will not accept an empty input workspace
void testEmptyInputWorkspace_Throws() {
auto inputWS = createWS(1, 0);
auto fft = FrameworkManager::Instance().createAlgorithm("FFT");
auto fft = AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", inputWS);
......@@ -504,7 +503,7 @@ public:
void testRealOutOfRange_Throws() {
auto inputWS = createWS(100, 0);
auto fft = FrameworkManager::Instance().createAlgorithm("FFT");
auto fft = AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", inputWS);
......@@ -515,7 +514,7 @@ public:
void testImaginaryOutOfRange_Throws() {
auto inputWS = createWS(100, 0);
auto fft = FrameworkManager::Instance().createAlgorithm("FFT");
auto fft = AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", inputWS);
......@@ -528,7 +527,7 @@ public:
void testRealImaginarySizeMismatch_Throws() {
auto inputWS = createWS(100, 0);
auto inImagWS = createWS(99, 0);
auto fft = FrameworkManager::Instance().createAlgorithm("FFT");
auto fft = AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setProperty("InputWorkspace", inputWS);
......@@ -576,7 +575,7 @@ public:
auto fftAutoShiftWithOffset = doFFT(offsetWS, false, true);
// perform transforms for manual shift
auto fft = FrameworkManager::Instance().createAlgorithm("FFT");
auto fft = AlgorithmManager::Instance().create("FFT");
fft->initialize();
fft->setChild(true);
fft->setPropertyValue("OutputWorkspace", "__NotUsed");
......@@ -719,7 +718,7 @@ public:
private:
MatrixWorkspace_sptr doRebin(MatrixWorkspace_sptr inputWS,