21 "A list of the workspaces to delete.");
26 const std::vector<std::string> wsNames =
getProperty(
"WorkspaceList");
31 for (
const auto &wsName : wsNames) {
39 deleteAlg->initialize();
40 deleteAlg->setPropertyValue(
"Workspace", wsName);
41 auto success = deleteAlg->execute();
42 auto executed = deleteAlg->isExecuted();
43 if (!executed || !success) {
44 g_log.
error() <<
"Failed to delete " << wsName <<
".\n";
#define DECLARE_ALGORITHM(classname)
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
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.
Helper class for reporting progress from algorithms.
A simple algorithm to remove multiple workspaces from the ADS.
void exec() override
Overridden exec.
Support for a property that holds an array of values.
void error(const std::string &msg)
Logs at error level.
void report()
Increments the loop counter by 1, then sends the progress notification on behalf of its algorithm.
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...