22const
std::
string ClearUB::name()
const {
return "ClearUB"; }
34 "Workspace to clear the UB from.");
36 "Indicates action performed. DoesClear returns true only if one or more "
37 "OrientedLattices have been removed.");
48 bool doesClear =
false;
51 this->
g_log.
notice(
"Experiment Info has no oriented lattice.");
53 this->
g_log.
notice(
"Experiment Info has an oriented lattice.");
71 bool doesClear =
false;
77 if (!experimentInfos) {
79 throw std::invalid_argument(
"Input workspace is neither of type "
80 "ExperimentInfo or MultipleExperimentInfo, "
84 const uint16_t nInfos = experimentInfos->getNumExperimentInfo();
85 for (uint16_t i = 0; i < nInfos; ++i) {
99 bool doesClear =
doExecute(ws.get(),
false );
#define DECLARE_ALGORITHM(classname)
void declareProperty(std::unique_ptr< Kernel::Property > p, const std::string &doc="") override
Add a property to the list of managed properties.
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
This class is shared by a few Workspace types and holds information related to a particular experimen...
Sample & mutableSample()
Writable version of the sample object.
Small class that allows a MDEventWorkspace or a MDHistoWorkspace to hold several ExperimentInfo class...
This class stores information about the sample used in particular run.
void clearOrientedLattice()
Delete the oriented lattice.
bool hasOrientedLattice() const
A property class for workspaces.
Base Workspace Abstract Class.
ClearUB : Clear the UB matrix from a workspace by removing the oriented lattice.
const std::string category() const override
Algorithm's category for identification.
bool doExecute(Mantid::API::Workspace *const ws, bool dryRun)
Perform the working for the algorithm.
void init() override
Initialize the algorithm's properties.
void exec() override
Execute the algorithm.
int version() const override
Algorithm's version for identification.
bool clearSingleExperimentInfo(Mantid::API::ExperimentInfo *const experimentInfo, const bool dryRun) const
Clear the Oriented Lattice from a single experiment info.
IPropertyManager * setProperty(const std::string &name, const T &value)
Templated method to set the value of a PropertyWithValue.
void notice(const std::string &msg)
Logs at notice level.
The concrete, templated class for properties.
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
std::shared_ptr< ExperimentInfo > ExperimentInfo_sptr
Shared pointer to ExperimentInfo.
@ InOut
Both an input & output workspace.
@ Output
An output workspace.