Mantid
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::DataObjects::LeanElasticPeaksWorkspace Class Reference

The class LeanElasticPeaksWorkspace stores information about a set of SCD lean peaks. More...

#include <LeanElasticPeaksWorkspace.h>

Inheritance diagram for Mantid::DataObjects::LeanElasticPeaksWorkspace:
Mantid::API::IPeaksWorkspace Mantid::API::ITableWorkspace Mantid::API::ExperimentInfo Mantid::API::Workspace Mantid::Kernel::DataItem

Public Types

using ColumnAndDirection = std::pair< std::string, bool >
 

Public Member Functions

void addPeak (const Geometry::IPeak &peak) override
 Add a peak to the list. More...
 
void addPeak (const Kernel::V3D &position, const Kernel::SpecialCoordinateSystem &frame) override
 Add a peak to the list. More...
 
void addPeak (LeanElasticPeak &&peak)
 Move a peak object into this peaks workspace. More...
 
void appendFile (std::string filename, Geometry::Instrument_sptr inst)
 
std::unique_ptr< LeanElasticPeaksWorkspaceclone () const
 Returns a clone of the workspace. More...
 
std::unique_ptr< LeanElasticPeaksWorkspacecloneEmpty () const
 Returns a default-initialized clone of the workspace. More...
 
size_t columnCount () const override
 Number of columns in the workspace. More...
 
API::ITableWorkspace_sptr createDetectorTable () const override
 Creates a new TableWorkspace giving the IDs of the detectors that contribute to the peaks within the workspace. More...
 
std::unique_ptr< Geometry::IPeakcreatePeak () const override
 Create a Peak using default values. More...
 
std::unique_ptr< Geometry::IPeakcreatePeak (const Kernel::V3D &Position, const Kernel::SpecialCoordinateSystem &frame) const override
 Creates an instance of a Peak BUT DOES NOT ADD IT TO THE WORKSPACE. More...
 
std::unique_ptr< Geometry::IPeakcreatePeak (const Kernel::V3D &QLabFrame, boost::optional< double > detectorDistance=boost::none) const override
 Creates an instance of a Peak BUT DOES NOT ADD IT TO THE WORKSPACE. More...
 
std::unique_ptr< Geometry::IPeakcreatePeakHKL (const Kernel::V3D &HKL) const override
 Create a Peak from a HKL value provided by the client. More...
 
std::unique_ptr< Geometry::IPeakcreatePeakQSample (const Kernel::V3D &position) const override
 Creates an instance of a Peak BUT DOES NOT ADD IT TO THE WORKSPACE. More...
 
bool customSort () const override
 
std::shared_ptr< const Mantid::API::ColumngetColumn (const std::string &name) const override
 Gets the shared pointer to a column by name. More...
 
std::shared_ptr< Mantid::API::ColumngetColumn (const std::string &name) override
 Gets the shared pointer to a column by name. More...
 
API::Column_const_sptr getColumn (size_t index) const override
 Gets the shared pointer to a column by index - return none-modifyable column. More...
 
std::shared_ptr< Mantid::API::ColumngetColumn (size_t index) override
 Gets the shared pointer to a column by index. More...
 
virtual size_t getColumnIndex (const std::string &name) const
 
std::vector< std::string > getColumnNames () const override
 Returns a vector of all column names. More...
 
std::string getConvention () const override
 
API::LogManager_const_sptr getLogs () const override
 Get constant access to shared pointer containing workspace porperties; Copies logs into new LogManager variable Meaningfull only for some multithereaded methods when a thread wants to have its own copy of logs. More...
 
size_t getMemorySize () const override
 Return the memory used in bytes. More...
 
int getNumberPeaks () const override
 
const LeanElasticPeakgetPeak (int peakNum) const override
 Return a const reference to the Peak. More...
 
LeanElasticPeakgetPeak (int peakNum) override
 Return a reference to the Peak. More...
 
std::vector< LeanElasticPeak > & getPeaks ()
 Return a reference to the Peaks vector. More...
 
const std::vector< LeanElasticPeak > & getPeaks () const
 Return a const reference to the Peaks vector. More...
 
Kernel::SpecialCoordinateSystem getSpecialCoordinateSystem () const override
 Get the special coordinate system. More...
 
bool hasIntegratedPeaks () const override
 Getter for the integration status. More...
 
const std::string id () const override
 Return the workspace typeID. More...
 
 LeanElasticPeaksWorkspace ()
 Register the workspace as a type. More...
 
API::LogManager_sptr logs () override
 Get access to shared pointer containing workspace porperties. More...
 
LeanElasticPeaksWorkspaceoperator= (const LeanElasticPeaksWorkspace &other)=delete
 
std::vector< std::pair< std::string, std::string > > peakInfo (const Kernel::V3D &qFrame, bool labCoords) const override
 Returns selected information for a "peak" at QLabFrame. More...
 
int peakInfoNumber (const Kernel::V3D &qFrame, bool labCoords) const override
 Returns selected information for a "peak" at QLabFrame. More...
 
void removePeak (int peakNum) override
 Removes the indicated peak. More...
 
void removePeaks (std::vector< int > badPeaks) override
 Removes multiple peaks. More...
 
size_t rowCount () const override
 Number of rows in the workspace. More...
 
void saveNexus (::NeXus::File *file) const override
 
void setCoordinateSystem (const Kernel::SpecialCoordinateSystem coordinateSystem) override
 Set the special coordinate system. More...
 
void sort (std::vector< ColumnAndDirection > &criteria) override
 Sort the peaks by one or more criteria. More...
 
bool threadSafe () const override
 This is always threadsafe. More...
 
- Public Member Functions inherited from Mantid::API::IPeaksWorkspace
virtual void addPeak (const Kernel::V3D &position, const Kernel::SpecialCoordinateSystem &frame)=0
 Add a peak to the list. More...
 
virtual void addPeak (const Mantid::Geometry::IPeak &ipeak)=0
 Add a peak to the list. More...
 
IPeaksWorkspace_uptr clone () const
 Returns a clone of the workspace. More...
 
virtual API::ITableWorkspace_sptr createDetectorTable () const =0
 Creates a new TableWorkspace giving the IDs of the detectors that contribute to the peak. More...
 
virtual std::unique_ptr< Geometry::IPeakcreatePeak () const =0
 Create an instance of a peak using default constructor. More...
 
virtual std::unique_ptr< Mantid::Geometry::IPeakcreatePeak (const Mantid::Kernel::V3D &position, const Mantid::Kernel::SpecialCoordinateSystem &frame) const =0
 Create an instance of a Peak. More...
 
