Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
ef3caa63
Commit
ef3caa63
authored
6 years ago
by
Jose Borreguero
Browse files
Options
Downloads
Patches
Plain Diff
Refs #23175 Apply clang patch
parent
5d92f045
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Framework/Algorithms/src/AppendSpectra.cpp
+6
-6
6 additions, 6 deletions
Framework/Algorithms/src/AppendSpectra.cpp
Framework/Algorithms/test/AppendSpectraTest.h
+2
-2
2 additions, 2 deletions
Framework/Algorithms/test/AppendSpectraTest.h
with
8 additions
and
8 deletions
Framework/Algorithms/src/AppendSpectra.cpp
+
6
−
6
View file @
ef3caa63
...
...
@@ -88,20 +88,21 @@ void AppendSpectra::exec() {
if
(
event_ws1
&&
event_ws2
)
{
// Both are event workspaces. Use the special method
DataObjects
::
EventWorkspace_sptr
e_output
=
this
->
execEvent
(
*
event_ws1
,
*
event_ws2
);
DataObjects
::
EventWorkspace_sptr
e_output
=
this
->
execEvent
(
*
event_ws1
,
*
event_ws2
);
for
(
int
i
=
1
;
i
<
number
;
i
++
)
{
e_output
=
this
->
execEvent
(
*
e_output
,
*
event_ws2
);
}
output
=
boost
::
dynamic_pointer_cast
<
MatrixWorkspace
>
(
e_output
);
}
else
{
// So it is a workspace 2D.
}
else
{
// So it is a workspace 2D.
// The only restriction, even with ValidateInputs=false
if
(
ws1
->
blocksize
()
!=
ws2
->
blocksize
())
throw
std
::
runtime_error
(
"Workspace2D's must have the same number of bins."
);
throw
std
::
runtime_error
(
"Workspace2D's must have the same number of bins."
);
output
=
execWS2D
(
*
ws1
,
*
ws2
);
for
(
int
i
=
1
;
i
<
number
;
i
++
)
{
output
=
execWS2D
(
*
output
,
*
ws2
);
output
=
execWS2D
(
*
output
,
*
ws2
);
}
}
...
...
@@ -113,7 +114,6 @@ void AppendSpectra::exec() {
boost
::
dynamic_pointer_cast
<
MatrixWorkspace
>
(
output
));
}
/** If there is an overlap in spectrum numbers between ws1 and ws2,
* then the spectrum numbers are reset as a simple 1-1 correspondence
* with the workspace index.
...
...
This diff is collapsed.
Click to expand it.
Framework/Algorithms/test/AppendSpectraTest.h
+
2
−
2
View file @
ef3caa63
...
...
@@ -178,7 +178,7 @@ public:
}
//----------------------------------------------------------------------------------------------
void
doTest
(
bool
event
,
bool
combineLogs
=
false
,
int
number
=
1
)
{
void
doTest
(
bool
event
,
bool
combineLogs
=
false
,
int
number
=
1
)
{
MatrixWorkspace_sptr
ws1
,
ws2
,
out
;
int
numBins
=
20
;
...
...
@@ -247,7 +247,7 @@ public:
void
test_events
()
{
doTest
(
true
);
}
void
test_number_events
()
{
doTest
(
true
,
true
,
3
);}
void
test_number_events
()
{
doTest
(
true
,
true
,
3
);
}
void
test_2D
()
{
doTest
(
false
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment