Mantid
|
The class LeanElasticPeaksWorkspace stores information about a set of SCD lean peaks. More...
#include <LeanElasticPeaksWorkspace.h>
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< LeanElasticPeaksWorkspace > | clone () const |
Returns a clone of the workspace. More... | |
std::unique_ptr< LeanElasticPeaksWorkspace > | cloneEmpty () 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::IPeak > | createPeak () const override |
Create a Peak using default values. More... | |
std::unique_ptr< Geometry::IPeak > | 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... | |
std::unique_ptr< Geometry::IPeak > | 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... | |
std::unique_ptr< Geometry::IPeak > | createPeakHKL (const Kernel::V3D &HKL) const override |
Create a Peak from a HKL value provided by the client. More... | |
std::unique_ptr< Geometry::IPeak > | 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::Column > | getColumn (const std::string &name) const override |
Gets the shared pointer to a column by name. More... | |
std::shared_ptr< Mantid::API::Column > | getColumn (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::Column > | getColumn (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 LeanElasticPeak & | getPeak (int peakNum) const override |
Return a const reference to the Peak. More... | |
LeanElasticPeak & | getPeak (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... | |
LeanElasticPeaksWorkspace & | operator= (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::IPeak > | createPeak () const =0 |
Create an instance of a peak using default constructor. More... | |
virtual std::unique_ptr< Mantid::Geometry::IPeak > | createPeak (const Mantid::Kernel::V3D &position, const Mantid::Kernel::SpecialCoordinateSystem &frame) const =0 |
Create an instance of a Peak. More... | |
virtual std::unique_ptr< Geometry::IPeak > | createPeak (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::IPeak > | createPeakHKL (const Mantid::Kernel::V3D &HKL) const =0 |
Create an instance of a peak using a V3D. More... | |
virtual std::unique_ptr< Mantid::Geometry::IPeak > | createPeakQSample (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::IPeak & | getPeak (int peakNum) const =0 |
Return a reference to the Peak (const version) More... | |
virtual Mantid::Geometry::IPeak & | getPeak (int peakNum)=0 |
Return a reference to the Peak. More... | |
Mantid::Geometry::IPeak * | getPeakPtr (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... | |
IPeaksWorkspace & | operator= (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... | |
Boolean & | Bool (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... | |
ITableWorkspace & | operator= (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 WorkspaceHistory & | getHistory () 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... | |
WorkspaceHistory & | history () |
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 |
Workspace & | operator= (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 ExperimentInfo * | cloneExperimentInfo () const |
Clone us. More... | |
const Geometry::ComponentInfo & | componentInfo () const |
const Geometry::ParameterMap & | constInstrumentParameters () const |
Const version. More... | |
void | copyExperimentInfoFrom (const ExperimentInfo *other) |
Copy everything from the given experiment object. More... | |
const Geometry::DetectorInfo & | detectorInfo () 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 > ¶meterNames) 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::Property * | getLog (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::ParameterMap & | instrumentParameters () |
Returns a modifiable set of instrument parameters. More... | |
const Geometry::ParameterMap & | instrumentParameters () 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 ¶meterStr) |
Loads an experiment description from the open NeXus file. More... | |
void | loadExperimentInfoNexus (const std::string &nxFilename, ::NeXus::File *file, std::string ¶meterStr, 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 ¶meterStr) |
Load the instrument from an open NeXus file. More... | |
void | loadInstrumentParametersNexus (::NeXus::File *file, std::string ¶meterStr) |
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::ComponentInfo & | mutableComponentInfo () |
Geometry::DetectorInfo & | mutableDetectorInfo () |
Return a non-const reference to the DetectorInfo object. More... | |
Run & | mutableRun () |
Writable version of the run object. More... | |
Sample & | mutableSample () |
Writable version of the sample object. More... | |
SpectrumInfo & | mutableSpectrumInfo () |
Return a non-const reference to the SpectrumInfo object. More... | |
ExperimentInfo & | operator= (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 ¶meterStr) |
Populate the parameter map given a string. More... | |
const Run & | run () const |
Run details object access. More... | |
const Sample & | sample () 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< Run > | sharedRun () |
Return the cow ptr of the run. More... | |
const SpectrumInfo & | spectrumInfo () 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... | |
LeanElasticPeaksWorkspace * | doClone () const override |
Virtual clone method. Not implemented to force implementation in children. More... | |
ITableWorkspace * | doCloneColumns (const std::vector< std::string > &colNames) const override |
LeanElasticPeaksWorkspace * | doCloneEmpty () 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< LeanElasticPeak > | m_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::ParameterMap > | m_parmap |
Parameters modifying the base instrument. More... | |
Geometry::Instrument_const_sptr | sptr_instrument |
The base (unparametrized) instrument. More... | |
The class LeanElasticPeaksWorkspace stores information about a set of SCD lean peaks.
Definition at line 37 of file LeanElasticPeaksWorkspace.h.
using Mantid::DataObjects::LeanElasticPeaksWorkspace::ColumnAndDirection = std::pair<std::string, bool> |
Definition at line 39 of file LeanElasticPeaksWorkspace.h.
Mantid::DataObjects::LeanElasticPeaksWorkspace::LeanElasticPeaksWorkspace | ( | ) |
Register the workspace as a type.
Constructor. Create a table with all the required columns.
Definition at line 37 of file LeanElasticPeaksWorkspace.cpp.
|
protected |
Protected copy constructor. May be used by childs for cloning.
Copy constructor.
other | :: other LeanElasticPeaksWorkspace to copy from |
Definition at line 50 of file LeanElasticPeaksWorkspace.cpp.
References initColumns(), and Mantid::API::ExperimentInfo::setNumberOfDetectorGroups().
|
inlineoverrideprivatevirtual |
Creates a new column.
type | :: The datatype of the column |
name | :: The name to assign to the column |
Implements Mantid::API::ITableWorkspace.
Definition at line 179 of file LeanElasticPeaksWorkspace.h.
|
inlineoverrideprivatevirtual |
Creates n new columns of the same type.
type | :: The datatype of the column |
name | :: The name to assign to the column |
n | :: The number of columns to create |
Reimplemented from Mantid::API::ITableWorkspace.
Definition at line 184 of file LeanElasticPeaksWorkspace.h.
|
overridevirtual |
Add a peak to the list.
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().
|
overridevirtual |
Add a peak to the list.
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.
void Mantid::DataObjects::LeanElasticPeaksWorkspace::addPeak | ( | LeanElasticPeak && | peak | ) |
Move a peak object into this peaks workspace.
Add a peak to the list.
peak | :: Peak object to add (move) into this. |
Definition at line 171 of file LeanElasticPeaksWorkspace.cpp.
References m_peaks.
|
private |
Adds a new PeakColumn of the given type.
Add a PeakColumn.
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().
void Mantid::DataObjects::LeanElasticPeaksWorkspace::appendFile | ( | std::string | filename, |
Geometry::Instrument_sptr | inst | ||
) |
|
inline |
Returns a clone of the workspace.
Definition at line 61 of file LeanElasticPeaksWorkspace.h.
|
inline |
Returns a default-initialized clone of the workspace.
Definition at line 66 of file LeanElasticPeaksWorkspace.h.
|
inlineoverridevirtual |
Number of columns in the workspace.
Implements Mantid::API::ITableWorkspace.
Definition at line 124 of file LeanElasticPeaksWorkspace.h.
|
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.
|
overridevirtual |
Create a Peak using default values.
Implements Mantid::API::IPeaksWorkspace.
Definition at line 295 of file LeanElasticPeaksWorkspace.cpp.
Referenced by addPeak(), and createPeak().
|
overridevirtual |
Creates an instance of a Peak BUT DOES NOT ADD IT TO THE WORKSPACE.
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. |
Implements Mantid::API::IPeaksWorkspace.
Definition at line 217 of file LeanElasticPeaksWorkspace.cpp.
References createPeak(), createPeakHKL(), createPeakQSample(), Mantid::Kernel::HKL, position, and Mantid::Kernel::QLab.
|
overridevirtual |
Creates an instance of a Peak BUT DOES NOT ADD IT TO THE WORKSPACE.
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. |
Implements Mantid::API::IPeaksWorkspace.
Definition at line 204 of file LeanElasticPeaksWorkspace.cpp.
|
overridevirtual |
Create a Peak from a HKL value provided by the client.
HKL | : reciprocal lattice vector coefficients |
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().
|
overridevirtual |
Creates an instance of a Peak BUT DOES NOT ADD IT TO THE WORKSPACE.
position | :: QSample position of the center of the peak, in reciprocal space detector. You do NOT need to explicitly provide this distance. |
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().
|
inlineoverridevirtual |
Reimplemented from Mantid::API::ITableWorkspace.
Definition at line 74 of file LeanElasticPeaksWorkspace.h.
|
inlineoverrideprivatevirtual |
Virtual clone method. Not implemented to force implementation in children.
Implements Mantid::API::IPeaksWorkspace.
Definition at line 166 of file LeanElasticPeaksWorkspace.h.
|
overrideprivatevirtual |
Implements Mantid::API::ITableWorkspace.
Definition at line 661 of file LeanElasticPeaksWorkspace.cpp.
|
inlineoverrideprivatevirtual |
Virtual cloneEmpty method.
Not implemented to force implementation in children.
Implements Mantid::API::ITableWorkspace.
Definition at line 167 of file LeanElasticPeaksWorkspace.h.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
inlineoverridevirtual |
Gets the shared pointer to a column by name.
Implements Mantid::API::ITableWorkspace.
Definition at line 135 of file LeanElasticPeaksWorkspace.h.
|
inlineoverridevirtual |
Gets the shared pointer to a column by name.
Implements Mantid::API::ITableWorkspace.
Definition at line 130 of file LeanElasticPeaksWorkspace.h.
|
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.
|
overridevirtual |
Gets the shared pointer to a column by index.
Implements Mantid::API::ITableWorkspace.
Definition at line 395 of file LeanElasticPeaksWorkspace.cpp.
|
virtual |
Definition at line 386 of file LeanElasticPeaksWorkspace.cpp.
References m_columns.
|
inlineoverridevirtual |
Returns a vector of all column names.
Implements Mantid::API::ITableWorkspace.
Definition at line 153 of file LeanElasticPeaksWorkspace.h.
|
overridevirtual |
Implements Mantid::API::IPeaksWorkspace.
Definition at line 116 of file LeanElasticPeaksWorkspace.cpp.
References Mantid::API::IPeaksWorkspace::m_convention.
Referenced by saveNexus().
|
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().
|
overridevirtual |
Return the memory used in bytes.
Implements Mantid::API::Workspace.
Definition at line 338 of file LeanElasticPeaksWorkspace.cpp.
References getNumberPeaks().
|
overridevirtual |
Implements Mantid::API::IPeaksWorkspace.
Definition at line 111 of file LeanElasticPeaksWorkspace.cpp.
References m_peaks.
Referenced by getMemorySize().
|
overridevirtual |
Return a const reference to the Peak.
peakNum | :: index of the peak to get. |
Implements Mantid::API::IPeaksWorkspace.
Definition at line 190 of file LeanElasticPeaksWorkspace.cpp.
References m_peaks.
|
overridevirtual |
Return a reference to the Peak.
peakNum | :: index of the peak to get. |
Implements Mantid::API::IPeaksWorkspace.
Definition at line 178 of file LeanElasticPeaksWorkspace.cpp.
References m_peaks.
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.
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.
|
overridevirtual |
Get the special coordinate system.
Implements Mantid::API::IPeaksWorkspace.
Definition at line 643 of file LeanElasticPeaksWorkspace.cpp.
References m_coordSystem.
|
overridevirtual |
Getter for the integration status.
Implements Mantid::API::IPeaksWorkspace.
Definition at line 326 of file LeanElasticPeaksWorkspace.cpp.
References Mantid::API::ExperimentInfo::run(), and value.
|
inlineoverridevirtual |
Return the workspace typeID.
Reimplemented from Mantid::API::ITableWorkspace.
Definition at line 42 of file LeanElasticPeaksWorkspace.h.
|
private |
Initialize the table structure.
Initialize all columns.
Definition at line 354 of file LeanElasticPeaksWorkspace.cpp.
References addPeakColumn().
Referenced by LeanElasticPeaksWorkspace().
|
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.
|
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().
|
delete |
|
overridevirtual |
Returns selected information for a "peak" at QLabFrame.
qFrame | An arbitrary position in Q-space. This does not have to be the position of a peak. |
labCoords | Set true if the position is in the lab coordinate system, false if it is in the sample coordinate system. |
Implements Mantid::API::IPeaksWorkspace.
Definition at line 257 of file LeanElasticPeaksWorkspace.cpp.
|
overridevirtual |
Returns selected information for a "peak" at QLabFrame.
qFrame | An arbitrary position in Q-space. This does not have to be the position of a peak. |
labCoords | Set true if the position is in the lab coordinate system, false if it is in the sample coordinate system. |
Implements Mantid::API::IPeaksWorkspace.
Definition at line 312 of file LeanElasticPeaksWorkspace.cpp.
|
inlineoverrideprivatevirtual |
Removes a column.
Implements Mantid::API::ITableWorkspace.
Definition at line 189 of file LeanElasticPeaksWorkspace.h.
|
overridevirtual |
Removes the indicated peak.
peakNum | the peak to remove. peakNum starts at 0 |
Implements Mantid::API::IPeaksWorkspace.
Definition at line 122 of file LeanElasticPeaksWorkspace.cpp.
References m_peaks.
|
overridevirtual |
Removes multiple peaks.
badPeaks | peaks to be removed |
Implements Mantid::API::IPeaksWorkspace.
Definition at line 132 of file LeanElasticPeaksWorkspace.cpp.
References m_peaks.
|
inlineoverrideprivatevirtual |
Delets a row if it exists.
Implements Mantid::API::ITableWorkspace.
Definition at line 205 of file LeanElasticPeaksWorkspace.h.
|
inlineoverridevirtual |
Number of rows in the workspace.
Implements Mantid::API::ITableWorkspace.
Definition at line 127 of file LeanElasticPeaksWorkspace.h.
|
overridevirtual |
Implements Mantid::API::IPeaksWorkspace.
Definition at line 409 of file LeanElasticPeaksWorkspace.cpp.
References Mantid::DataObjects::BasePeak::getAbsorptionWeightedPathLength(), Mantid::DataObjects::BasePeak::getBinCount(), getConvention(), Mantid::DataObjects::LeanElasticPeak::getDSpacing(), Mantid::DataObjects::BasePeak::getGoniometerMatrix(), Mantid::DataObjects::BasePeak::getH(), Mantid::DataObjects::BasePeak::getIntensity(), Mantid::DataObjects::BasePeak::getK(), Mantid::DataObjects::BasePeak::getL(), Mantid::DataObjects::BasePeak::getPeakNumber(), Mantid::DataObjects::BasePeak::getPeakShape(), Mantid::DataObjects::LeanElasticPeak::getQLabFrame(), Mantid::DataObjects::BasePeak::getRunNumber(), Mantid::DataObjects::LeanElasticPeak::getScattering(), Mantid::DataObjects::BasePeak::getSigmaIntensity(), Mantid::DataObjects::LeanElasticPeak::getWavelength(), m_coordSystem, m_peaks, Mantid::Geometry::PeakShape::toJSON(), Mantid::Kernel::V3D::X(), Mantid::Kernel::V3D::Y(), and Mantid::Kernel::V3D::Z().
|
overridevirtual |
Set the special coordinate system.
Set the special Q3D coordinate system.
coordinateSystem | : Option to set. |
Implements Mantid::API::IPeaksWorkspace.
Definition at line 636 of file LeanElasticPeaksWorkspace.cpp.
References m_coordSystem.
|
inlineoverrideprivatevirtual |
Resizes the workspace.
Implements Mantid::API::ITableWorkspace.
Definition at line 195 of file LeanElasticPeaksWorkspace.h.
|
override |
Sort the peaks by one or more criteria.
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.
|
inlineoverridevirtual |
This is always threadsafe.
Reimplemented from Mantid::API::Workspace.
Definition at line 155 of file LeanElasticPeaksWorkspace.h.
|
private |
Column names.
Definition at line 248 of file LeanElasticPeaksWorkspace.h.
Referenced by addPeakColumn().
|
private |
Column shared pointers.
Definition at line 245 of file LeanElasticPeaksWorkspace.h.
Referenced by addPeakColumn(), getColumn(), and getColumnIndex().
|
private |
Coordinates.
Definition at line 251 of file LeanElasticPeaksWorkspace.h.
Referenced by getSpecialCoordinateSystem(), saveNexus(), and setCoordinateSystem().
|
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().