24 data.dataX().resize(1, 0.0);
25 data.setCounts(1,
value);
26 data.setCountStandardDeviations(1,
error);
27 data.setPointStandardDeviations(1, 0.0);
28 setDistribution(
true);
31 m_axes[0] = std::make_unique<API::RefAxis>(
this);
32 m_axes[1] = std::make_unique<API::SpectraAxis>(
this);
62 bool skipError)
const {
68 throw std::runtime_error(
"generateHistogram() not implemented for WorkspaceSingleValue.");
79IPropertyManager::getValue<Mantid::DataObjects::WorkspaceSingleValue_sptr>(
const std::string &name)
const {
86 "Attempt to assign property " + name +
" to incorrect type. Expected shared_ptr<WorkspaceSingleValue>.";
87 throw std::runtime_error(message);
93IPropertyManager::getValue<Mantid::DataObjects::WorkspaceSingleValue_const_sptr>(
const std::string &name)
const {
97 return prop->operator()();
100 "Attempt to assign property " + name +
" to incorrect type. Expected const shared_ptr<WorkspaceSingleValue>.";
101 throw std::runtime_error(message);
double value
The value of the point.
std::map< DeltaEMode::Type, std::string > index
#define DLLExport
Definitions of the DLLImport compiler directives for MSVC.
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
#define DECLARE_WORKSPACE(classname)
HistoWorkspace is an abstract base class for MatrixWorkspace types that are NOT event workspaces.
void setMatrixWorkspace(MatrixWorkspace *matrixWorkspace, const size_t index)
Sets the MatrixWorkspace pointer (pointer to the owning workspace).
HistogramData::Histogram histogram(const size_t index) const
Returns the Histogram at the given workspace index.
void setDistribution(bool newValue)
Set the flag for whether the Y-values are dimensioned.
1D histogram implementation.
Concrete workspace implementation.
WorkspaceSingleValue(double value=0.0, double error=0.0, const Parallel::StorageMode storageMode=Parallel::StorageMode::Cloned)
Constructor.
Histogram1D & getSpectrumWithoutInvalidation(const size_t index) override
Return the underlying Histogram1D at the given workspace index.
Histogram1D data
Instance of Histogram1D that holds the "spectrum" (AKA the single value);.
size_t getNumDims() const override
Returns the number of dimensions, 0 in this case.
void generateHistogram(const std::size_t index, const MantidVec &X, MantidVec &Y, MantidVec &E, bool skipError=false) const override
Rebin the workspace. Not implemented for this workspace.
void init(const std::size_t &NVectors, const std::size_t &XLength, const std::size_t &YLength) override
Does nothing in this case.
The concrete, templated class for properties.
std::shared_ptr< WorkspaceSingleValue > WorkspaceSingleValue_sptr
shared pointer to the WorkspaceSingleValue class
std::shared_ptr< const WorkspaceSingleValue > WorkspaceSingleValue_const_sptr
std::vector< double > MantidVec
typedef for the data storage used in Mantid matrix workspaces