17#include "MantidDataHandling/DllConfig.h"
18#include "MantidHistogramData/BinEdges.h"
26namespace DataHandling {
48 const std::string
name()
const override {
return "LoadNexusProcessed"; }
50 const std::string
summary()
const override {
51 return "The LoadNexusProcessed algorithm will read the given Nexus "
52 "Processed data file containing a Mantid Workspace. The data is "
53 "placed in the named workspace. LoadNexusProcessed may be invoked "
54 "by LoadNexus if it is given a Nexus file of this type.";
58 int version()
const override {
return 1; };
59 const std::vector<std::string>
seeAlso()
const override {
return {
"LoadNexus"}; }
61 const std::string
category()
const override {
return "DataHandling\\Nexus"; }
74 std::map<std::string, std::string> validateInputs()
override;
78 void execLoader()
override;
81 std::string buildWorkspaceName(
const std::string &
name,
const std::string &baseName,
size_t wsIndex);
84 void correctForWorkspaceNameClash(std::string &wsName);
87 std::vector<std::string> extractWorkspaceNames(
Mantid::Nexus::NXRoot &root,
size_t nWorkspaceEntries);
95 const std::string & ) {
101 const double &progressRange);
106 template <
typename ColumnType,
typename NexusType>
111 template <
typename Type>
123 const double &progressStart,
const double &progressRange);
125 const double &progressStart,
const double &progressRange,
127 std::string &workspaceType);
135 void getWordsInString(
const std::string &words3, std::string &w1, std::string &w2, std::string &w3);
137 void getWordsInString(
const std::string &words4, std::string &w1, std::string &w2, std::string &w3, std::string &w4);
156 int64_t blocksize, int64_t nchannels, int64_t &hist, int64_t &wsIndex,
163 void checkOptionalProperties(
const std::size_t numberofspectra);
166 std::size_t calculateWorkspaceSize(
const std::size_t numberofspectra,
bool gen_filtered_list =
false);
170 const std::string &entryName,
172 const size_t nWorkspaceEntries,
const size_t p);
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.
virtual bool loadNexusGeometry(Mantid::API::Workspace &, size_t, Kernel::Logger &, const std::string &)
Load nexus geometry and apply to workspace.
int m_spec_max
The value of the spectrum_max property.
bool addSampleProperty(Mantid::Nexus::NXClass &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.
void readSampleGroup(Mantid::Nexus::NXEntry &mtd_entry, API::MatrixWorkspace_sptr local_workspace)
Read the data from the sample group.
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
The Logger class is in charge of the publishing messages from the framework through various channels.
The base class for a Nexus class (group).
Templated class implementation of NXDataSet.
Implements NXdata Nexus class.
Implements NXentry Nexus class.
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.