11#include "MantidDataObjects/DllConfig.h"
27namespace DataObjects {
42 const std::string
id()
const override {
return "LeanElasticPeaksWorkspace"; }
61 std::unique_ptr<LeanElasticPeaksWorkspace>
clone()
const {
62 return std::unique_ptr<LeanElasticPeaksWorkspace>(doClone());
66 std::unique_ptr<LeanElasticPeaksWorkspace>
cloneEmpty()
const {
67 return std::unique_ptr<LeanElasticPeaksWorkspace>(doCloneEmpty());
76 void sort(std::vector<ColumnAndDirection> &criteria)
override;
78 int getNumberPeaks()
const override;
79 std::string getConvention()
const override;
80 void removePeak(
int peakNum)
override;
81 void removePeaks(std::vector<int> badPeaks)
override;
89 std::unique_ptr<Geometry::IPeak> createPeak(
const Kernel::V3D &QLabFrame,
90 boost::optional<double> detectorDistance = boost::none)
const override;
92 std::unique_ptr<Geometry::IPeak> createPeak(
const Kernel::V3D &Position,
95 std::unique_ptr<Geometry::IPeak> createPeakQSample(
const Kernel::V3D &
position)
const override;
97 std::vector<std::pair<std::string, std::string>> peakInfo(
const Kernel::V3D &qFrame,
bool labCoords)
const override;
99 std::unique_ptr<Geometry::IPeak> createPeakHKL(
const Kernel::V3D &
HKL)
const override;
101 std::unique_ptr<Geometry::IPeak> createPeak()
const override;
103 int peakInfoNumber(
const Kernel::V3D &qFrame,
bool labCoords)
const override;
105 std::vector<LeanElasticPeak> &getPeaks();
106 const std::vector<LeanElasticPeak> &getPeaks()
const;
107 bool hasIntegratedPeaks()
const override;
108 size_t getMemorySize()
const override;
124 size_t columnCount()
const override {
return static_cast<int>(m_columns.size()); }
127 size_t rowCount()
const override {
return getNumberPeaks(); }
130 std::shared_ptr<Mantid::API::Column>
getColumn(
const std::string &name)
override {
131 return getColumn(getColumnIndex(name));
135 std::shared_ptr<const Mantid::API::Column>
getColumn(
const std::string &name)
const override {
136 return getColumn(getColumnIndex(name));
140 virtual size_t getColumnIndex(
const std::string &name)
const;
143 std::shared_ptr<Mantid::API::Column> getColumn(
size_t index)
override;
153 std::vector<std::string>
getColumnNames()
const override {
return this->m_columnNames; }
159 void saveNexus(::NeXus::File *file)
const override;
168 ITableWorkspace *doCloneColumns(
const std::vector<std::string> &colNames)
const override;
173 void addPeakColumn(
const std::string &name);
181 "LeanElasticPeaksWorkspace structure is read-only. Cannot add column.");
184 bool addColumns(
const std::string & ,
const std::string & ,
size_t )
override {
191 "LeanElasticPeaksWorkspace structure is read-only. Cannot remove "
197 "LeanElasticPeaksWorkspace structure is read-only. Cannot setRowCount");
202 "LeanElasticPeaksWorkspace structure is read-only. Cannot insertRow");
207 "LeanElasticPeaksWorkspace structure is read-only. Cannot removeRow.");
211 void find(
size_t ,
size_t & ,
size_t )
override {
215 void find(
double ,
size_t & ,
size_t )
override {
219 void find(
float ,
size_t & ,
size_t )
override {
229 void find(
const std::string & ,
size_t & ,
size_t )
override {
245 std::vector<std::shared_ptr<Mantid::DataObjects::PeakColumn<LeanElasticPeak>>>
m_columns;
std::map< DeltaEMode::Type, std::string > index
Interface to the class Mantid::DataObjects::PeaksWorkspace.
ITableWorkspace is an implementation of Workspace in which the data are organised in columns of same ...
Structure describing a single-crystal peak.
The class LeanElasticPeaksWorkspace stores information about a set of SCD lean peaks.
void find(const std::string &, size_t &, size_t) override
find method to get the index of cellstd::string value in a table workspace
std::unique_ptr< LeanElasticPeaksWorkspace > clone() const
Returns a clone of the workspace.
void appendFile(std::string filename, Geometry::Instrument_sptr inst)
void find(API::Boolean, size_t &, size_t) override
find method to get the index of API::Boolean value cell in a table workspace
LeanElasticPeaksWorkspace * doCloneEmpty() const override
Virtual cloneEmpty method.
LeanElasticPeaksWorkspace * doClone() const override
Virtual clone method. Not implemented to force implementation in children.
void find(float, size_t &, size_t) override
find method to get the index of float cell value in a table workspace
API::Column_sptr addColumn(const std::string &, const std::string &) override
Creates a new column.
std::shared_ptr< Mantid::API::Column > getColumn(const std::string &name) override
Gets the shared pointer to a column by name.
void find(size_t, size_t &, size_t) override
find method to get the index of integer cell value in a table workspace
bool customSort() const override
Kernel::SpecialCoordinateSystem m_coordSystem
Coordinates.
std::unique_ptr< LeanElasticPeaksWorkspace > cloneEmpty() const
Returns a default-initialized clone of the workspace.
std::vector< std::string > m_columnNames
Column names.
size_t columnCount() const override
Number of columns in the workspace.
bool addColumns(const std::string &, const std::string &, size_t) override
Creates n new columns of the same type.
void setRowCount(size_t) override
Resizes the workspace.
void find(double, size_t &, size_t) override
find method to get the index of double cell value in a table workspace
size_t rowCount() const override
Number of rows in the workspace.
void removeColumn(const std::string &) override
Removes a column.
std::vector< std::shared_ptr< Mantid::DataObjects::PeakColumn< LeanElasticPeak > > > m_columns
Column shared pointers.
std::vector< LeanElasticPeak > m_peaks
Vector of Peak contained within.
std::vector< std::string > getColumnNames() const override
Returns a vector of all column names.
void removeRow(size_t) override
Delets a row if it exists.
size_t insertRow(size_t) override
Inserts a row before row pointed to by index and fills it with default vales.
LeanElasticPeaksWorkspace & operator=(const LeanElasticPeaksWorkspace &other)=delete
std::pair< std::string, bool > ColumnAndDirection
const std::string id() const override
Return the workspace typeID.
std::shared_ptr< const Mantid::API::Column > getColumn(const std::string &name) const override
Gets the shared pointer to a column by name.
void find(const Mantid::Kernel::V3D &, size_t &, size_t) override
find method to get the index of Mantid::Kernel::V3D cell value in a table workspace
bool threadSafe() const override
This is always threadsafe.
Structure describing a single-crystal peak.
Marks code as not implemented yet.
std::shared_ptr< const LogManager > LogManager_const_sptr
shared pointer to the logManager base class (const version)
std::shared_ptr< Column > Column_sptr
std::shared_ptr< LogManager > LogManager_sptr
shared pointer to the logManager base class
std::shared_ptr< ITableWorkspace > ITableWorkspace_sptr
shared pointer to Mantid::API::ITableWorkspace
std::shared_ptr< const Column > Column_const_sptr
std::shared_ptr< LeanElasticPeaksWorkspace > LeanElasticPeaksWorkspace_sptr
Typedef for a shared pointer to a peaks workspace.
std::shared_ptr< const LeanElasticPeaksWorkspace > LeanElasticPeaksWorkspace_const_sptr
Typedef for a shared pointer to a const peaks workspace.
std::shared_ptr< Instrument > Instrument_sptr
Shared pointer to an instrument object.
SpecialCoordinateSystem
Special coordinate systems for Q3D.
Helper class which provides the Collimation Length for SANS instruments.
As TableColumn stores its data in a std::vector bool type cannot be used in the same way as the other...