Skip to content
Snippets Groups Projects
Commit 54f45acc authored by Simon Heybrock's avatar Simon Heybrock
Browse files

Re #21631. MPI support for RemoveLowResTOF.

parent bd14497f
No related branches found
No related tags found
No related merge requests found
#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;
......
......@@ -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
......@@ -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``
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment