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

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

#include <PeaksWorkspace.h>

Inheritance diagram for Mantid::DataObjects::PeaksWorkspace:
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 (Peak &&peak)
 Move a peak object into this peaks workspace. More...
 
void appendFile (std::string filename, Geometry::Instrument_sptr inst)
 
std::unique_ptr< PeaksWorkspaceclone () const
 Returns a clone of the workspace. More...
 
std::unique_ptr< PeaksWorkspacecloneEmpty () 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...
 
IPeak_uptr createPeak () const override
 Create a Peak using default values. More...
 
IPeak_uptr createPeak (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...
 
IPeak_uptr createPeak (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...
 
IPeak_uptr createPeakHKL (const Kernel::V3D &HKL) const override
 Create a Peak from a HKL value provided by the client. More...
 
IPeak_uptr createPeakQSample (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 PeakgetPeak (int peakNum) const override
 Return a const reference to the Peak. More...
 
PeakgetPeak (int peakNum) override
 Return a reference to the Peak. More...
 
std::vector< Peak > & getPeaks ()
 Return a reference to the Peaks vector. More...
 
const std::vector< Peak > & 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...
 
API::LogManager_sptr logs () override
 Get access to shared pointer containing workspace porperties. More...
 
PeaksWorkspaceoperator= (const PeaksWorkspace &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...
 
 PeaksWorkspace ()
 Constructor. 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

 PeaksWorkspace (const PeaksWorkspace &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...
 
PeaksWorkspacedoClone () const override
 Virtual clone method. Not implemented to force implementation in children. More...
 
ITableWorkspacedoCloneColumns (const std::vector< std::string > &colNames) const override
 
PeaksWorkspacedoCloneEmpty () 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< Peak > > > m_columns
 Column shared pointers. More...
 
Kernel::SpecialCoordinateSystem m_coordSystem
 Coordinates. More...
 
std::vector< Peakm_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 PeaksWorkspace stores information about a set of SCD peaks.

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

Definition at line 37 of file PeaksWorkspace.h.

Member Typedef Documentation

◆ ColumnAndDirection

using Mantid::DataObjects::PeaksWorkspace::ColumnAndDirection = std::pair<std::string, bool>

Definition at line 39 of file PeaksWorkspace.h.

Constructor & Destructor Documentation

◆ PeaksWorkspace() [1/2]

Mantid::DataObjects::PeaksWorkspace::PeaksWorkspace ( )

Constructor.

Create a table with all the required columns.

Returns
PeaksWorkspace object

Definition at line 39 of file PeaksWorkspace.cpp.

◆ PeaksWorkspace() [2/2]

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

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

Copy constructor.

Parameters
other:: other PeaksWorkspace to copy from

Definition at line 51 of file PeaksWorkspace.cpp.

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

Member Function Documentation

◆ addColumn()

API::Column_sptr Mantid::DataObjects::PeaksWorkspace::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 174 of file PeaksWorkspace.h.

◆ addColumns()

bool Mantid::DataObjects::PeaksWorkspace::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 178 of file PeaksWorkspace.h.

◆ addPeak() [1/3]

void Mantid::DataObjects::PeaksWorkspace::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 159 of file PeaksWorkspace.cpp.

References m_peaks.

Referenced by addPeak().

◆ addPeak() [2/3]

void Mantid::DataObjects::PeaksWorkspace::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 172 of file PeaksWorkspace.cpp.

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

◆ addPeak() [3/3]

void Mantid::DataObjects::PeaksWorkspace::addPeak ( Peak &&  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 181 of file PeaksWorkspace.cpp.

References m_peaks.

◆ addPeakColumn()

void Mantid::DataObjects::PeaksWorkspace::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 620 of file PeaksWorkspace.cpp.

References m_columnNames, m_columns, and m_peaks.

Referenced by initColumns().

◆ appendFile()

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

◆ clone()

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

Returns a clone of the workspace.

Definition at line 61 of file PeaksWorkspace.h.

◆ cloneEmpty()

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

Returns a default-initialized clone of the workspace.

Definition at line 64 of file PeaksWorkspace.h.

◆ columnCount()

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

Number of columns in the workspace.

Implements Mantid::API::ITableWorkspace.

Definition at line 119 of file PeaksWorkspace.h.

◆ createDetectorTable()

API::ITableWorkspace_sptr Mantid::DataObjects::PeaksWorkspace::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 PeaksWorkspace of the peak

Implements Mantid::API::IPeaksWorkspace.

Definition at line 567 of file PeaksWorkspace.cpp.

References Mantid::DataObjects::Peak::getContributingDetIDs(), Mantid::Kernel::SingletonHolder< T >::Instance(), m_peaks, nrows, and rowCount().

◆ createPeak() [1/3]

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

Create a Peak using default values.

Returns
a point to a new peak object

Implements Mantid::API::IPeaksWorkspace.

Definition at line 485 of file PeaksWorkspace.cpp.

Referenced by addPeak(), createPeak(), and peakInfo().

◆ createPeak() [2/3]

std::unique_ptr< Geometry::IPeak > Mantid::DataObjects::PeaksWorkspace::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 233 of file PeaksWorkspace.cpp.

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

◆ createPeak() [3/3]

std::unique_ptr< Geometry::IPeak > Mantid::DataObjects::PeaksWorkspace::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 214 of file PeaksWorkspace.cpp.

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

◆ createPeakHKL()

std::unique_ptr< IPeak > Mantid::DataObjects::PeaksWorkspace::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 455 of file PeaksWorkspace.cpp.

References Mantid::API::Run::getGoniometer(), Mantid::API::ExperimentInfo::getInstrument(), 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::PeaksWorkspace::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 251 of file PeaksWorkspace.cpp.

References Mantid::Geometry::Goniometer::calcFromQSampleAndWavelength(), Mantid::Kernel::DeltaEMode::Elastic, Mantid::API::g_log, Mantid::Geometry::Goniometer::getEulerAngles(), Mantid::API::Run::getGoniometer(), Mantid::API::ExperimentInfo::getInstrument(), getLogs(), Mantid::Geometry::Goniometer::getR(), Mantid::API::ExperimentInfo::getRunNumber(), Mantid::Kernel::Logger::information(), position, Mantid::API::ExperimentInfo::run(), and Mantid::Kernel::UnitConversion::run().

Referenced by createPeak().

◆ customSort()

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

Reimplemented from Mantid::API::ITableWorkspace.

Definition at line 70 of file PeaksWorkspace.h.

◆ doClone()

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

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

Implements Mantid::API::IPeaksWorkspace.

Definition at line 161 of file PeaksWorkspace.h.

◆ doCloneColumns()

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

Implements Mantid::API::ITableWorkspace.

Definition at line 927 of file PeaksWorkspace.cpp.

◆ doCloneEmpty()

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

Virtual cloneEmpty method.

Not implemented to force implementation in children.

Implements Mantid::API::ITableWorkspace.

Definition at line 162 of file PeaksWorkspace.h.

◆ find() [1/6]

void Mantid::DataObjects::PeaksWorkspace::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 213 of file PeaksWorkspace.h.

◆ find() [2/6]

void Mantid::DataObjects::PeaksWorkspace::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 223 of file PeaksWorkspace.h.

◆ find() [3/6]

void Mantid::DataObjects::PeaksWorkspace::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 218 of file PeaksWorkspace.h.

◆ find() [4/6]

void Mantid::DataObjects::PeaksWorkspace::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 204 of file PeaksWorkspace.h.

◆ find() [5/6]

void Mantid::DataObjects::PeaksWorkspace::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 208 of file PeaksWorkspace.h.

◆ find() [6/6]

void Mantid::DataObjects::PeaksWorkspace::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 200 of file PeaksWorkspace.h.

◆ getColumn() [1/4]

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

Gets the shared pointer to a column by name.

Implements Mantid::API::ITableWorkspace.

Definition at line 130 of file PeaksWorkspace.h.

◆ getColumn() [2/4]

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

Gets the shared pointer to a column by name.

Implements Mantid::API::ITableWorkspace.

Definition at line 125 of file PeaksWorkspace.h.

◆ getColumn() [3/4]

std::shared_ptr< const Mantid::API::Column > Mantid::DataObjects::PeaksWorkspace::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 646 of file PeaksWorkspace.cpp.

References index, and m_columns.

◆ getColumn() [4/4]

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

Gets the shared pointer to a column by index.

Implements Mantid::API::ITableWorkspace.

Definition at line 638 of file PeaksWorkspace.cpp.

References index, and m_columns.

◆ getColumnIndex()

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

Definition at line 629 of file PeaksWorkspace.cpp.

References m_columns.

◆ getColumnNames()

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

Returns a vector of all column names.

Implements Mantid::API::ITableWorkspace.

Definition at line 148 of file PeaksWorkspace.h.

◆ getConvention()

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

Implements Mantid::API::IPeaksWorkspace.

Definition at line 126 of file PeaksWorkspace.cpp.

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

Referenced by saveNexus().

◆ getLogs()

API::LogManager_const_sptr Mantid::DataObjects::PeaksWorkspace::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 923 of file PeaksWorkspace.cpp.

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

Referenced by createPeakQSample().

◆ getMemorySize()

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

Return the memory used in bytes.

Implements Mantid::API::Workspace.

Definition at line 557 of file PeaksWorkspace.cpp.

References getNumberPeaks().

◆ getNumberPeaks()

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

Implements Mantid::API::IPeaksWorkspace.

Definition at line 121 of file PeaksWorkspace.cpp.

References m_peaks.

Referenced by getMemorySize(), peakInfo(), peakInfoNumber(), and Mantid::Crystal::CentroidPeaks::removeEdgePeaks().

◆ getPeak() [1/2]

const Peak & Mantid::DataObjects::PeaksWorkspace::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 200 of file PeaksWorkspace.cpp.

References m_peaks.

◆ getPeak() [2/2]

Peak & Mantid::DataObjects::PeaksWorkspace::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 188 of file PeaksWorkspace.cpp.

References m_peaks.

Referenced by peakInfo(), peakInfoNumber(), and Mantid::Crystal::CentroidPeaks::removeEdgePeaks().

◆ getPeaks() [1/2]

std::vector< Peak > & Mantid::DataObjects::PeaksWorkspace::getPeaks ( )

Return a reference to the Peaks vector.

Definition at line 537 of file PeaksWorkspace.cpp.

References m_peaks.

◆ getPeaks() [2/2]

const std::vector< Peak > & Mantid::DataObjects::PeaksWorkspace::getPeaks ( ) const

Return a const reference to the Peaks vector.

Definition at line 540 of file PeaksWorkspace.cpp.

References m_peaks.

◆ getSpecialCoordinateSystem()

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

Get the special coordinate system.

Returns
the special Q3D coordinate system.

Implements Mantid::API::IPeaksWorkspace.

Definition at line 911 of file PeaksWorkspace.cpp.

References m_coordSystem.

◆ hasIntegratedPeaks()

bool Mantid::DataObjects::PeaksWorkspace::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 545 of file PeaksWorkspace.cpp.

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

◆ id()

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

Return the workspace typeID.

Reimplemented from Mantid::API::ITableWorkspace.

Definition at line 42 of file PeaksWorkspace.h.

◆ initColumns()

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

Initialize the table structure.

Initialize all columns.

Definition at line 591 of file PeaksWorkspace.cpp.

References addPeakColumn().

Referenced by PeaksWorkspace().

◆ insertRow()

size_t Mantid::DataObjects::PeaksWorkspace::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 191 of file PeaksWorkspace.h.

◆ logs()

API::LogManager_sptr Mantid::DataObjects::PeaksWorkspace::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 918 of file PeaksWorkspace.cpp.

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

◆ operator=()

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

◆ peakInfo()

std::vector< std::pair< std::string, std::string > > Mantid::DataObjects::PeaksWorkspace::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 298 of file PeaksWorkspace.cpp.

References createPeak(), Mantid::Kernel::V3D::distance(), Mantid::Geometry::Goniometer::getEulerAngles(), Mantid::DataObjects::BasePeak::getGoniometerMatrix(), getNumberPeaks(), Mantid::API::Sample::getOrientedLattice(), getPeak(), Mantid::DataObjects::Peak::getQLabFrame(), Mantid::DataObjects::Peak::getQSampleFrame(), Mantid::DataObjects::BasePeak::getRunNumber(), Mantid::Geometry::OrientedLattice::getUB(), Mantid::Kernel::Matrix< T >::Invert(), Mantid::Kernel::V3D::norm(), Mantid::API::ExperimentInfo::run(), Mantid::API::ExperimentInfo::sample(), and std::to_string().

◆ peakInfoNumber()

int Mantid::DataObjects::PeaksWorkspace::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 502 of file PeaksWorkspace.cpp.

References Mantid::Kernel::V3D::distance(), getNumberPeaks(), getPeak(), Mantid::DataObjects::Peak::getQLabFrame(), Mantid::DataObjects::Peak::getQSampleFrame(), and Mantid::Kernel::V3D::norm().

◆ removeColumn()

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

Removes a column.

Implements Mantid::API::ITableWorkspace.

Definition at line 182 of file PeaksWorkspace.h.

◆ removePeak()

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

Removes the indicated peak.

Parameters
peakNumthe peak to remove. peakNum starts at 0

Implements Mantid::API::IPeaksWorkspace.

Definition at line 132 of file PeaksWorkspace.cpp.

References m_peaks.

◆ removePeaks()

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

Removes multiple peaks.

Parameters
badPeakspeaks to be removed

Implements Mantid::API::IPeaksWorkspace.

Definition at line 142 of file PeaksWorkspace.cpp.

References m_peaks.

Referenced by Mantid::Crystal::CentroidPeaks::removeEdgePeaks().

◆ removeRow()

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

Delets a row if it exists.

Implements Mantid::API::ITableWorkspace.

Definition at line 195 of file PeaksWorkspace.h.

◆ rowCount()

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

Number of rows in the workspace.

Implements Mantid::API::ITableWorkspace.

Definition at line 122 of file PeaksWorkspace.h.

Referenced by createDetectorTable().

◆ saveNexus()

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

◆ setCoordinateSystem()

void Mantid::DataObjects::PeaksWorkspace::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 904 of file PeaksWorkspace.cpp.

References m_coordSystem.

◆ setRowCount()

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

Resizes the workspace.

Implements Mantid::API::ITableWorkspace.

Definition at line 187 of file PeaksWorkspace.h.

◆ sort()

void Mantid::DataObjects::PeaksWorkspace::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 113 of file PeaksWorkspace.cpp.

References m_peaks.

◆ threadSafe()

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

This is always threadsafe.

Reimplemented from Mantid::API::Workspace.

Definition at line 150 of file PeaksWorkspace.h.

Member Data Documentation

◆ m_columnNames

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

Column names.

Definition at line 237 of file PeaksWorkspace.h.

Referenced by addPeakColumn().

◆ m_columns

std::vector<std::shared_ptr<Mantid::DataObjects::PeakColumn<Peak> > > Mantid::DataObjects::PeaksWorkspace::m_columns
private

Column shared pointers.

Definition at line 234 of file PeaksWorkspace.h.

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

◆ m_coordSystem

Kernel::SpecialCoordinateSystem Mantid::DataObjects::PeaksWorkspace::m_coordSystem
private

Coordinates.

Definition at line 240 of file PeaksWorkspace.h.

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

◆ m_peaks

std::vector<Peak> Mantid::DataObjects::PeaksWorkspace::m_peaks
private

Vector of Peak contained within.

Definition at line 231 of file PeaksWorkspace.h.

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


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