From 54f45acc6f13e7297ac26c79cb97a0310f757a4a Mon Sep 17 00:00:00 2001 From: Simon Heybrock <simon.heybrock@esss.se> Date: Mon, 19 Feb 2018 12:58:20 +0100 Subject: [PATCH] Re #21631. MPI support for RemoveLowResTOF. --- .../inc/MantidAlgorithms/RemoveLowResTOF.h | 7 ++----- Framework/Algorithms/src/RemoveLowResTOF.cpp | 18 ------------------ dev-docs/source/AlgorithmMPISupport.rst | 1 + 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemoveLowResTOF.h b/Framework/Algorithms/inc/MantidAlgorithms/RemoveLowResTOF.h index 6cd9c74847f..98c2d35754d 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RemoveLowResTOF.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RemoveLowResTOF.h @@ -1,18 +1,16 @@ #ifndef REMOVELOWRESTOF_H_ #define REMOVELOWRESTOF_H_ -// includes -#include "MantidAPI/Algorithm.h" +#include "MantidAPI/DistributedAlgorithm.h" #include "MantidDataObjects/EventWorkspace.h" #include "MantidGeometry/IComponent.h" namespace Mantid { namespace Algorithms { -class DLLExport RemoveLowResTOF : public API::Algorithm { +class DLLExport RemoveLowResTOF : public API::DistributedAlgorithm { public: RemoveLowResTOF(); - ~RemoveLowResTOF() override; const std::string name() const override; int version() const override; const std::string category() const override; @@ -31,7 +29,6 @@ private: /// Pointer to the input event workspace DataObjects::EventWorkspace_const_sptr m_inputEvWS; double calcTofMin(const std::size_t, const API::SpectrumInfo &spectrumInfo); - void runMaskDetectors(); void getTminData(const bool); /// The reference value for DIFC to filter with double m_DIFCref; diff --git a/Framework/Algorithms/src/RemoveLowResTOF.cpp b/Framework/Algorithms/src/RemoveLowResTOF.cpp index 94c54d97319..016fa5f7e08 100644 --- a/Framework/Algorithms/src/RemoveLowResTOF.cpp +++ b/Framework/Algorithms/src/RemoveLowResTOF.cpp @@ -3,7 +3,6 @@ #include "MantidAPI/InstrumentValidator.h" #include "MantidAPI/RawCountValidator.h" #include "MantidAPI/SpectrumInfo.h" -#include "MantidAPI/WorkspaceFactory.h" #include "MantidAPI/WorkspaceUnitValidator.h" #include "MantidGeometry/IComponent.h" #include "MantidGeometry/Instrument.h" @@ -33,9 +32,6 @@ RemoveLowResTOF::RemoveLowResTOF() : m_inputWS(), m_inputEvWS(), m_DIFCref(0.), m_K(0.), m_Tmin(0.), m_wavelengthMin(0.), m_numberOfSpectra(0), m_outputLowResTOF(false) {} -/// Destructor -RemoveLowResTOF::~RemoveLowResTOF() {} - /// Algorithm's name for identification overriding a virtual method const string RemoveLowResTOF::name() const { return "RemoveLowResTOF"; } @@ -145,8 +141,6 @@ void RemoveLowResTOF::exec() { } m_progress->report(); } - - this->runMaskDetectors(); } /** Remove low resolution TOF from an EventWorkspace @@ -237,7 +231,6 @@ void RemoveLowResTOF::execEvent(const SpectrumInfo &spectrumInfo) { g_log.debug() << "TOF range is now " << outW->getTofMin() << " to " << outW->getTofMax() << " microseconds\n"; outW->clearMRU(); - this->runMaskDetectors(); } double RemoveLowResTOF::calcTofMin(const std::size_t workspaceIndex, @@ -302,16 +295,5 @@ void RemoveLowResTOF::getTminData(const bool isEvent) { throw std::runtime_error("Cannot have minimum time less than zero"); } -void RemoveLowResTOF::runMaskDetectors() { - IAlgorithm_sptr alg = createChildAlgorithm("MaskDetectors"); - alg->setProperty<MatrixWorkspace_sptr>("Workspace", - this->getProperty("OutputWorkspace")); - alg->setProperty<MatrixWorkspace_sptr>("MaskedWorkspace", - this->getProperty("InputWorkspace")); - if (!alg->execute()) - throw std::runtime_error( - "MaskDetectors Child Algorithm has not executed successfully"); -} - } // namespace Algorithm } // namespace Mantid diff --git a/dev-docs/source/AlgorithmMPISupport.rst b/dev-docs/source/AlgorithmMPISupport.rst index cc54db39dee..869176c7fba 100644 --- a/dev-docs/source/AlgorithmMPISupport.rst +++ b/dev-docs/source/AlgorithmMPISupport.rst @@ -606,6 +606,7 @@ PowerLawCorrection all see ``UnaryOperat RealFFT MasterOnly, Identical Rebin all RebinToWorkspace all ``WorkspaceToMatch`` must have ``StorageMode::Cloned`` +RemoveLowResTOF all RemovePromptPulse all RenameWorkspace all ReplaceSpecialValues all see ``UnaryOperation`` -- GitLab