13#include "MantidDataObjects/DllConfig.h"
19namespace DataObjects {
35 const std::string
id()
const override {
return "Workspace2D"; }
37 Workspace2D(
const Parallel::StorageMode storageMode = Parallel::StorageMode::Cloned);
42 std::unique_ptr<Workspace2D>
clone()
const {
return std::unique_ptr<Workspace2D>(doClone()); }
45 std::unique_ptr<Workspace2D>
cloneEmpty()
const {
return std::unique_ptr<Workspace2D>(doCloneEmpty()); }
48 bool isRaggedWorkspace()
const override;
51 std::size_t size()
const override;
53 std::size_t blocksize()
const override;
55 std::size_t getNumberBins(
const std::size_t &
index)
const override;
57 std::size_t getMaxNumberBins()
const override;
60 std::size_t getNumberHistograms()
const override;
63 invalidateCommonBinsFlag();
64 return getSpectrumWithoutInvalidation(
index);
70 bool skipError =
false)
const override;
75 void setMonitorList(
const std::vector<specnum_t> &mList) { m_monitorList = mList; }
78 void setImageY(
const API::MantidImage &image,
size_t start = 0,
bool parallelExecution =
true)
override;
80 void setImageE(
const API::MantidImage &image,
size_t start = 0,
bool parallelExecution =
true)
override;
83 bool loadAsRectImg =
false,
double scale_1 = 1.0, [[maybe_unused]]
bool parallelExecution =
true);
90 void init(
const std::size_t &NVectors,
const std::size_t &XLength,
const std::size_t &YLength)
override;
91 void init(
const HistogramData::Histogram &histogram)
override;
97 std::vector<std::unique_ptr<Histogram1D>>
data;
104 virtual std::size_t getHistogramNumberHelper()
const;
std::map< DeltaEMode::Type, std::string > index
HistoWorkspace is an abstract base class for MatrixWorkspace types that are NOT event workspaces.
1D histogram implementation.
Concrete workspace implementation.
std::vector< std::unique_ptr< Histogram1D > > data
A vector that holds the 1D histograms.
const std::string id() const override
Gets the name of the workspace type.
Workspace2D & operator=(const Workspace2D &other)=delete
~Workspace2D() override
Destructor.
std::unique_ptr< Workspace2D > clone() const
Returns a clone of the workspace.
std::vector< specnum_t > m_monitorList
a vector holding workspace index of monitors in the workspace
std::unique_ptr< Workspace2D > cloneEmpty() const
Returns a default-initialized clone of the workspace.
Histogram1D & getSpectrum(const size_t index) override
Return the underlying ISpectrum ptr at the given workspace index.
void setMonitorList(const std::vector< specnum_t > &mList)
sets the monitorWorkspace indexlist
std::vector< std::vector< double > > MantidImage
typedef for the image type
Helper class which provides the Collimation Length for SANS instruments.
std::vector< double > MantidVec
typedef for the data storage used in Mantid matrix workspaces