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
8b8460c5
Commit
8b8460c5
authored
Apr 17, 2016
by
Hahn, Steven
Browse files
Refs #12949. Remove release() call.
parent
170e4f0f
Changes
59
Hide whitespace changes
Inline
Side-by-side
Framework/Algorithms/src/AlignDetectors.cpp
View file @
8b8460c5
...
...
@@ -371,7 +371,7 @@ void AlignDetectors::execEvent() {
// generate the output workspace pointer
API
::
MatrixWorkspace_sptr
matrixOutputWS
=
getProperty
(
"OutputWorkspace"
);
if
(
matrixOutputWS
!=
matrixInputWS
)
{
matrixOutputWS
=
MatrixWorkspace_sptr
(
matrixInputWS
->
clone
()
.
release
())
;
matrixOutputWS
=
matrixInputWS
->
clone
();
this
->
setProperty
(
"OutputWorkspace"
,
matrixOutputWS
);
}
auto
outputWS
=
boost
::
dynamic_pointer_cast
<
EventWorkspace
>
(
matrixOutputWS
);
...
...
Framework/Algorithms/src/BinaryOperation.cpp
View file @
8b8460c5
...
...
@@ -226,7 +226,7 @@ void BinaryOperation::exec() {
"Contact the developers."
);
}
else
{
// You HAVE to copy the data from lhs to to the output!
m_out
=
MatrixWorkspace_sptr
(
m_lhs
->
clone
()
.
release
())
;
m_out
=
m_lhs
->
clone
();
// Make sure m_eout still points to the same as m_out;
m_eout
=
boost
::
dynamic_pointer_cast
<
EventWorkspace
>
(
m_out
);
}
...
...
Framework/Algorithms/src/ChangeBinOffset.cpp
View file @
8b8460c5
...
...
@@ -33,7 +33,7 @@ void ChangeBinOffset::exec() {
const
MatrixWorkspace_sptr
inputW
=
getProperty
(
"InputWorkspace"
);
MatrixWorkspace_sptr
outputW
=
getProperty
(
"OutputWorkspace"
);
if
(
outputW
!=
inputW
)
{
outputW
=
MatrixWorkspace_sptr
(
inputW
->
clone
()
.
release
())
;
outputW
=
inputW
->
clone
();
setProperty
(
"OutputWorkspace"
,
outputW
);
}
...
...
Framework/Algorithms/src/ChangePulsetime.cpp
View file @
8b8460c5
...
...
@@ -53,7 +53,7 @@ void ChangePulsetime::exec() {
EventWorkspace_const_sptr
in_ws
=
getProperty
(
"InputWorkspace"
);
EventWorkspace_sptr
out_ws
=
getProperty
(
"OutputWorkspace"
);
if
(
!
out_ws
)
{
out_ws
=
EventWorkspace_sptr
(
in_ws
->
clone
()
.
release
())
;
out_ws
=
in_ws
->
clone
();
}
// Either use the given list or use all spectra
...
...
Framework/Algorithms/src/CloneWorkspace.cpp
View file @
8b8460c5
...
...
@@ -37,7 +37,7 @@ void CloneWorkspace::exec() {
if
(
inputMatrix
||
iTableWS
)
{
// Workspace::clone() is polymorphic, we can use the same for all types
Workspace_sptr
outputWS
(
inputWorkspace
->
clone
()
.
release
()
);
Workspace_sptr
outputWS
(
inputWorkspace
->
clone
());
setProperty
(
"OutputWorkspace"
,
outputWS
);
}
else
if
(
inputMD
)
{
// Call the CloneMDWorkspace algo to handle MDEventWorkspace
...
...
Framework/Algorithms/src/ConvertUnits.cpp
View file @
8b8460c5
...
...
@@ -212,7 +212,7 @@ API::MatrixWorkspace_sptr ConvertUnits::setupOutputWorkspace(
// If input and output workspaces are NOT the same, create a new workspace for
// the output
if
(
outputWS
!=
inputWS
)
{
outputWS
=
MatrixWorkspace_sptr
(
inputWS
->
clone
()
.
release
())
;
outputWS
=
inputWS
->
clone
();
}
if
(
!
m_inputEvents
&&
m_distribution
)
{
...
...
Framework/Algorithms/src/ConvertUnitsUsingDetectorTable.cpp
View file @
8b8460c5
...
...
@@ -226,7 +226,7 @@ API::MatrixWorkspace_sptr ConvertUnitsUsingDetectorTable::setupOutputWorkspace(
// If input and output workspaces are NOT the same, create a new workspace for
// the output
if
(
outputWS
!=
inputWS
)
{
outputWS
=
MatrixWorkspace_sptr
(
inputWS
->
clone
()
.
release
())
;
outputWS
=
inputWS
->
clone
();
}
if
(
!
m_inputEvents
&&
m_distribution
)
{
...
...
Framework/Algorithms/src/CorelliCrossCorrelate.cpp
View file @
8b8460c5
...
...
@@ -111,7 +111,7 @@ void CorelliCrossCorrelate::exec() {
outputWS
=
getProperty
(
"OutputWorkspace"
);
if
(
outputWS
!=
inputWS
)
{
outputWS
=
EventWorkspace_sptr
(
inputWS
->
clone
()
.
release
())
;
outputWS
=
inputWS
->
clone
();
}
// Read in chopper sequence from IDF.
...
...
Framework/Algorithms/src/CorrectKiKf.cpp
View file @
8b8460c5
...
...
@@ -201,7 +201,7 @@ void CorrectKiKf::execEvent() {
// generate the output workspace pointer
API
::
MatrixWorkspace_sptr
matrixOutputWS
=
getProperty
(
"OutputWorkspace"
);
if
(
matrixOutputWS
!=
matrixInputWS
)
{
matrixOutputWS
=
MatrixWorkspace_sptr
(
matrixInputWS
->
clone
()
.
release
())
;
matrixOutputWS
=
matrixInputWS
->
clone
();
setProperty
(
"OutputWorkspace"
,
matrixOutputWS
);
}
auto
outputWS
=
boost
::
dynamic_pointer_cast
<
EventWorkspace
>
(
matrixOutputWS
);
...
...
Framework/Algorithms/src/FilterByXValue.cpp
View file @
8b8460c5
...
...
@@ -85,7 +85,7 @@ void FilterByXValue::exec() {
// entail new methods (e.g. iterators) on EventList as this algorithm
// shouldn't
// need to know about the type of the events (e.g. weighted).
outputWS
=
EventWorkspace_sptr
(
inputWS
->
clone
()
.
release
())
;
outputWS
=
inputWS
->
clone
();
setProperty
(
"OutputWorkspace"
,
outputWS
);
}
...
...
Framework/Algorithms/src/He3TubeEfficiency.cpp
View file @
8b8460c5
...
...
@@ -416,8 +416,7 @@ void He3TubeEfficiency::execEvent() {
// generate the output workspace pointer
API
::
MatrixWorkspace_sptr
matrixOutputWS
=
getProperty
(
"OutputWorkspace"
);
if
(
matrixOutputWS
!=
matrixInputWS
)
{
matrixOutputWS
=
API
::
MatrixWorkspace_sptr
(
matrixInputWS
->
clone
().
release
());
matrixOutputWS
=
matrixInputWS
->
clone
();
setProperty
(
"OutputWorkspace"
,
matrixOutputWS
);
}
auto
outputWS
=
...
...
Framework/Algorithms/src/MaskBins.cpp
View file @
8b8460c5
...
...
@@ -94,7 +94,7 @@ void MaskBins::exec() {
// Only create the output workspace if it's different to the input one
MatrixWorkspace_sptr
outputWS
=
getProperty
(
"OutputWorkspace"
);
if
(
outputWS
!=
inputWS
)
{
outputWS
=
MatrixWorkspace_sptr
(
inputWS
->
clone
()
.
release
())
;
outputWS
=
inputWS
->
clone
();
setProperty
(
"OutputWorkspace"
,
outputWS
);
}
...
...
Framework/Algorithms/src/MergeRuns.cpp
View file @
8b8460c5
...
...
@@ -264,7 +264,7 @@ void MergeRuns::execEvent() {
// Create a new output event workspace, by copying the first WS in the list
EventWorkspace_sptr
inputWS
=
m_inEventWS
[
0
];
EventWorkspace_sptr
outWS
(
inputWS
->
clone
()
.
release
()
);
EventWorkspace_sptr
outWS
(
inputWS
->
clone
());
int64_t
n
=
m_inEventWS
.
size
()
-
1
;
m_progress
=
new
Progress
(
this
,
0.0
,
1.0
,
n
);
...
...
Framework/Algorithms/src/ModeratorTzero.cpp
View file @
8b8460c5
...
...
@@ -249,7 +249,7 @@ void ModeratorTzero::execEvent(const std::string &emode) {
// generate the output workspace pointer
API
::
MatrixWorkspace_sptr
matrixOutputWS
=
getProperty
(
"OutputWorkspace"
);
if
(
matrixOutputWS
!=
matrixInputWS
)
{
matrixOutputWS
=
MatrixWorkspace_sptr
(
matrixInputWS
->
clone
()
.
release
())
;
matrixOutputWS
=
matrixInputWS
->
clone
();
setProperty
(
"OutputWorkspace"
,
matrixOutputWS
);
}
auto
outputWS
=
boost
::
dynamic_pointer_cast
<
EventWorkspace
>
(
matrixOutputWS
);
...
...
Framework/Algorithms/src/ModeratorTzeroLinear.cpp
View file @
8b8460c5
...
...
@@ -185,7 +185,7 @@ void ModeratorTzeroLinear::execEvent() {
// generate the output workspace pointer
MatrixWorkspace_sptr
matrixOutputWS
=
getProperty
(
"OutputWorkspace"
);
if
(
matrixOutputWS
!=
matrixInputWS
)
{
matrixOutputWS
=
MatrixWorkspace_sptr
(
matrixInputWS
->
clone
()
.
release
())
;
matrixOutputWS
=
matrixInputWS
->
clone
();
setProperty
(
"OutputWorkspace"
,
matrixOutputWS
);
}
auto
outputWS
=
boost
::
dynamic_pointer_cast
<
EventWorkspace
>
(
matrixOutputWS
);
...
...
Framework/Algorithms/src/MultipleScatteringCylinderAbsorption.cpp
View file @
8b8460c5
...
...
@@ -163,7 +163,7 @@ void MultipleScatteringCylinderAbsorption::exec() {
// not in-place so create a new copy
MatrixWorkspace_sptr
out_WS
=
getProperty
(
"OutputWorkspace"
);
if
(
in_WS
!=
out_WS
)
{
out_WS
=
MatrixWorkspace_sptr
(
in_WS
->
clone
()
.
release
())
;
out_WS
=
in_WS
->
clone
();
}
auto
out_WSevent
=
boost
::
dynamic_pointer_cast
<
EventWorkspace
>
(
out_WS
);
...
...
Framework/Algorithms/src/NormaliseToMonitor.cpp
View file @
8b8460c5
...
...
@@ -566,7 +566,7 @@ void NormaliseToMonitor::normaliseBinByBin(
// Only create output workspace if different to input one
if
(
outputWorkspace
!=
inputWorkspace
)
{
if
(
inputEvent
)
{
outputWorkspace
=
MatrixWorkspace_sptr
(
inputWorkspace
->
clone
()
.
release
())
;
outputWorkspace
=
inputWorkspace
->
clone
();
}
else
outputWorkspace
=
WorkspaceFactory
::
Instance
().
create
(
inputWorkspace
);
}
...
...
Framework/Algorithms/src/Rebin.cpp
View file @
8b8460c5
...
...
@@ -147,7 +147,7 @@ void Rebin::exec() {
if
(
PreserveEvents
)
{
if
(
!
inPlace
)
{
outputWS
=
MatrixWorkspace_sptr
(
inputWS
->
clone
()
.
release
())
;
outputWS
=
inputWS
->
clone
();
}
auto
eventOutputWS
=
boost
::
dynamic_pointer_cast
<
EventWorkspace
>
(
outputWS
);
...
...
Framework/Algorithms/src/ReflectometryReductionOneAuto.cpp
View file @
8b8460c5
...
...
@@ -542,7 +542,7 @@ ReflectometryReductionOneAuto::sumOverTransmissionGroup(
// We used .release because clone() will return a unique_ptr.
// we need to release the ownership of the pointer so that it
// can be cast into a shared_ptr of type Workspace.
Workspace_sptr
transmissionRunSum
(
transGroup
->
getItem
(
0
)
->
clone
()
.
release
()
);
Workspace_sptr
transmissionRunSum
(
transGroup
->
getItem
(
0
)
->
clone
());
// make a variable to store the overall total of the summation
MatrixWorkspace_sptr
total
;
...
...
Framework/Algorithms/src/RemoveLowResTOF.cpp
View file @
8b8460c5
...
...
@@ -123,7 +123,7 @@ void RemoveLowResTOF::exec() {
// Only create the output workspace if it's different to the input one
MatrixWorkspace_sptr
outputWS
=
getProperty
(
"OutputWorkspace"
);
if
(
outputWS
!=
m_inputWS
)
{
outputWS
=
MatrixWorkspace_sptr
(
m_inputWS
->
clone
()
.
release
())
;
outputWS
=
m_inputWS
->
clone
();
setProperty
(
"OutputWorkspace"
,
outputWS
);
}
...
...
@@ -168,7 +168,7 @@ void RemoveLowResTOF::execEvent() {
MatrixWorkspace_sptr
matrixLowResW
=
getProperty
(
"LowResTOFWorkspace"
);
if
(
m_outputLowResTOF
)
{
matrixLowResW
=
MatrixWorkspace_sptr
(
m_inputWS
->
clone
()
.
release
())
;
matrixLowResW
=
m_inputWS
->
clone
();
setProperty
(
"LowResTOFWorkspace"
,
matrixLowResW
);
}
auto
lowW
=
boost
::
dynamic_pointer_cast
<
EventWorkspace
>
(
matrixLowResW
);
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment