8#include "MantidNexusGeometry/NexusGeometrySave.h"
31 return "Saves intermediate, also known as 'processed' nexus file with data "
40 throw std::invalid_argument(
"SaveNexusESS does not currently support operations on groups");
46 NexusGeometry::LogAdapter<Kernel::Logger> adapter(&
g_log);
47 NexusGeometry::NexusGeometrySave::saveInstrument(ws, filename,
"mantid_workspace_1", adapter,
true);
48 }
catch (std::exception &e) {
49 g_log.
error(std::string(e.what()) +
" Nexus Geometry may be absent or incomplete "
50 "from processed Nexus file");
51 }
catch (H5::Exception &ex) {
52 g_log.
error(ex.getDetailMsg() +
" Nexus Geometry may be absent or incomplete "
53 "from processed Nexus file");
80 const std::string filename =
getProperty(
"Filename");
81 auto matrixWs = std::dynamic_pointer_cast<API::MatrixWorkspace>(ws);
83 throw std::runtime_error(
"SaveNexusESS expects a MatrixWorkspace as input");
#define DECLARE_ALGORITHM(classname)
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
Base MatrixWorkspace Abstract Class.
A property class for workspaces.
SaveNexusESS : Save algorithm to save a NeXus organised hdf5 file containing data and geometry from r...
int version() const override
Algorithm's version for identification.
virtual bool saveLegacyInstrument() override
const std::string category() const override
Algorithm's category for identification.
void saveNexusGeometry(const Mantid::API::MatrixWorkspace &ws, const std::string &filename)
void exec() override
Execute the algorithm.
void init() override
Initialize the algorithm's properties.
bool processGroups() override
SaveNexusESS::processGroups.
const std::string summary() const override
Algorithm's summary for use in the GUI and help.
void init() override
Overwrites Algorithm method.
void exec() override
Overwrites Algorithm method.
void error(const std::string &msg)
Logs at error level.
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
Kernel::Logger g_log("ExperimentInfo")
static logger object
Describes the direction (within an algorithm) of a Property.