10#include "MantidDataObjects/DllConfig.h"
14namespace DataObjects {
24 Histogram1D(HistogramData::Histogram::XMode xmode, HistogramData::Histogram::YMode ymode);
34 void copyDataFrom(
const ISpectrum &source)
override;
47 void clearData()
override;
59 virtual std::size_t
size()
const {
return m_histogram.readY().size(); }
62 bool isError()
const {
return readE().empty(); }
66 return ((readX().size() + readY().size() + readE().size()) *
sizeof(
double));
70 using ISpectrum::copyDataInto;
71 void copyDataInto(
Histogram1D &sink)
const override;
73 void checkAndSanitizeHistogram(HistogramData::Histogram &histogram)
override;
74 const HistogramData::Histogram &
histogramRef()
const override {
return m_histogram; }
const std::vector< double > & rhs
A "spectrum" is an object that holds the data for a particular spectrum, in particular:
1D histogram implementation.
Histogram1D & operator=(Histogram1D &&)=default
HistogramData::Histogram m_histogram
Histogram object holding the histogram data.
const MantidVec & dataE() const override
Deprecated, use e() instead. Returns the error data const.
const MantidVec & dataY() const override
Deprecated, use y() instead. Returns the y data const.
virtual std::size_t size() const
get pseudo size
MantidVec & dataY() override
Deprecated, use mutableY() instead. Returns the y data.
Histogram1D(const Histogram1D &)=default
Histogram1D & operator=(const Histogram1D &)=default
Histogram1D(Histogram1D &&)=default
const HistogramData::Histogram & histogramRef() const override
bool isError() const
Checks for errors.
MantidVec & dataE() override
Deprecated, use mutableE() instead. Returns the error data.
size_t getMemorySize() const override
Gets the memory size of the histogram.
HistogramData::Histogram & mutableHistogramRef() override
Implements a copy on write data template.
Helper class which provides the Collimation Length for SANS instruments.
std::vector< double > MantidVec
typedef for the data storage used in Mantid matrix workspaces