Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
8935a13b
Commit
8935a13b
authored
Mar 23, 2020
by
Nick Draper
Browse files
clang formatting for this pr
parent
efeedfbb
Changes
32
Hide whitespace changes
Inline
Side-by-side
Framework/Algorithms/src/RenameWorkspace.cpp
View file @
8935a13b
...
...
@@ -5,8 +5,8 @@
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#include
"MantidAlgorithms/RenameWorkspace.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/MatrixWorkspace.h"
#include
"MantidAPI/WorkspaceGroup.h"
#include
"MantidAPI/WorkspaceHistory.h"
...
...
Framework/Algorithms/test/AnyShapeAbsorptionTest.h
View file @
8935a13b
...
...
@@ -8,8 +8,8 @@
#include
<cxxtest/TestSuite.h>
#include
"MantidAPI/Axis.h"
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/Axis.h"
#include
"MantidAlgorithms/AnyShapeAbsorption.h"
#include
"MantidAlgorithms/CylinderAbsorption.h"
#include
"MantidAlgorithms/FlatPlateAbsorption.h"
...
...
@@ -17,8 +17,8 @@
#include
"MantidTestHelpers/ComponentCreationHelper.h"
#include
"MantidTestHelpers/WorkspaceCreationHelper.h"
using
Mantid
::
API
::
AnalysisDataService
;
using
Mantid
::
API
::
AlgorithmManager
;
using
Mantid
::
API
::
AnalysisDataService
;
using
Mantid
::
API
::
MatrixWorkspace_sptr
;
class
AnyShapeAbsorptionTest
:
public
CxxTest
::
TestSuite
{
...
...
Framework/Algorithms/test/AppendSpectraTest.h
View file @
8935a13b
...
...
@@ -6,9 +6,9 @@
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/Axis.h"
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/SpectrumInfo.h"
#include
"MantidAlgorithms/AppendSpectra.h"
#include
"MantidDataHandling/LoadRaw3.h"
...
...
@@ -418,8 +418,7 @@ private:
const
std
::
string
&
inputWorkspace2
,
const
std
::
string
&
outputWorkspace
)
{
auto
appendSpectra
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"AppendSpectra"
);
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"AppendSpectra"
);
TS_ASSERT_THROWS_NOTHING
(
appendSpectra
->
setRethrows
(
true
));
TS_ASSERT_THROWS_NOTHING
(
appendSpectra
->
setProperty
(
"InputWorkspace1"
,
inputWorkspace1
));
...
...
@@ -449,8 +448,8 @@ private:
dataY
.
emplace_back
(
double
(
i
));
}
auto
createWS
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"CreateWorkspace"
);
auto
createWS
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"CreateWorkspace"
);
TS_ASSERT_THROWS_NOTHING
(
createWS
->
setProperty
(
"OutputWorkspace"
,
"we"
));
TS_ASSERT_THROWS_NOTHING
(
createWS
->
setProperty
(
"DataX"
,
dataX
));
TS_ASSERT_THROWS_NOTHING
(
createWS
->
setProperty
(
"DataY"
,
dataY
));
...
...
@@ -464,8 +463,7 @@ private:
TS_ASSERT_THROWS_NOTHING
(
createWS
->
execute
());
// we do a rebin so we can have nice bins
auto
rebin
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"Rebin"
);
auto
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
}));
...
...
Framework/Algorithms/test/CalculateCarpenterSampleCorrectionTest.h
View file @
8935a13b
...
...
@@ -9,8 +9,8 @@
#include
<cxxtest/TestSuite.h>
#include
<vector>
#include
"MantidAPI/Axis.h"
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/Axis.h"
#include
"MantidAPI/WorkspaceGroup.h"
#include
"MantidAlgorithms/CalculateCarpenterSampleCorrection.h"
#include
"MantidDataObjects/WorkspaceCreation.h"
...
...
@@ -85,8 +85,7 @@ public:
// convert to wavelength
auto
convertUnitsAlg
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"ConvertUnits"
);
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"ConvertUnits"
);
convertUnitsAlg
->
setPropertyValue
(
"InputWorkspace"
,
"TestInputWS"
);
convertUnitsAlg
->
setPropertyValue
(
"OutputWorkspace"
,
"TestInputWS"
);
convertUnitsAlg
->
setProperty
(
"Target"
,
"Wavelength"
);
...
...
@@ -141,8 +140,7 @@ public:
TS_ASSERT_DELTA
(
abs_corr_actual
[
i
],
abs_corr_expected
[
i
],
0.00001
);
// Check applying absorption correction
auto
divide
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"Divide"
);
auto
divide
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"Divide"
);
divide
->
initialize
();
divide
->
setPropertyValue
(
"LHSWorkspace"
,
"TestInputWS"
);
divide
->
setPropertyValue
(
"RHSWorkspace"
,
absWksp
->
getName
());
...
...
Framework/Algorithms/test/CarpenterSampleCorrectionTest.h
View file @
8935a13b
...
...
@@ -9,9 +9,9 @@
#include
<cxxtest/TestSuite.h>
#include
<vector>
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/Axis.h"
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAlgorithms/CarpenterSampleCorrection.h"
#include
"MantidDataObjects/WorkspaceCreation.h"
#include
"MantidHistogramData/LinearGenerator.h"
...
...
@@ -78,8 +78,7 @@ public:
// convert to wavelength
auto
convertUnitsAlg
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"ConvertUnits"
);
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"ConvertUnits"
);
convertUnitsAlg
->
setPropertyValue
(
"InputWorkspace"
,
"TestInputWS"
);
convertUnitsAlg
->
setPropertyValue
(
"OutputWorkspace"
,
"TestInputWS"
);
convertUnitsAlg
->
setProperty
(
"Target"
,
"Wavelength"
);
...
...
Framework/Algorithms/test/ConvertUnitsTest.h
View file @
8935a13b
...
...
@@ -9,9 +9,9 @@
#include
"MantidTestHelpers/WorkspaceCreationHelper.h"
#include
<cxxtest/TestSuite.h>
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/Axis.h"
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/MatrixWorkspace.h"
#include
"MantidAlgorithms/ConvertToDistribution.h"
#include
"MantidAlgorithms/ConvertUnits.h"
...
...
Framework/Algorithms/test/FFTDerivativeTest.h
View file @
8935a13b
...
...
@@ -8,8 +8,8 @@
#include
<cxxtest/TestSuite.h>
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/MatrixWorkspace.h"
#include
"MantidAPI/WorkspaceFactory.h"
#include
"MantidAlgorithms/FFTDerivative.h"
...
...
@@ -25,8 +25,8 @@ public:
createWS
(
N
,
0
,
"exp"
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFTDerivative"
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFTDerivative"
);
fft
->
initialize
();
fft
->
setPropertyValue
(
"InputWorkspace"
,
"FFTDerivative_WS_exp"
);
fft
->
setPropertyValue
(
"OutputWorkspace"
,
"FFTDerivative_out"
);
...
...
@@ -54,8 +54,8 @@ public:
createWS
(
N
,
0
,
"exp"
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFTDerivative"
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFTDerivative"
);
fft
->
initialize
();
fft
->
setPropertyValue
(
"InputWorkspace"
,
"FFTDerivative_WS_exp"
);
fft
->
setPropertyValue
(
"OutputWorkspace"
,
"FFTDerivative_out"
);
...
...
Framework/Algorithms/test/FFTTest.h
View file @
8935a13b
...
...
@@ -9,9 +9,9 @@
#include
<cmath>
#include
<cxxtest/TestSuite.h>
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/Axis.h"
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/MatrixWorkspace.h"
#include
"MantidAPI/WorkspaceFactory.h"
#include
"MantidAPI/WorkspaceGroup.h"
...
...
@@ -87,8 +87,7 @@ public:
MatrixWorkspace_sptr
inputWS
=
createWS
(
N
,
0
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
fft
->
initialize
();
fft
->
setChild
(
true
);
fft
->
setProperty
(
"InputWorkspace"
,
inputWS
);
...
...
@@ -130,8 +129,7 @@ public:
auto
inputWS
=
createWS
(
N
,
1
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
fft
->
initialize
();
fft
->
setChild
(
true
);
fft
->
setProperty
(
"InputWorkspace"
,
inputWS
);
...
...
@@ -167,8 +165,7 @@ public:
MatrixWorkspace_sptr
inWS
=
createWS
(
N
,
1
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
fft
->
initialize
();
fft
->
setChild
(
true
);
fft
->
setProperty
(
"InputWorkspace"
,
inWS
);
...
...
@@ -210,8 +207,7 @@ public:
const
auto
inWS
=
createWS
(
N
,
0
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
fft
->
initialize
();
fft
->
setChild
(
true
);
fft
->
setProperty
(
"InputWorkspace"
,
inWS
);
...
...
@@ -247,8 +243,7 @@ public:
const
MatrixWorkspace_sptr
inWS
=
createWS
(
N
,
0
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
fft
->
initialize
();
fft
->
setChild
(
true
);
fft
->
setProperty
(
"InputWorkspace"
,
inWS
);
...
...
@@ -291,8 +286,7 @@ public:
const
auto
inWS
=
createWS
(
N
,
1
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
fft
->
initialize
();
fft
->
setChild
(
true
);
fft
->
setProperty
(
"InputWorkspace"
,
inWS
);
...
...
@@ -328,8 +322,7 @@ public:
const
MatrixWorkspace_sptr
inWS
=
createWS
(
N
,
1
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
fft
->
initialize
();
fft
->
setChild
(
true
);
fft
->
setProperty
(
"InputWorkspace"
,
inWS
);
...
...
@@ -372,8 +365,7 @@ public:
const
auto
realWS
=
createWS
(
N
,
0
);
const
auto
imagWS
=
createWS
(
N
,
0
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
fft
->
initialize
();
fft
->
setChild
(
true
);
fft
->
setProperty
(
"InputWorkspace"
,
realWS
);
...
...
@@ -422,8 +414,7 @@ public:
inWS
->
getAxis
(
0
)
->
unit
()
=
Mantid
::
Kernel
::
UnitFactory
::
Instance
().
create
(
"Energy"
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"FFT"
);
fft
->
initialize
();
fft
->
setChild
(
true
);
fft
->
setProperty
(
"InputWorkspace"
,
inWS
);
...
...
@@ -834,8 +825,7 @@ private:
Y
.
emplace_back
(
sin
(
omega
*
x
));
E
.
emplace_back
(
0.1
);
}
auto
create
=
AlgorithmManager
::
Instance
().
create
(
"CreateWorkspace"
);
auto
create
=
AlgorithmManager
::
Instance
().
create
(
"CreateWorkspace"
);
create
->
initialize
();
create
->
setChild
(
true
);
create
->
setProperty
(
"DataX"
,
X
);
...
...
@@ -873,8 +863,7 @@ private:
Y
.
emplace_back
(
y
);
E
.
emplace_back
(
0.1
);
}
auto
create
=
AlgorithmManager
::
Instance
().
create
(
"CreateWorkspace"
);
auto
create
=
AlgorithmManager
::
Instance
().
create
(
"CreateWorkspace"
);
create
->
initialize
();
create
->
setChild
(
true
);
create
->
setProperty
(
"DataX"
,
X
);
...
...
@@ -921,8 +910,7 @@ private:
E
.
emplace_back
(
0.1
);
}
// create workspace
auto
create
=
AlgorithmManager
::
Instance
().
create
(
"CreateWorkspace"
);
auto
create
=
AlgorithmManager
::
Instance
().
create
(
"CreateWorkspace"
);
create
->
initialize
();
create
->
setChild
(
true
);
create
->
setProperty
(
"DataX"
,
X
);
...
...
@@ -968,8 +956,7 @@ private:
Y
.
emplace_back
(
y
);
}
// create workspace
auto
create
=
AlgorithmManager
::
Instance
().
create
(
"CreateWorkspace"
);
auto
create
=
AlgorithmManager
::
Instance
().
create
(
"CreateWorkspace"
);
create
->
initialize
();
create
->
setChild
(
true
);
create
->
setProperty
(
"DataX"
,
X
);
...
...
Framework/Algorithms/test/FitPeaksTest.h
View file @
8935a13b
...
...
@@ -8,9 +8,9 @@
#include
<cxxtest/TestSuite.h>
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/Axis.h"
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/MatrixWorkspace.h"
#include
"MantidAPI/TableRow.h"
#include
"MantidAlgorithms/FitPeaks.h"
...
...
@@ -39,9 +39,7 @@ private:
public:
// This pair of boilerplate methods prevent the suite being created statically
// This means the constructor isn't called when running other tests
static
FitPeaksTest
*
createSuite
()
{
return
new
FitPeaksTest
();
}
static
FitPeaksTest
*
createSuite
()
{
return
new
FitPeaksTest
();
}
static
void
destroySuite
(
FitPeaksTest
*
suite
)
{
delete
suite
;
}
void
test_Init
()
{
...
...
@@ -527,8 +525,7 @@ public:
std
::
string
input_ws_name
(
"PG3_733"
);
// Start by loading our NXS file
auto
loader
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"LoadNexus"
);
auto
loader
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"LoadNexus"
);
loader
->
setPropertyValue
(
"Filename"
,
"PG3_733.nxs"
);
loader
->
setPropertyValue
(
"OutputWorkspace"
,
input_ws_name
);
loader
->
execute
();
...
...
@@ -610,8 +607,7 @@ public:
std
::
string
input_ws_name
(
"PG3_733"
);
// Start by loading our NXS file
auto
loader
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"LoadNexus"
);
auto
loader
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"LoadNexus"
);
loader
->
setPropertyValue
(
"Filename"
,
"PG3_733.nxs"
);
loader
->
setPropertyValue
(
"OutputWorkspace"
,
input_ws_name
);
loader
->
execute
();
...
...
Framework/Algorithms/test/NormaliseByDetectorTest.h
View file @
8935a13b
...
...
@@ -572,8 +572,7 @@ public:
void
setUp
()
override
{
if
(
!
ws
)
{
// Load some data
auto
loadalg
=
AlgorithmManager
::
Instance
().
create
(
"Load"
);
auto
loadalg
=
AlgorithmManager
::
Instance
().
create
(
"Load"
);
loadalg
->
setRethrows
(
true
);
loadalg
->
initialize
();
loadalg
->
setPropertyValue
(
"Filename"
,
"POLREF00004699.nxs"
);
...
...
@@ -581,8 +580,7 @@ public:
loadalg
->
execute
();
// Convert units to wavelength
auto
unitsalg
=
AlgorithmManager
::
Instance
().
create
(
"ConvertUnits"
);
auto
unitsalg
=
AlgorithmManager
::
Instance
().
create
(
"ConvertUnits"
);
unitsalg
->
initialize
();
unitsalg
->
setPropertyValue
(
"InputWorkspace"
,
"testws"
);
unitsalg
->
setPropertyValue
(
"OutputWorkspace"
,
"testws"
);
...
...
Framework/Algorithms/test/PDDetermineCharacterizationsTest.h
View file @
8935a13b
...
...
@@ -44,8 +44,7 @@ public:
m_logWSName
=
"_det_char_log"
;
{
auto
alg
=
AlgorithmManager
::
Instance
().
create
(
"CreateWorkspace"
);
auto
alg
=
AlgorithmManager
::
Instance
().
create
(
"CreateWorkspace"
);
alg
->
setPropertyValue
(
"DataX"
,
"-1.0,-0.8,-0.6,-0.4,-0.2,0.0,0.2,0.4,0.6,0.8,1.0"
);
alg
->
setPropertyValue
(
"DataY"
,
...
...
Framework/Algorithms/test/PDFFourierTransformTest.h
View file @
8935a13b
...
...
@@ -6,9 +6,9 @@
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/Axis.h"
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/IAlgorithm.h"
#include
"MantidAPI/MatrixWorkspace.h"
#include
"MantidAPI/WorkspaceFactory.h"
...
...
@@ -100,8 +100,7 @@ public:
// 1. Run PDFFT
auto
pdfft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"PDFFourierTransform"
);
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"PDFFourierTransform"
);
pdfft
->
initialize
();
pdfft
->
setProperty
(
"InputWorkspace"
,
ws
);
...
...
@@ -136,8 +135,7 @@ public:
// 1. Run PDFFT
auto
pdfft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"PDFFourierTransform"
);
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"PDFFourierTransform"
);
pdfft
->
initialize
();
pdfft
->
setProperty
(
"InputWorkspace"
,
ws
);
...
...
@@ -174,8 +172,8 @@ public:
}
// 1. Run PDFFT
auto
pdfft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"PDFFourierTransform"
);
auto
pdfft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"PDFFourierTransform"
);
pdfft
->
initialize
();
pdfft
->
setProperty
(
"InputWorkspace"
,
ws
);
...
...
@@ -216,8 +214,8 @@ public:
void
setUp
()
override
{
ws
=
createWS
(
2000000
,
0.1
,
"inputWS"
,
"MomentumTransfer"
);
pdfft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"PDFFourierTransform"
);
pdfft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"PDFFourierTransform"
);
pdfft
->
setProperty
(
"InputWorkspace"
,
ws
);
pdfft
->
setProperty
(
"OutputWorkspace"
,
"outputWS"
);
...
...
Framework/Algorithms/test/RealFFTTest.h
View file @
8935a13b
...
...
@@ -9,8 +9,8 @@
#include
<cmath>
#include
<cxxtest/TestSuite.h>
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/MatrixWorkspace.h"
#include
"MantidAPI/WorkspaceFactory.h"
#include
"MantidAlgorithms/FFT.h"
...
...
@@ -69,8 +69,7 @@ void deleteWorkspacesFromADS() {
}
void
doTestForward
(
const
int
N
,
const
double
XX
,
bool
performance
=
false
)
{
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"RealFFT"
);
auto
fft
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"RealFFT"
);
fft
->
initialize
();
fft
->
setPropertyValue
(
"InputWorkspace"
,
"RealFFT_WS"
);
fft
->
setPropertyValue
(
"OutputWorkspace"
,
"RealFFT_WS_forward"
);
...
...
Framework/Algorithms/test/SphericalAbsorptionTest.h
View file @
8935a13b
...
...
@@ -8,8 +8,8 @@
#include
<cxxtest/TestSuite.h>
#include
"MantidAPI/Axis.h"
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/Axis.h"
#include
"MantidAlgorithms/SphericalAbsorption.h"
#include
"MantidKernel/UnitFactory.h"
#include
"MantidTestHelpers/WorkspaceCreationHelper.h"
...
...
@@ -24,30 +24,26 @@ class SphericalAbsorptionTest : public CxxTest::TestSuite {
public:
void
testName
()
{
auto
atten
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"SphericalAbsorption"
);
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"SphericalAbsorption"
);
TS_ASSERT_EQUALS
(
atten
->
name
(),
"SphericalAbsorption"
);
}
void
testVersion
()
{
auto
atten
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"SphericalAbsorption"
);
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"SphericalAbsorption"
);
TS_ASSERT_EQUALS
(
atten
->
version
(),
1
);
}
void
testInit
()
{
auto
atten
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"SphericalAbsorption"
);
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"SphericalAbsorption"
);
TS_ASSERT_THROWS_NOTHING
(
atten
->
initialize
());
TS_ASSERT
(
atten
->
isInitialized
());
}
void
testExec
()
{
auto
atten
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"SphericalAbsorption"
);
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"SphericalAbsorption"
);
if
(
!
atten
->
isInitialized
())
atten
->
initialize
();
...
...
Framework/Algorithms/test/StripVanadiumPeaks2Test.h
View file @
8935a13b
...
...
@@ -6,9 +6,9 @@
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/Axis.h"
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAlgorithms/StripVanadiumPeaks2.h"
#include
"MantidDataObjects/WorkspaceCreation.h"
#include
"MantidKernel/UnitFactory.h"
...
...
@@ -41,8 +41,7 @@ public:
std
::
string
outputWSName
(
"PG3_733_stripped"
);
// Start by loading our NXS file
auto
loader
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"LoadNexus"
);
auto
loader
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"LoadNexus"
);
loader
->
setPropertyValue
(
"Filename"
,
"PG3_733.nxs"
);
loader
->
setPropertyValue
(
"OutputWorkspace"
,
inputWSName
);
loader
->
execute
();
...
...
Framework/Algorithms/test/StripVanadiumPeaksTest.h
View file @
8935a13b
...
...
@@ -6,8 +6,8 @@
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAlgorithms/StripVanadiumPeaks.h"
#include
"MantidKernel/UnitFactory.h"
#include
"MantidKernel/VectorHelper.h"
...
...
@@ -37,8 +37,7 @@ public:
std
::
string
outputWSName
(
"PG3_733_stripped"
);
// Start by loading our NXS file
auto
loader
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"LoadNexus"
);
auto
loader
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"LoadNexus"
);
loader
->
setPropertyValue
(
"Filename"
,
"PG3_733.nxs"
);
loader
->
setPropertyValue
(
"OutputWorkspace"
,
inputWSName
);
loader
->
execute
();
...
...
Framework/Crystal/test/FilterPeaksTest.h
View file @
8935a13b
...
...
@@ -337,8 +337,7 @@ public:
FilterPeaksTestPerformance
()
{
const
std
::
string
outputWorkspace
=
"TOPAZ_3007.peaks"
;
auto
&
manager
=
Mantid
::
API
::
AlgorithmManager
::
Instance
();
auto
&
manager
=
Mantid
::
API
::
AlgorithmManager
::
Instance
();
auto
load
=
manager
.
create
(
"LoadIsawPeaks"
);
load
->
initialize
();
load
->
setProperty
(
"Filename"
,
"TOPAZ_3007.peaks"
);
...
...
Framework/CurveFitting/test/Algorithms/SplineBackgroundTest.h
View file @
8935a13b
...
...
@@ -6,9 +6,9 @@
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/Axis.h"
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/MatrixWorkspace.h"
#include
"MantidCurveFitting/Algorithms/SplineBackground.h"
#include
"MantidDataObjects/Workspace2D.h"
...
...
@@ -41,8 +41,8 @@ public:
const
std
::
string
wsName
=
"SplineBackground_points"
;
WorkspaceCreationHelper
::
storeWS
(
wsName
,
ws
);
auto
alg
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"SplineBackground"
);
auto
alg
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"SplineBackground"
);
alg
->
initialize
();
alg
->
setPropertyValue
(
"InputWorkspace"
,
wsName
);
alg
->
setPropertyValue
(
"OutputWorkspace"
,
"SplineBackground_out"
);
...
...
@@ -87,8 +87,7 @@ public:
WorkspaceCreationHelper
::
storeWS
(
inputWsName
,
ws
);
SplineBackgroundAlg
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"SplineBackground"
);
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"SplineBackground"
);
SplineBackgroundAlg
->
initialize
();
SplineBackgroundAlg
->
setPropertyValue
(
"InputWorkspace"
,
inputWsName
);
SplineBackgroundAlg
->
setPropertyValue
(
"OutputWorkspace"
,
outputWsName
);
...
...
Framework/CurveFitting/test/Functions/UserFunction1DTest.h
View file @
8935a13b
...
...
@@ -8,8 +8,8 @@
#include
<cxxtest/TestSuite.h>
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/ITableWorkspace.h"
#include
"MantidAPI/WorkspaceFactory.h"
#include
"MantidCurveFitting/Functions/UserFunction1D.h"
...
...
@@ -24,8 +24,7 @@ public:
void
testLinear
()
{
setupWS
();
auto
alg
=
AlgorithmManager
::
Instance
().
create
(
"UserFunction1D"
);
auto
alg
=
AlgorithmManager
::
Instance
().
create
(
"UserFunction1D"
);
alg
->
initialize
();
alg
->
setPropertyValue
(
"InputWorkspace"
,
"UserFunction1DWS"
);
alg
->
setPropertyValue
(
"WorkspaceIndex"
,
"0"
);
...
...
@@ -64,13 +63,10 @@ public:
// Tidy up
AnalysisDataService
::
Instance
().
remove
(
"UserFunction1DWS"
);
AnalysisDataService
::
Instance
().
remove
(
"UserFunction1D_Parameters"
);
AnalysisDataService
::
Instance
().
remove
(
"UserFunction1D_Parameters"
);
AnalysisDataService
::
Instance
().
remove
(
"UserFunction1D_Workspace"
);
AnalysisDataService
::
Instance
().
remove