9#include "MantidHistogramData/Histogram.h"
37 const auto &xdata =
readX();
38 return std::pair<double, double>(xdata.front(), xdata.back());
64 this->
detectorIDs.insert(detIDs.begin(), detIDs.end());
75 this->
detectorIDs.insert(detIDs.begin(), detIDs.end());
202 throw std::runtime_error(
"Incompatible types in ISpectrum::copyDataFrom");
206 throw std::runtime_error(
"Incompatible types in ISpectrum::copyDataFrom");
211 throw std::runtime_error(
"Incompatible types in ISpectrum::copyDataFrom");
std::map< DeltaEMode::Type, std::string > index
void invalidateSpectrumDefinition(const size_t index)
Notifies the ExperimentInfo that a spectrum definition has changed.
A "spectrum" is an object that holds the data for a particular spectrum, in particular:
MatrixWorkspace * m_matrixWorkspace
void setMatrixWorkspace(MatrixWorkspace *matrixWorkspace, const size_t index)
Sets the MatrixWorkspace pointer (pointer to the owning workspace).
void addDetectorIDs(const std::set< detid_t > &detIDs)
Add a set of detector IDs to the set of detector IDs.
void invalidateSpectrumDefinition() const
Invalidates spectrum definitions in the owning workspace.
virtual MantidVec & dataY()=0
virtual const MantidVec & readX() const =0
virtual MantidVec & dataE()=0
specnum_t getSpectrumNo() const
std::set< detid_t > detectorIDs
Set of the detector IDs associated with this spectrum.
virtual std::pair< double, double > getXDataRange() const
Return the min/max X values for this spectrum.
void setDetectorIDs(const std::set< detid_t > &detIDs)
Set the detector IDs to be the set given.
bool hasDetectorID(const detid_t detID) const
Return true if the given detector ID is in the list for this ISpectrum.
virtual const MantidVec & readE() const
Deprecated, use e() instead. Returns the y error data const.
void clearDetectorIDs()
Clear the detector IDs set.
void resetHasDx()
Resets the hasDx flag.
void addDetectorID(const detid_t detID)
Add a detector ID to the set of detector IDs.
virtual HistogramData::Histogram & mutableHistogramRef()=0
bool hasDx() const
Gets the value of the use flag.
void copyInfoFrom(const ISpectrum &other)
Copy spectrum number and detector IDs, but not X vector, from another ISpectrum.
virtual const MantidVec & readY() const
Deprecated, use y() instead. Returns the y data const.
void setDetectorID(const detid_t detID)
Clear the list of detector IDs, then add one.
void invalidateCachedSpectrumNumbers() const
Invalidates cached spectrum numbers in the owning workspace.
const std::set< detid_t > & getDetectorIDs() const
Get a const reference to the detector IDs set.
virtual const HistogramData::Histogram & histogramRef() const =0
virtual void copyDataInto(DataObjects::EventList &) const
Override in child classes for polymorphic copying of data.
ISpectrum & operator=(const ISpectrum &other)
Copy assignment.
void setSpectrumNo(specnum_t num)
Sets the the spectrum number of this spectrum.
specnum_t m_specNo
The spectrum number of this spectrum.
Kernel::cow_ptr< HistogramData::HistogramDx > sharedDx() const
Base MatrixWorkspace Abstract Class.
void invalidateCachedSpectrumNumbers()
1D histogram implementation.
Helper class that implements ISpectrum.
std::vector< double > MantidVec
typedef for the data storage used in Mantid matrix workspaces
int32_t specnum_t
Typedef for a spectrum Number.