15#include "MantidDataHandling/DllConfig.h"
16#include "MantidHistogramData/BinEdges.h"
29namespace DataHandling {
51 const std::string
name()
const override {
return "LoadNexusProcessed"; }
53 const std::string
summary()
const override {
54 return "The LoadNexusProcessed algorithm will read the given Nexus "
55 "Processed data file containing a Mantid Workspace. The data is "
56 "placed in the named workspace. LoadNexusProcessed may be invoked "
57 "by LoadNexus if it is given a Nexus file of this type.";
61 int version()
const override {
return 1; };
62 const std::vector<std::string>
seeAlso()
const override {
return {
"LoadNexus"}; }
64 const std::string
category()
const override {
return "DataHandling\\Nexus"; }
77 std::map<std::string, std::string> validateInputs()
override;
84 std::string buildWorkspaceName(
const std::string &name,
const std::string &baseName,
size_t wsIndex);
87 void correctForWorkspaceNameClash(std::string &wsName);
90 std::vector<std::string> extractWorkspaceNames(
Mantid::NeXus::NXRoot &root,
size_t nWorkspaceEntries);
97 const std::string &) {
102 const double &progressRange);
107 template <
typename ColumnType,
typename NexusType>
112 template <
typename Type>
124 const double &progressStart,
const double &progressRange);
126 const double &progressStart,
const double &progressRange,
128 std::string &workspaceType);
136 void getWordsInString(
const std::string &words3, std::string &w1, std::string &w2, std::string &w3);
138 void getWordsInString(
const std::string &words4, std::string &w1, std::string &w2, std::string &w3, std::string &w4);
147 bool hasXErrors,
int blocksize,
int nchannels,
int &hist,
154 bool hasXErrors,
int blocksize,
int nchannels,
int &hist,
int &wsIndex,
166 void checkOptionalProperties(
const std::size_t numberofspectra);
169 std::size_t calculateWorkspaceSize(
const std::size_t numberofspectra,
bool gen_filtered_list =
false);
173 const std::string &entryName,
175 const size_t nWorkspaceEntries,
const size_t p);
Defines an interface to an algorithm that loads a file so that it can take part in the automatic sele...
Base MatrixWorkspace Abstract Class.
This class stores information about the sample used in particular run.
Base Workspace Abstract Class.
Loads a workspace from a NeXus Processed entry in a NeXus file.
int m_spec_min
The value of the spectrum_min property.
bool m_interval
Flag set if interval of spectra to write is set.
const std::string summary() const override
Summary of algorithms purpose.
~LoadNexusProcessed() override
Destructor.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
HistogramData::BinEdges m_xbins
The cached x binning if we have bins.
int m_spec_max
The value of the spectrum_max property.
bool addSampleProperty(Mantid::NeXus::NXMainClass &sample_entry, const std::string &entryName, API::Sample &sampleDetails)
Add a property to the sample object.
bool m_list
Flag set if list of spectra to save is specifed.
virtual bool loadNexusGeometry(Mantid::API::Workspace &, const int, Kernel::Logger &, const std::string &)
Load nexus geometry and apply to workspace.
std::vector< int > m_filtered_spec_idxs
list of spectra filtered by min/max/list, currently used only when loading data into event_workspace
bool m_shared_bins
Does the current workspace have uniform binning.
std::vector< int > m_spec_list
The value of the spectrum_list property.
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
MantidVec m_axis1vals
Numeric values for the second axis, if applicable.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
int version() const override
Algorithm's version for identification overriding a virtual method.
std::unique_ptr<::NeXus::File > m_nexusFile
void readSampleGroup(Mantid::NeXus::NXEntry &mtd_entry, API::MatrixWorkspace_sptr local_workspace)
Read the data from the sample group.
The Logger class is in charge of the publishing messages from the framework through various channels.
Defines a wrapper around a file whose internal structure can be accessed using the NeXus API.
Templated class implementation of NXDataSet.
Implements NXdata Nexus class.
Implements NXentry Nexus class.
Main class is the one that can contain auxiliary classes.
Implements NXroot Nexus class.
void getWordsInString(const std::string &words3, std::string &w1, std::string &w2, std::string &w3)
If the first string contains exactly three words separated by spaces these words will be copied into ...
std::shared_ptr< ITableWorkspace > ITableWorkspace_sptr
shared pointer to Mantid::API::ITableWorkspace
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
bool UDlesserExecCount(const Mantid::NeXus::NXClassInfo &elem1, const Mantid::NeXus::NXClassInfo &elem2)
to sort the algorithmhistory vector
Helper class which provides the Collimation Length for SANS instruments.
std::vector< double > MantidVec
typedef for the data storage used in Mantid matrix workspaces
Information about a Nexus class.