33 "The sample details are attached to this workspace.");
34 const std::vector<std::string> exts{
"raw",
".s*"};
35 declareProperty(std::make_unique<FileProperty>(
"Filename",
"",
FileProperty::Load, exts),
36 "The raw file containing the sample geometry information.");
46 FILE *file = fopen(filename.c_str(),
"rb");
47 if (file ==
nullptr) {
48 g_log.
error(
"Unable to open file " + filename);
53 isis_raw.ioRAW(file,
true);
57 data_ws->mutableSample().setGeometryFlag(isis_raw.spb.e_geom);
58 data_ws->mutableSample().setThickness(
static_cast<double>(isis_raw.spb.e_thick));
59 data_ws->mutableSample().setHeight(
static_cast<double>(isis_raw.spb.e_height));
60 data_ws->mutableSample().setWidth(
static_cast<double>(isis_raw.spb.e_width));
63 <<
"\tsample geometry flag: " << isis_raw.spb.e_geom <<
"\n"
64 <<
"\tsample thickness: " << data_ws->mutableSample().getThickness() <<
"\n"
65 <<
"\tsample height: " << data_ws->mutableSample().getHeight() <<
"\n"
66 <<
"\tsample width: " << data_ws->mutableSample().getWidth() <<
'\n';
#define DECLARE_ALGORITHM(classname)
std::string getPropertyValue(const std::string &name) const override
Get the value of a property as a string.
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
void progress(double p, const std::string &msg="", double estimatedTime=0.0, int progressPrecision=0)
Sends ProgressNotification.
@ Load
allowed here which will be passed to the algorithm
A property class for workspaces.
An algorithm to extract the sample details from the SPB structure within a RAW file.
void exec() override
Execution code.
Records the filename and the description of failure.
void debug(const std::string &msg)
Logs at debug level.
void error(const std::string &msg)
Logs at error level.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
@ Input
An input workspace.