virtual std::unique_ptr< Geometry::IPeakcreatePeak (const Mantid::Kernel::V3D &QLabFrame, boost::optional< double > detectorDistance=boost::none) const =0
 Create an instance of a Peak. More...
 
virtual std::unique_ptr< Geometry::IPeakcreatePeakHKL (const Mantid::Kernel::V3D &HKL) const =0
 Create an instance of a peak using a V3D. More...
 
virtual std::unique_ptr< Mantid::Geometry::IPeakcreatePeakQSample (const Mantid::Kernel::V3D &position) const =0
 Create an instance of a Peak. More...
 
virtual std::string getConvention () const =0
 
virtual int getNumberPeaks () const =0
 
virtual const Mantid::Geometry::IPeakgetPeak (int peakNum) const =0
 Return a reference to the Peak (const version) More...
 
virtual Mantid::Geometry::IPeakgetPeak (int peakNum)=0
 Return a reference to the Peak. More...
 
Mantid::Geometry::IPeakgetPeakPtr (const int peakNum)
 Return a pointer to the Peak. More...
 
virtual Kernel::SpecialCoordinateSystem getSpecialCoordinateSystem () const =0
 Get the special coordinate system. More...
 
virtual bool hasIntegratedPeaks () const =0
 Determine if the workspace has been integrated using a peaks integration algorithm. More...
 
 IPeaksWorkspace ()
 Ctor. More...
 
IPeaksWorkspaceoperator= (const IPeaksWorkspace &other)=delete
 
virtual std::vector< std::pair< std::string, std::string > > peakInfo (const Kernel::V3D &QFrame, bool labCoords) const =0
 
virtual int peakInfoNumber (const Kernel::V3D &qLabFrame, bool labCoords) const =0
 
virtual void removePeak (int peakNum)=0
 Removes the indicated peak. More...
 
virtual void removePeaks (std::vector< int > badPeaks)=0
 
virtual void saveNexus (::NeXus::File *file) const =0
 
virtual void setCoordinateSystem (const Kernel::SpecialCoordinateSystem coordinateSystem)=0
 Set the special coordinate system. More...
 
- Public Member Functions inherited from Mantid::API::ITableWorkspace
virtual Column_sptr addColumn (const std::string &type, const std::string &name)=0
 Creates a new column. More...
 
virtual bool addColumns (const std::string &type, const std::string &name, size_t n)
 Creates n new columns of the same type. More...
 
TableRowHelper appendRow ()
 Appends a row. More...
 
BooleanBool (size_t row, size_t col)
 Get the reference to the element in row row and column col if its type is bool. More...
 
template<class T >
T & cell (size_t row, size_t col)
 Get the reference to the element in row row and column col. More...
 
ITableWorkspace_uptr clone () const
 Returns a clone of the workspace. More...
 
ITableWorkspace_uptr cloneColumns (const std::vector< std::string > &colNames) const
 Returns a clone of the workspace. More...
 
ITableWorkspace_uptr cloneEmpty () const
 Returns a default-initialized clone of the workspace. More...
 
virtual size_t columnCount () const =0
 Number of columns in the workspace. More...
 
