Skip to content

Commit

Permalink
Re #11619. Unit test for ExtractSpectra.
Browse files Browse the repository at this point in the history
  • Loading branch information
mantid-roman committed Apr 28, 2015
1 parent 2e0326d commit 0bd1993
Show file tree
Hide file tree
Showing 4 changed files with 384 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/Algorithms/src/CropWorkspace.cpp
Expand Up @@ -69,7 +69,7 @@ void CropWorkspace::init() {
*/
void CropWorkspace::exec() {

auto extract = createChildAlgorithm("ExtractSpectra");
auto extract = createChildAlgorithm("ExtractSpectra", 0, 1);
extract->initialize();
extract->setRethrows(true);

Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/Algorithms/src/ExtractSpectra.cpp
Expand Up @@ -29,7 +29,7 @@ DECLARE_ALGORITHM(ExtractSpectra)
/** Constructor
*/
ExtractSpectra::ExtractSpectra()
: Algorithm(), m_minX(0), m_maxX(0), //m_minSpec(-1), m_maxSpec(-1),
: Algorithm(), m_minX(0), m_maxX(0),
m_commonBoundaries(false), m_histogram(false), m_croppingInX(false) {}

//----------------------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/Algorithms/src/RemoveMaskedSpectra.cpp
Expand Up @@ -80,7 +80,7 @@ void RemoveMaskedSpectra::exec() {
std::vector<specid_t> indices;
makeIndexList(indices, maskedWorkspace.get());

auto extract = createChildAlgorithm("ExtractSpectra");
auto extract = createChildAlgorithm("ExtractSpectra", 0, 1);
extract->initialize();
extract->setRethrows(true);

Expand Down Expand Up @@ -114,7 +114,7 @@ void RemoveMaskedSpectra::makeIndexList(
} catch (Exception::NotFoundError &) {
continue;
}
if (det->isMasked()) {
if (!det->isMasked()) {
indices.push_back(static_cast<specid_t>(i));
}
}
Expand Down

0 comments on commit 0bd1993

Please sign in to comment.