11#include "MantidDataObjects/DllConfig.h"
28namespace DataObjects {
43 const std::string
id()
const override {
return "LeanElasticPeaksWorkspace"; }
62 std::unique_ptr<LeanElasticPeaksWorkspace>
clone()
const {
63 return std::unique_ptr<LeanElasticPeaksWorkspace>(doClone());
67 std::unique_ptr<LeanElasticPeaksWorkspace>
cloneEmpty()
const {
68 return std::unique_ptr<LeanElasticPeaksWorkspace>(doCloneEmpty());
77 void sort(std::vector<ColumnAndDirection> &criteria)
override;
79 int getNumberPeaks()
const override;
80 std::string getConvention()
const override;
81 void removePeak(
int peakNum)
override;
82 void removePeaks(std::vector<int> badPeaks)
override;
90 std::unique_ptr<Geometry::IPeak> createPeak(
const Kernel::V3D &QLabFrame,
91 std::optional<double> detectorDistance = std::nullopt)
const override;
93 std::unique_ptr<Geometry::IPeak> createPeak(
const Kernel::V3D &Position,
96 std::unique_ptr<Geometry::IPeak> createPeakQSample(
const Kernel::V3D &
position)
const override;
98 std::vector<std::pair<std::string, std::string>> peakInfo(
const Kernel::V3D &qFrame,
bool labCoords)
const override;
100 std::unique_ptr<Geometry::IPeak> createPeakHKL(
const Kernel::V3D &
HKL)
const override;
102 std::unique_ptr<Geometry::IPeak> createPeak()
const override;
104 int peakInfoNumber(
const Kernel::V3D &qFrame,
bool labCoords)
const override;
106 std::vector<LeanElasticPeak> &getPeaks();
107 const std::vector<LeanElasticPeak> &getPeaks()
const;
108 bool hasIntegratedPeaks()
const override;
109 size_t getMemorySize()
const override;
125 size_t columnCount()
const override {
return static_cast<int>(m_columns.size()); }
128 size_t rowCount()
const override {
return getNumberPeaks(); }
131 std::shared_ptr<Mantid::API::Column>
getColumn(
const std::string &
name)
override {
132 return getColumn(getColumnIndex(
name));
136 std::shared_ptr<const Mantid::API::Column>
getColumn(
const std::string &
name)
const override {
137 return getColumn(getColumnIndex(
name));
141 virtual size_t getColumnIndex(
const std::string &
name)
const;
144 std::shared_ptr<Mantid::API::Column> getColumn(
size_t index)
override;
154 std::vector<std::string>
getColumnNames()
const override {
return this->m_columnNames; }
160 void saveNexus(Nexus::File *file)
const override;
169 ITableWorkspace *doCloneColumns(
const std::vector<std::string> &colNames)
const override;
174 void addPeakColumn(
const std::string &
name);
182 "LeanElasticPeaksWorkspace structure is read-only. Cannot add column.");
185 bool addColumns(
const std::string & ,
const std::string & ,
size_t )
override {
192 "LeanElasticPeaksWorkspace structure is read-only. Cannot remove "
198 "LeanElasticPeaksWorkspace structure is read-only. Cannot setRowCount");
203 "LeanElasticPeaksWorkspace structure is read-only. Cannot insertRow");
208 "LeanElasticPeaksWorkspace structure is read-only. Cannot removeRow.");
212 void find(
size_t ,
size_t & ,
size_t )
override {
216 void find(
double ,
size_t & ,
size_t )
override {
220 void find(
float ,
size_t & ,
size_t )
override {
230 void find(
const std::string & ,
size_t & ,
size_t )
override {
246 std::vector<std::shared_ptr<Mantid::DataObjects::PeakColumn<LeanElasticPeak>>>
m_columns;
std::map< DeltaEMode::Type, std::string > index
MANTID_DATAOBJECTS_EXTERN_TEMPLATE(Mantid::Kernel::PropertyWithValue< std::shared_ptr< Mantid::DataObjects::LeanElasticPeaksWorkspace > >)
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.
The concrete, templated class for properties.
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...