59 if (maskedWorkspace) {
60 if (std::dynamic_pointer_cast<API::IMaskWorkspace>(maskedWorkspace)) {
61 mask = maskedWorkspace;
64 extractMask->setProperty(
"InputWorkspace", maskedWorkspace);
65 extractMask->executeAsChildAlg();
66 mask = extractMask->getProperty(
"OutputWorkspace");
70 extractMask->setProperty(
"InputWorkspace", inputWorkspace);
71 extractMask->executeAsChildAlg();
72 mask = extractMask->getProperty(
"OutputWorkspace");
75 std::vector<size_t> indicesToExtract;
76 auto nSpectra = inputWorkspace->getNumberHistograms();
81 if (mask->readY(
index)[0] < 1.0) {
82 indicesToExtract.emplace_back(
index);
88 extractSpectra->setProperty(
"InputWorkspace", inputWorkspace);
89 extractSpectra->setProperty(
"WorkspaceIndexList", indicesToExtract);
90 extractSpectra->executeAsChildAlg();
virtual std::shared_ptr< Algorithm > createChildAlgorithm(const std::string &name, const double startProgress=-1., const double endProgress=-1., const bool enableLogging=true, const int &version=-1)
Create a Child Algorithm.