virtual bool customSort () const
 Does this type of TableWorkspace need a custom sorting call (e.g. More...
 
double & Double (size_t row, size_t col)
 Get the reference to the element in row row and column col if its type is double. More...
 
virtual void find (API::Boolean value, size_t &row, size_t col)=0
 find method to get the index of API::Boolean value cell in a table workspace More...
 
virtual void find (const Mantid::Kernel::V3D &value, size_t &row, size_t col)=0
 find method to get the index of Mantid::Kernel::V3D cell value in a table workspace More...
 
virtual void find (const std::string &value, size_t &row, size_t col)=0
 find method to get the index of cellstd::string value in a table workspace More...
 
virtual void find (double value, size_t &row, size_t col)=0
 find method to get the index of double cell value in a table workspace More...
 
virtual void find (float value, size_t &row, size_t col)=0
 find method to get the index of float cell value in a table workspace More...
 
virtual void find (size_t value, size_t &row, size_t col)=0
 find method to get the index of integer cell value in a table workspace More...
 
virtual Column_const_sptr getColumn (const std::string &name) const =0
 Gets the shared pointer to a column by name. More...
 
virtual Column_sptr getColumn (const std::string &name)=0
 Gets the shared pointer to a column by name. More...
 
virtual Column_const_sptr getColumn (size_t index) const =0
 Gets the shared pointer to a column by index - return none-modifyable column. More...
 
virtual Column_sptr getColumn (size_t index)=0
 Gets the shared pointer to a column by index. More...
 
virtual std::vector< std::string > getColumnNames () const =0
 Returns a vector of all column names. More...
 
TableRowHelper getFirstRow ()
 Creates a TableRow object for the first row (row == 0). More...
 
virtual API::LogManager_const_sptr getLogs () const =0
 Get constant access to shared pointer containing workspace properties. More...
 
template<class T >
T & getRef (const std::string &name, size_t index)
 Get a reference to a data element. More...
 
TableRowHelper getRow (size_t row)
 Creates a TableRow object for row row. More...
 
TableColumnHelper getVector (const std::string &name)
 Access the column with name name trough a ColumnVector object. More...
 
TableConstColumnHelper getVector (const std::string &name) const
 Access the column with name name trough a ColumnVector object. More...
 
const std::string id () const override
 Return the workspace typeID. More...
 
virtual size_t insertRow (size_t index)=0
 Inserts a row before row pointed to by index and fills it with default vales. More...
 
int & Int (size_t row, size_t col)
 Get the reference to the element in row row and column col if its type is int. More...
 
 ITableWorkspace ()
 Constructor. More...
 
virtual API::LogManager_sptr logs ()=0
 Get access to shared pointer containing workspace properties. More...
 
void modified ()
 If the workspace is the AnalysisDataService sends AfterReplaceNotification. More...
 
ITableWorkspaceoperator= (const ITableWorkspace &)=delete
 
virtual void removeColumn (const std::string &name)=0
 Removes a column. More...
 
virtual void removeRow (size_t index)=0
 Delets a row if it exists. More...
 
virtual size_t rowCount () const =0
 Number of rows in the workspace. More...
 
virtual void setRowCount (size_t count)=0
 Resizes the workspace. More...
 
virtual void sort (std::vector< std::pair< std::string, bool > > &criteria)
 Overridable method to custom-sort the workspace. More...
 
std::string & String (size_t row, size_t col)
 Get the reference to the element in row row and column col if its type is std::string. More...
 
const std::string toString () const override
 Serializes the object to a string. More...
 
- Public Member Functions inherited from Mantid::API::Workspace
Workspace_uptr clone () const
 Returns a clone (copy) of the workspace with covariant return type in all derived classes. More...
 
Workspace_uptr cloneEmpty () const
 Returns a default-initialized clone of the workspace. More...
 
const std::string & getComment () const
 Get the workspace comment. More...
 
const WorkspaceHistorygetHistory () const
 Returns a reference to the WorkspaceHistory const. More...
 
virtual size_t getMemorySize () const =0
 Get the footprint in memory in bytes. More...
 
std::string getMemorySizeAsStr () const
 Returns the memory footprint in sensible units. More...
 
const std::string & getName () const override
 Get the workspace name. More...
 
virtual const std::string getTitle () const
 Get the workspace title. More...
 
WorkspaceHistoryhistory ()
 Returns a reference to the WorkspaceHistory. More...
 
bool isDirty (const int n=1) const
 Check whether other algorithms have been applied to the workspace by checking the history length. More...
 
virtual bool isGroup () const
 
Workspaceoperator= (const Workspace &other)=delete
 
void setComment (const std::string &)
 Set the comment field of the workspace. More...
 
virtual void setTitle (const std::string &)
 Set the title of the workspace. More...
 
Parallel::StorageMode storageMode () const
 Returns the storage mode (used for MPI runs) More...
 
bool threadSafe () const override
 Marks the workspace as safe for multiple threads to edit data simutaneously. More...
 
 Workspace (const Parallel::StorageMode storageMode=Parallel::StorageMode::Cloned)
 
 ~Workspace ()
 
- Public Member Functions inherited from Mantid::Kernel::DataItem
 DataItem ()
 Default constructor. More...
 
 DataItem (const DataItem &other)
 Copy constructor Always makes a unique lock. More...
 
virtual ~DataItem ()
 Destructor. More...
 
void readLock ()
 Acquires a read lock. More...
 
void unlock ()
 
- Public Member Functions inherited from Mantid::API::ExperimentInfo
virtual ExperimentInfocloneExperimentInfo () const
 Clone us. More...
 
const Geometry::ComponentInfocomponentInfo () const
 
const Geometry::ParameterMapconstInstrumentParameters () const
 Const version. More...
 
void copyExperimentInfoFrom (const ExperimentInfo *other)
 Copy everything from the given experiment object. More...
 
const Geometry::DetectorInfodetectorInfo () const
 Return a const reference to the DetectorInfo object. More...
 
 ExperimentInfo ()
 Default constructor. More...
 
 ExperimentInfo (const ExperimentInfo &)
 Copy constructor. More...
 
std::string getAvailableWorkspaceEndDate () const
 Return workspace end date as a formatted string (strftime style, as returned by Kernel::DateAdnTime) string, if available. More...
 
std::string getAvailableWorkspaceStartDate () const
 Return workspace start date as a formatted string (strftime, as returned by Types::Core::DateAndTime) string, if available. More...
 
double getEFixed (const detid_t detID) const
 Easy access to the efixed value for this run & detector ID. More...
 
double getEFixed (const std::shared_ptr< const Geometry::IDetector > &detector=std::shared_ptr< const Geometry::IDetector >{nullptr}) const
 Easy access to the efixed value for this run & optional detector. More...
 
double getEFixedForIndirect (const std::shared_ptr< const Geometry::IDetector > &detector, const std::vector< std::string > &parameterNames) const
 
double getEFixedGivenEMode (const std::shared_ptr< const Geometry::IDetector > &detector, const Kernel::DeltaEMode::Type emode) const
 Easy access to the efixed value for this run & detector. More...
 
Kernel::DeltaEMode::Type getEMode () const
 Returns the emode for this run. More...
 
Geometry::Instrument_const_sptr getInstrument () const
 Returns the parameterized instrument. More...
 
Kernel::PropertygetLog (const std::string &log) const
 Access a log for this experiment. More...
 
double getLogAsSingleValue (const std::string &log) const
 Access a single value from a log for this experiment. More...
 
int getRunNumber () const
 Utility method to get the run number. More...
 
std::string getWorkspaceStartDate () const
 Returns the start date for this experiment (or current time if no info available) More...
 
Geometry::ParameterMapinstrumentParameters ()
 Returns a modifiable set of instrument parameters. More...
 
const Geometry::ParameterMapinstrumentParameters () const
 Returns the set of parameters modifying the base instrument (const-version) More...
 
void invalidateSpectrumDefinition (const size_t index)
 Notifies the ExperimentInfo that a spectrum definition has changed. More...
 
void loadExperimentInfoNexus (const std::string &nxFilename, ::NeXus::File *file, std::string &parameterStr)
 Loads an experiment description from the open NeXus file. More...
 
void loadExperimentInfoNexus (const std::string &nxFilename, ::NeXus::File *file, std::string &parameterStr, const Mantid::Kernel::NexusHDF5Descriptor &fileInfo, const std::string &prefix)
 
void loadInstrumentInfoNexus (const std::string &nxFilename, ::NeXus::File *file)
 Load the instrument from an open NeXus file without reading any parameters. More...
 
void loadInstrumentInfoNexus (const std::string &nxFilename, ::NeXus::File *file, std::string &parameterStr)
 Load the instrument from an open NeXus file. More...
 
void loadInstrumentParametersNexus (::NeXus::File *file, std::string &parameterStr)
 Load instrument parameters from an open Nexus file in Instument group if found there. More...
 
void loadSampleAndLogInfoNexus (::NeXus::File *file)
 Load the sample and log info from an open NeXus file. More...
 
void loadSampleAndLogInfoNexus (::NeXus::File *file, const Mantid::Kernel::NexusHDF5Descriptor &fileInfo, const std::string &prefix)
 Load the sample and log info from an open NeXus file. More...
 
Geometry::ComponentInfomutableComponentInfo ()
 
Geometry::DetectorInfomutableDetectorInfo ()
 Return a non-const reference to the DetectorInfo object. More...
 
RunmutableRun ()
 Writable version of the run object. More...
 
SamplemutableSample ()
 Writable version of the sample object. More...
 
SpectrumInfomutableSpectrumInfo ()
 Return a non-const reference to the SpectrumInfo object. More...
 
ExperimentInfooperator= (const ExperimentInfo &)
 Implements the copy assignment operator. More...
 
void populateInstrumentParameters ()
 Add parameters to the instrument parameter map that are defined in instrument definition file or parameter file, which may contain parameters that require logfile data to be available. More...
 
void readParameterMap (const std::string &parameterStr)
 Populate the parameter map given a string. More...
 
const Runrun () const
 Run details object access. More...
 
const Samplesample () const
 Sample accessors. More...
 
void saveExperimentInfoNexus (::NeXus::File *file, bool saveInstrument, bool saveSample, bool saveLogs) const
 Saves this experiment description to the open NeXus file. More...
 
void saveExperimentInfoNexus (::NeXus::File *file, bool saveLegacyInstrument=true) const
 Saves this experiment description to the open NeXus file. More...
 
void setDetectorGrouping (const size_t index, const std::set< detid_t > &detIDs) const
 Sets the detector grouping for the spectrum with the given index. More...
 
void setEFixed (const detid_t detID, const double value)
 Set the efixed value for a given detector ID. More...
 
void setInstrument (const Geometry::Instrument_const_sptr &instr)
 Instrument accessors. More...
 
void setNumberOfDetectorGroups (const size_t count) const
 Sets the number of detector groups. More...
 
void setSharedRun (Kernel::cow_ptr< Run > run)
 Set the run object. Use in particular to clear run without copying old run. More...
 
Kernel::cow_ptr< RunsharedRun ()
 Return the cow ptr of the run. More...
 
const SpectrumInfospectrumInfo () const
 Return a reference to the SpectrumInfo object. More...
 
const std::string toString () const
 Returns a string description of the object. More...
 
void updateSpectrumDefinitionIfNecessary (const size_t index) const
 
virtual ~ExperimentInfo ()
 Virtual destructor. More...
 

Protected Member Functions

 LeanElasticPeaksWorkspace (const LeanElasticPeaksWorkspace &other)
 Protected copy constructor. May be used by childs for cloning. More...
 
- Protected Member Functions inherited from Mantid::API::IPeaksWorkspace
 IPeaksWorkspace (const IPeaksWorkspace &)=default
 Protected copy constructor. May be used by childs for cloning. More...
 
const std::string toString () const override
 Serializes the object to a string. More...
 
- Protected Member Functions inherited from Mantid::API::ITableWorkspace
void insertInColumn (Column *c, size_t index)
 Insert a new element into a column. More...
 
 ITableWorkspace (const ITableWorkspace &)=default
 Protected copy constructor. May be used by childs for cloning. More...
 
void removeFromColumn (Column *c, size_t index)
 Remove an element from a column. More...
 
void resizeColumn (Column *c, size_t size)
 Resize a column. More...
 
- Protected Member Functions inherited from Mantid::API::Workspace
void setStorageMode (Parallel::StorageMode mode)
 Sets the storage mode (used for MPI runs) More...
 
 Workspace (const Workspace &)
 Protected copy constructor. May be used by childs for cloning. More...
 
- Protected Member Functions inherited from Mantid::Kernel::DataItem
Poco::RWLock * getLock () const
 Private method to access the RWLock object. More...
 
- Protected Member Functions inherited from Mantid::API::ExperimentInfo
size_t numberOfDetectorGroups () const
 Returns the number of detector groups. More...
 
virtual void populateIfNotLoaded () const
 Called as the first operation of most public methods. More...
 
void setSpectrumDefinitions (Kernel::cow_ptr< std::vector< SpectrumDefinition > > spectrumDefinitions)
 Sets the SpectrumDefinition for all spectra. More...
 
virtual void updateCachedDetectorGrouping (const size_t index) const
 Update detector grouping for spectrum with given index. More...
 

Private Member Functions

API::Column_sptr addColumn (const std::string &, const std::string &) override
 Creates a new column. More...
 
bool addColumns (const std::string &, const std::string &, size_t) override
 Creates n new columns of the same type. More...
 
void addPeakColumn (const std::string &name)
 Adds a new PeakColumn of the given type. More...
 
LeanElasticPeaksWorkspacedoClone () const override
 Virtual clone method. Not implemented to force implementation in children. More...
 
ITableWorkspacedoCloneColumns (const std::vector< std::string > &colNames) const override
 
LeanElasticPeaksWorkspacedoCloneEmpty () const override
 Virtual cloneEmpty method. More...
 
void find (API::Boolean, size_t &, size_t) override
 find method to get the index of API::Boolean value cell in a table workspace More...
 
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 More...
 
void find (const std::string &, size_t &, size_t) override
 find method to get the index of cellstd::string value in a table workspace More...
 
void find (double, size_t &, size_t) override
 find method to get the index of double cell value in a table workspace More...
 
void find (float, size_t &, size_t) override
 find method to get the index of float cell value in a table workspace More...
 
void find (size_t, size_t &, size_t) override
 find method to get the index of integer cell value in a table workspace More...
 
void initColumns ()
 Initialize the table structure. More...
 
size_t insertRow (size_t) override
 Inserts a row before row pointed to by index and fills it with default vales. More...
 
void removeColumn (const std::string &) override
 Removes a column. More...
 
void removeRow (size_t) override
 Delets a row if it exists. More...
 
void setRowCount (size_t) override
 Resizes the workspace. More...
 

Private Attributes

std::vector< std::string > m_columnNames
 Column names. More...
 
std::vector< std::shared_ptr< Mantid::DataObjects::PeakColumn< LeanElasticPeak > > > m_columns
 Column shared pointers. More...
 
Kernel::SpecialCoordinateSystem m_coordSystem
 Coordinates. More...
 
std::vector< LeanElasticPeakm_peaks
 Vector of Peak contained within. More...
 

Additional Inherited Members

- Public Attributes inherited from Mantid::API::IPeaksWorkspace
std::string m_convention
 
- Protected Attributes inherited from Mantid::API::ExperimentInfo
std::shared_ptr< Geometry::ParameterMapm_parmap
 Parameters modifying the base instrument. More...
 
Geometry::Instrument_const_sptr sptr_instrument
 The base (unparametrized) instrument. More...
 

Detailed Description

The class LeanElasticPeaksWorkspace stores information about a set of SCD lean peaks.

Author
Ruth Mikkelson, SNS ORNL
Date
3/10/2010

Definition at line 37 of file LeanElasticPeaksWorkspace.h.

Member Typedef Documentation

◆ ColumnAndDirection

Definition at line 39 of file LeanElasticPeaksWorkspace.h.

Constructor & Destructor Documentation

◆ LeanElasticPeaksWorkspace() [1/2]

Mantid::DataObjects::LeanElasticPeaksWorkspace::LeanElasticPeaksWorkspace ( )

Register the workspace as a type.

Constructor. Create a table with all the required columns.

Returns
LeanElasticPeaksWorkspace object

Definition at line 37 of file LeanElasticPeaksWorkspace.cpp.

◆ LeanElasticPeaksWorkspace() [2/2]

Mantid::DataObjects::LeanElasticPeaksWorkspace::LeanElasticPeaksWorkspace ( const LeanElasticPeaksWorkspace other)
protected

Protected copy constructor. May be used by childs for cloning.

Copy constructor.

Parameters
other:: other LeanElasticPeaksWorkspace to copy from

Definition at line 50 of file LeanElasticPeaksWorkspace.cpp.

References initColumns(), and Mantid::API::ExperimentInfo::setNumberOfDetectorGroups().

Member Function Documentation

◆ addColumn()

API::Column_sptr Mantid::DataObjects::LeanElasticPeaksWorkspace::addColumn ( const std::string &  type,
const std::string &  name 
)
inlineoverrideprivatevirtual

Creates a new column.

Parameters
type:: The datatype of the column
name:: The name to assign to the column
Returns
True if the column was successfully added

Implements Mantid::API::ITableWorkspace.

Definition at line 179 of file LeanElasticPeaksWorkspace.h.

◆ addColumns()

bool Mantid::DataObjects::LeanElasticPeaksWorkspace::addColumns ( const std::string &  type,
const std::string &  name,
size_t  n 
)
inlineoverrideprivatevirtual

Creates n new columns of the same type.

Parameters
type:: The datatype of the column
name:: The name to assign to the column
n:: The number of columns to create
Returns
True if the column was successfully added

Reimplemented from Mantid::API::ITableWorkspace.

Definition at line 184 of file LeanElasticPeaksWorkspace.h.

◆ addPeak() [1/3]

void Mantid::DataObjects::LeanElasticPeaksWorkspace::addPeak ( const Geometry::IPeak ipeak)
overridevirtual

Add a peak to the list.

Parameters
ipeak:: Peak object to add (copy) into this.

Implements Mantid::API::IPeaksWorkspace.

Definition at line 149 of file LeanElasticPeaksWorkspace.cpp.

References m_peaks.

Referenced by addPeak().

◆ addPeak() [2/3]

void Mantid::DataObjects::LeanElasticPeaksWorkspace::addPeak ( const Kernel::V3D position,
const Kernel::SpecialCoordinateSystem frame 
)
overridevirtual

Add a peak to the list.

Parameters
position:: position on the peak in the specified coordinate frame
frame:: the coordinate frame that the position is specified in

Implements Mantid::API::IPeaksWorkspace.

Definition at line 162 of file LeanElasticPeaksWorkspace.cpp.

References addPeak(), createPeak(), and position.

◆ addPeak() [3/3]

void Mantid::DataObjects::LeanElasticPeaksWorkspace::addPeak ( LeanElasticPeak &&  peak)

Move a peak object into this peaks workspace.

Add a peak to the list.

Parameters
peak:: Peak object to add (move) into this.

Definition at line 171 of file LeanElasticPeaksWorkspace.cpp.

References m_peaks.

◆ addPeakColumn()

void Mantid::DataObjects::LeanElasticPeaksWorkspace::addPeakColumn ( const std::string &  name)
private

Adds a new PeakColumn of the given type.

Add a PeakColumn.

Parameters
name:: The name of the column

Definition at line 377 of file LeanElasticPeaksWorkspace.cpp.

References m_columnNames, m_columns, and m_peaks.

Referenced by initColumns().

◆ appendFile()

void Mantid::DataObjects::LeanElasticPeaksWorkspace::appendFile ( std::string  filename,
Geometry::Instrument_sptr  inst 
)

◆ clone()

std::unique_ptr< LeanElasticPeaksWorkspace > Mantid::DataObjects::LeanElasticPeaksWorkspace::clone ( ) const
inline

Returns a clone of the workspace.

Definition at line 61 of file LeanElasticPeaksWorkspace.h.

◆ cloneEmpty()

std::unique_ptr< LeanElasticPeaksWorkspace > Mantid::DataObjects::LeanElasticPeaksWorkspace::cloneEmpty ( ) const
inline

Returns a default-initialized clone of the workspace.

Definition at line 66 of file LeanElasticPeaksWorkspace.h.

◆ columnCount()

size_t Mantid::DataObjects::LeanElasticPeaksWorkspace::columnCount ( ) const
inlineoverridevirtual

Number of columns in the workspace.

Implements Mantid::API::ITableWorkspace.

Definition at line 124 of file LeanElasticPeaksWorkspace.h.

◆ createDetectorTable()

API::ITableWorkspace_sptr Mantid::DataObjects::LeanElasticPeaksWorkspace::createDetectorTable ( ) const
overridevirtual

Creates a new TableWorkspace giving the IDs of the detectors that contribute to the peaks within the workspace.

Creates a new TableWorkspace with detailing the contributing Detector IDs.

The table will have 2 columns: Index & DetectorID, where Index maps into the current index within the LeanElasticPeaksWorkspace of the peak

Implements Mantid::API::IPeaksWorkspace.

Definition at line 348 of file LeanElasticPeaksWorkspace.cpp.

◆ createPeak() [1/3]

std::unique_ptr< IPeak > Mantid::DataObjects::LeanElasticPeaksWorkspace::createPeak ( ) const
overridevirtual

Create a Peak using default values.

Returns
a point to a new peak object

Implements Mantid::API::IPeaksWorkspace.

Definition at line 295 of file LeanElasticPeaksWorkspace.cpp.

Referenced by addPeak(), and createPeak().

◆ createPeak() [2/3]

std::unique_ptr< Geometry::IPeak > Mantid::DataObjects::LeanElasticPeaksWorkspace::createPeak ( const Kernel::V3D position,
const Kernel::SpecialCoordinateSystem frame 
) const
overridevirtual

Creates an instance of a Peak BUT DOES NOT ADD IT TO THE WORKSPACE.

Parameters
position:: position of the center of the peak, in reciprocal space
frame:: the coordinate system that the position is specified in detector. You do NOT need to explicitly provide this distance.
Returns
a pointer to a new Peak object.

Implements Mantid::API::IPeaksWorkspace.

Definition at line 217 of file LeanElasticPeaksWorkspace.cpp.

References createPeak(), createPeakHKL(), createPeakQSample(), Mantid::Kernel::HKL, position, and Mantid::Kernel::QLab.

◆ createPeak() [3/3]

std::unique_ptr< Geometry::IPeak > Mantid::DataObjects::LeanElasticPeaksWorkspace::createPeak ( const Kernel::V3D QLabFrame,
boost::optional< double >  detectorDistance = boost::none 
) const
overridevirtual

Creates an instance of a Peak BUT DOES NOT ADD IT TO THE WORKSPACE.

Parameters
QLabFrame:: Q of the center of the peak, in reciprocal space
detectorDistance:: optional distance between the sample and the detector. You do NOT need to explicitly provide this distance.
Returns
a pointer to a new Peak object.

Implements Mantid::API::IPeaksWorkspace.

Definition at line 204 of file LeanElasticPeaksWorkspace.cpp.

◆ createPeakHKL()

std::unique_ptr< IPeak > Mantid::DataObjects::LeanElasticPeaksWorkspace::createPeakHKL ( const Kernel::V3D HKL) const
overridevirtual

Create a Peak from a HKL value provided by the client.

Parameters
HKL: reciprocal lattice vector coefficients
Returns
Fully formed peak.

Implements Mantid::API::IPeaksWorkspace.

Definition at line 268 of file LeanElasticPeaksWorkspace.cpp.

References Mantid::API::Run::getGoniometer(), Mantid::API::Sample::getOrientedLattice(), Mantid::API::ExperimentInfo::getRunNumber(), Mantid::API::ExperimentInfo::run(), and Mantid::API::ExperimentInfo::sample().

Referenced by createPeak().

◆ createPeakQSample()

std::unique_ptr< IPeak > Mantid::DataObjects::LeanElasticPeaksWorkspace::createPeakQSample ( const Kernel::V3D position) const
overridevirtual

Creates an instance of a Peak BUT DOES NOT ADD IT TO THE WORKSPACE.

Parameters
position:: QSample position of the center of the peak, in reciprocal space detector. You do NOT need to explicitly provide this distance.
Returns
a pointer to a new Peak object.

Implements Mantid::API::IPeaksWorkspace.

Definition at line 234 of file LeanElasticPeaksWorkspace.cpp.

References Mantid::API::ExperimentInfo::getRunNumber(), position, and Mantid::API::ExperimentInfo::run().

Referenced by createPeak().

◆ customSort()

bool Mantid::DataObjects::LeanElasticPeaksWorkspace::customSort ( ) const
inlineoverridevirtual
Returns
true because this type of the workspace needs custom sorting calls

Reimplemented from Mantid::API::ITableWorkspace.

Definition at line 74 of file LeanElasticPeaksWorkspace.h.

◆ doClone()

LeanElasticPeaksWorkspace * Mantid::DataObjects::LeanElasticPeaksWorkspace::doClone ( ) const
inlineoverrideprivatevirtual

Virtual clone method. Not implemented to force implementation in children.

Implements Mantid::API::IPeaksWorkspace.

Definition at line 166 of file LeanElasticPeaksWorkspace.h.

◆ doCloneColumns()

ITableWorkspace * Mantid::DataObjects::LeanElasticPeaksWorkspace::doCloneColumns ( const std::vector< std::string > &  colNames) const
overrideprivatevirtual

Implements Mantid::API::ITableWorkspace.

Definition at line 661 of file LeanElasticPeaksWorkspace.cpp.

◆ doCloneEmpty()

LeanElasticPeaksWorkspace * Mantid::DataObjects::LeanElasticPeaksWorkspace::doCloneEmpty ( ) const
inlineoverrideprivatevirtual

Virtual cloneEmpty method.

Not implemented to force implementation in children.

Implements Mantid::API::ITableWorkspace.

Definition at line 167 of file LeanElasticPeaksWorkspace.h.

◆ find() [1/6]

void Mantid::DataObjects::LeanElasticPeaksWorkspace::find ( API::Boolean  ,
size_t &  ,
size_t   
)
inlineoverrideprivatevirtual

find method to get the index of API::Boolean value cell in a table workspace

Implements Mantid::API::ITableWorkspace.

Definition at line 224 of file LeanElasticPeaksWorkspace.h.

◆ find() [2/6]

void Mantid::DataObjects::LeanElasticPeaksWorkspace::find ( const Mantid::Kernel::V3D ,
size_t &  ,
size_t   
)
inlineoverrideprivatevirtual

find method to get the index of Mantid::Kernel::V3D cell value in a table workspace

Implements Mantid::API::ITableWorkspace.

Definition at line 234 of file LeanElasticPeaksWorkspace.h.

◆ find() [3/6]

void Mantid::DataObjects::LeanElasticPeaksWorkspace::find ( const std::string &  ,
size_t &  ,
size_t   
)
inlineoverrideprivatevirtual

find method to get the index of cellstd::string value in a table workspace

Implements Mantid::API::ITableWorkspace.

Definition at line 229 of file LeanElasticPeaksWorkspace.h.

◆ find() [4/6]

void Mantid::DataObjects::LeanElasticPeaksWorkspace::find ( double  ,
size_t &  ,
size_t   
)
inlineoverrideprivatevirtual

find method to get the index of double cell value in a table workspace

Implements Mantid::API::ITableWorkspace.

Definition at line 215 of file LeanElasticPeaksWorkspace.h.

◆ find() [5/6]

void Mantid::DataObjects::LeanElasticPeaksWorkspace::find ( float  ,
size_t &  ,
size_t   
)
inlineoverrideprivatevirtual

find method to get the index of float cell value in a table workspace

Implements Mantid::API::ITableWorkspace.

Definition at line 219 of file LeanElasticPeaksWorkspace.h.

◆ find() [6/6]

void Mantid::DataObjects::LeanElasticPeaksWorkspace::find ( size_t  ,
size_t &  ,
size_t   
)
inlineoverrideprivatevirtual

find method to get the index of integer cell value in a table workspace

Implements Mantid::API::ITableWorkspace.

Definition at line 211 of file LeanElasticPeaksWorkspace.h.

◆ getColumn() [1/4]

std::shared_ptr< const Mantid::API::Column > Mantid::DataObjects::LeanElasticPeaksWorkspace::getColumn ( const std::string &  name) const
inlineoverridevirtual

Gets the shared pointer to a column by name.

Implements Mantid::API::ITableWorkspace.

Definition at line 135 of file LeanElasticPeaksWorkspace.h.

◆ getColumn() [2/4]

std::shared_ptr< Mantid::API::Column > Mantid::DataObjects::LeanElasticPeaksWorkspace::getColumn ( const std::string &  name)
inlineoverridevirtual

Gets the shared pointer to a column by name.

Implements Mantid::API::ITableWorkspace.

Definition at line 130 of file LeanElasticPeaksWorkspace.h.

◆ getColumn() [3/4]

std::shared_ptr< const Mantid::API::Column > Mantid::DataObjects::LeanElasticPeaksWorkspace::getColumn ( size_t  index) const
overridevirtual

Gets the shared pointer to a column by index - return none-modifyable column.

Gets the shared pointer to a column by index.

Implements Mantid::API::ITableWorkspace.

Definition at line 403 of file LeanElasticPeaksWorkspace.cpp.

References index, and m_columns.

◆ getColumn() [4/4]

std::shared_ptr< Mantid::API::Column > Mantid::DataObjects::LeanElasticPeaksWorkspace::getColumn ( size_t  index)
overridevirtual

Gets the shared pointer to a column by index.

Implements Mantid::API::ITableWorkspace.

Definition at line 395 of file LeanElasticPeaksWorkspace.cpp.

References index, and m_columns.

◆ getColumnIndex()

size_t Mantid::DataObjects::LeanElasticPeaksWorkspace::getColumnIndex ( const std::string &  name) const
virtual
Returns
the index of the column with the given name.

Definition at line 386 of file LeanElasticPeaksWorkspace.cpp.

References m_columns.

◆ getColumnNames()

std::vector< std::string > Mantid::DataObjects::LeanElasticPeaksWorkspace::getColumnNames ( ) const
inlineoverridevirtual

Returns a vector of all column names.

Implements Mantid::API::ITableWorkspace.

Definition at line 153 of file LeanElasticPeaksWorkspace.h.

◆ getConvention()

std::string Mantid::DataObjects::LeanElasticPeaksWorkspace::getConvention ( ) const
overridevirtual
Returns
the convention

Implements Mantid::API::IPeaksWorkspace.

Definition at line 116 of file LeanElasticPeaksWorkspace.cpp.

References Mantid::API::IPeaksWorkspace::m_convention.

Referenced by saveNexus().

◆ getLogs()

API::LogManager_const_sptr Mantid::DataObjects::LeanElasticPeaksWorkspace::getLogs ( ) const
overridevirtual

Get constant access to shared pointer containing workspace porperties; Copies logs into new LogManager variable Meaningfull only for some multithereaded methods when a thread wants to have its own copy of logs.

Implements Mantid::API::ITableWorkspace.

Definition at line 657 of file LeanElasticPeaksWorkspace.cpp.

References Mantid::API::ExperimentInfo::run().

◆ getMemorySize()

size_t Mantid::DataObjects::LeanElasticPeaksWorkspace::getMemorySize ( ) const
overridevirtual

Return the memory used in bytes.

Implements Mantid::API::Workspace.

Definition at line 338 of file LeanElasticPeaksWorkspace.cpp.

References getNumberPeaks().

◆ getNumberPeaks()

int Mantid::DataObjects::LeanElasticPeaksWorkspace::getNumberPeaks ( ) const
overridevirtual
Returns
the number of peaks

Implements Mantid::API::IPeaksWorkspace.

Definition at line 111 of file LeanElasticPeaksWorkspace.cpp.

References m_peaks.

Referenced by getMemorySize().

◆ getPeak() [1/2]

const LeanElasticPeak & Mantid::DataObjects::LeanElasticPeaksWorkspace::getPeak ( int  peakNum) const
overridevirtual

Return a const reference to the Peak.

Parameters
peakNum:: index of the peak to get.
Returns
a reference to a Peak object.

Implements Mantid::API::IPeaksWorkspace.

Definition at line 190 of file LeanElasticPeaksWorkspace.cpp.

References m_peaks.

◆ getPeak() [2/2]

LeanElasticPeak & Mantid::DataObjects::LeanElasticPeaksWorkspace::getPeak ( int  peakNum)
overridevirtual

Return a reference to the Peak.

Parameters
peakNum:: index of the peak to get.
Returns
a reference to a Peak object.

Implements Mantid::API::IPeaksWorkspace.

Definition at line 178 of file LeanElasticPeaksWorkspace.cpp.

References m_peaks.

◆ getPeaks() [1/2]

std::vector< LeanElasticPeak > & Mantid::DataObjects::LeanElasticPeaksWorkspace::getPeaks ( )

Return a reference to the Peaks vector.

Definition at line 318 of file LeanElasticPeaksWorkspace.cpp.

References m_peaks.

◆ getPeaks() [2/2]

const std::vector< LeanElasticPeak > & Mantid::DataObjects::LeanElasticPeaksWorkspace::getPeaks ( ) const

Return a const reference to the Peaks vector.

Definition at line 321 of file LeanElasticPeaksWorkspace.cpp.

References m_peaks.

◆ getSpecialCoordinateSystem()

Kernel::SpecialCoordinateSystem Mantid::DataObjects::LeanElasticPeaksWorkspace::getSpecialCoordinateSystem ( ) const
overridevirtual

Get the special coordinate system.

Returns
the special Q3D coordinate system.

Implements Mantid::API::IPeaksWorkspace.

Definition at line 643 of file LeanElasticPeaksWorkspace.cpp.

References m_coordSystem.

◆ hasIntegratedPeaks()

bool Mantid::DataObjects::LeanElasticPeaksWorkspace::hasIntegratedPeaks ( ) const
overridevirtual

Getter for the integration status.

Returns
TRUE if it has been integrated using a peak integration algorithm.

Implements Mantid::API::IPeaksWorkspace.

Definition at line 326 of file LeanElasticPeaksWorkspace.cpp.

References Mantid::API::ExperimentInfo::run(), and value.

◆ id()

const std::string Mantid::DataObjects::LeanElasticPeaksWorkspace::id ( ) const
inlineoverridevirtual

Return the workspace typeID.

Reimplemented from Mantid::API::ITableWorkspace.

Definition at line 42 of file LeanElasticPeaksWorkspace.h.

◆ initColumns()

void Mantid::DataObjects::LeanElasticPeaksWorkspace::initColumns ( )
private

Initialize the table structure.

Initialize all columns.

Definition at line 354 of file LeanElasticPeaksWorkspace.cpp.

References addPeakColumn().

Referenced by LeanElasticPeaksWorkspace().

◆ insertRow()

size_t Mantid::DataObjects::LeanElasticPeaksWorkspace::insertRow ( size_t  index)
inlineoverrideprivatevirtual

Inserts a row before row pointed to by index and fills it with default vales.

Implements Mantid::API::ITableWorkspace.

Definition at line 200 of file LeanElasticPeaksWorkspace.h.

◆ logs()

API::LogManager_sptr Mantid::DataObjects::LeanElasticPeaksWorkspace::logs ( )
overridevirtual

Get access to shared pointer containing workspace porperties.

This function is there to provide common interface of iTableWorkspace Despite it is non-constant method, one should be very carefull using it to change the log values when cloning of a table workspace can occur as the changes may depend on the order of PeakWorkspace cloning & changes applyed through this pointer. See PeakWorkspaceTest (test_getSetLogAccess) – for example of this behaviour. Use mutableRun interface to change log values rather then this method.

Implements Mantid::API::ITableWorkspace.

Definition at line 650 of file LeanElasticPeaksWorkspace.cpp.

References Mantid::API::ExperimentInfo::mutableRun().

◆ operator=()

LeanElasticPeaksWorkspace & Mantid::DataObjects::LeanElasticPeaksWorkspace::operator= ( const LeanElasticPeaksWorkspace other)
delete

◆ peakInfo()

std::vector< std::pair< std::string, std::string > > Mantid::DataObjects::LeanElasticPeaksWorkspace::peakInfo ( const Kernel::V3D qFrame,
bool  labCoords 
) const
overridevirtual

Returns selected information for a "peak" at QLabFrame.

Parameters
qFrameAn arbitrary position in Q-space. This does not have to be the position of a peak.
labCoordsSet true if the position is in the lab coordinate system, false if it is in the sample coordinate system.
Returns
a vector whose elements contain different information about the "peak" at that position. each element is a pair of description of information and the string form for the corresponding value.

Implements Mantid::API::IPeaksWorkspace.

Definition at line 257 of file LeanElasticPeaksWorkspace.cpp.

◆ peakInfoNumber()

int Mantid::DataObjects::LeanElasticPeaksWorkspace::peakInfoNumber ( const Kernel::V3D qFrame,
bool  labCoords 
) const
overridevirtual

Returns selected information for a "peak" at QLabFrame.

Parameters
qFrameAn arbitrary position in Q-space. This does not have to be the position of a peak.
labCoordsSet true if the position is in the lab coordinate system, false if it is in the sample coordinate system.
Returns
a vector whose elements contain different information about the "peak" at that position. each element is a pair of description of information and the string form for the corresponding value.

Implements Mantid::API::IPeaksWorkspace.

Definition at line 312 of file LeanElasticPeaksWorkspace.cpp.

◆ removeColumn()

void Mantid::DataObjects::LeanElasticPeaksWorkspace::removeColumn ( const std::string &  name)
inlineoverrideprivatevirtual

Removes a column.

Implements Mantid::API::ITableWorkspace.

Definition at line 189 of file LeanElasticPeaksWorkspace.h.

◆ removePeak()

void Mantid::DataObjects::LeanElasticPeaksWorkspace::removePeak ( int  peakNum)
overridevirtual

Removes the indicated peak.

Parameters
peakNumthe peak to remove. peakNum starts at 0

Implements Mantid::API::IPeaksWorkspace.

Definition at line 122 of file LeanElasticPeaksWorkspace.cpp.

References m_peaks.

◆ removePeaks()

void Mantid::DataObjects::LeanElasticPeaksWorkspace::removePeaks ( std::vector< int >  badPeaks)
overridevirtual

Removes multiple peaks.

Parameters
badPeakspeaks to be removed

Implements Mantid::API::IPeaksWorkspace.

Definition at line 132 of file LeanElasticPeaksWorkspace.cpp.

References m_peaks.

◆ removeRow()

void Mantid::DataObjects::LeanElasticPeaksWorkspace::removeRow ( size_t  index)
inlineoverrideprivatevirtual

Delets a row if it exists.

Implements Mantid::API::ITableWorkspace.

Definition at line 205 of file LeanElasticPeaksWorkspace.h.

◆ rowCount()

size_t Mantid::DataObjects::LeanElasticPeaksWorkspace::rowCount ( ) const
inlineoverridevirtual

Number of rows in the workspace.

Implements Mantid::API::ITableWorkspace.

Definition at line 127 of file LeanElasticPeaksWorkspace.h.

◆ saveNexus()

void Mantid::DataObjects::LeanElasticPeaksWorkspace::saveNexus ( ::NeXus::File *  file) const
overridevirtual

◆ setCoordinateSystem()

void Mantid::DataObjects::LeanElasticPeaksWorkspace::setCoordinateSystem ( const Kernel::SpecialCoordinateSystem  coordinateSystem)
overridevirtual

Set the special coordinate system.

Set the special Q3D coordinate system.

Parameters
coordinateSystem: Option to set.

Implements Mantid::API::IPeaksWorkspace.

Definition at line 636 of file LeanElasticPeaksWorkspace.cpp.

References m_coordSystem.

◆ setRowCount()

void Mantid::DataObjects::LeanElasticPeaksWorkspace::setRowCount ( size_t  count)
inlineoverrideprivatevirtual

Resizes the workspace.

Implements Mantid::API::ITableWorkspace.

Definition at line 195 of file LeanElasticPeaksWorkspace.h.

◆ sort()

void Mantid::DataObjects::LeanElasticPeaksWorkspace::sort ( std::vector< ColumnAndDirection > &  criteria)
override

Sort the peaks by one or more criteria.

Parameters
criteria: a vector with a list of pairs: column name, bool; where bool = true for ascending, false for descending sort. The peaks are sorted by the first criterion first, then the 2nd if equal, etc.

Definition at line 103 of file LeanElasticPeaksWorkspace.cpp.

References m_peaks.

◆ threadSafe()

bool Mantid::DataObjects::LeanElasticPeaksWorkspace::threadSafe ( ) const
inlineoverridevirtual

This is always threadsafe.

Reimplemented from Mantid::API::Workspace.

Definition at line 155 of file LeanElasticPeaksWorkspace.h.

Member Data Documentation

◆ m_columnNames

std::vector<std::string> Mantid::DataObjects::LeanElasticPeaksWorkspace::m_columnNames
private

Column names.

Definition at line 248 of file LeanElasticPeaksWorkspace.h.

Referenced by addPeakColumn().

◆ m_columns

std::vector<std::shared_ptr<Mantid::DataObjects::PeakColumn<LeanElasticPeak> > > Mantid::DataObjects::LeanElasticPeaksWorkspace::m_columns
private

Column shared pointers.

Definition at line 245 of file LeanElasticPeaksWorkspace.h.

Referenced by addPeakColumn(), getColumn(), and getColumnIndex().

◆ m_coordSystem

Kernel::SpecialCoordinateSystem Mantid::DataObjects::LeanElasticPeaksWorkspace::m_coordSystem
private

Coordinates.

Definition at line 251 of file LeanElasticPeaksWorkspace.h.

Referenced by getSpecialCoordinateSystem(), saveNexus(), and setCoordinateSystem().

◆ m_peaks

std::vector<LeanElasticPeak> Mantid::DataObjects::LeanElasticPeaksWorkspace::m_peaks
private

Vector of Peak contained within.

Definition at line 242 of file LeanElasticPeaksWorkspace.h.

Referenced by addPeak(), addPeakColumn(), getNumberPeaks(), getPeak(), getPeaks(), removePeak(), removePeaks(), saveNexus(), and sort().


The documentation for this class was generated from the following files: