Mantid
|
The class to transform matrix workspace into MDEvent workspace when matrix workspace is ragged 2D workspace. More...
#include <ConvToMDHistoWS.h>
Public Member Functions | |
ConvToMDHistoWS () | |
Default constructor. More... | |
size_t | initialize (const MDWSDescription &WSD, std::shared_ptr< MDEventWSWrapper > inWSWrapper, bool ignoreZeros) override |
method sets up all internal variables necessary to convert from Matrix2D workspace to MDEvent workspace More... | |
void | runConversion (API::Progress *pProgress) override |
run conversion as multithread job More... | |
Public Member Functions inherited from Mantid::MDAlgorithms::ConvToMDBase | |
ConvToMDBase () | |
empty default constructor More... | |
UnitsConversionHelper & | getUnitConversionHelper () |
method returns unit conversion helper, used to convert input workspace units to the units, used by appropriate MD transformation (if such conversion is necessary) More... | |
virtual size_t | initialize (const MDWSDescription &WSD, std::shared_ptr< MDEventWSWrapper > inWSWrapper, bool ignoreZeros) |
method which initiates all main class variables More... | |
virtual void | runConversion (API::Progress *)=0 |
method which starts the conversion procedure More... | |
virtual void | setDisplayNormalization (Mantid::API::IMDEventWorkspace_sptr mdWorkspace, const Mantid::API::MatrixWorkspace_sptr &underlyingWorkspace) |
Set the normalization options. More... | |
virtual | ~ConvToMDBase ()=default |
virtual destructor More... | |
Private Member Functions | |
size_t | conversionChunk (size_t startSpectra) override |
convert range of spectra starting from initial spectra startSpectra into MD events More... | |
void | estimateThreadWork (size_t nThreads, size_t specSize, size_t nPointsToProcess) |
function calculates the size of temporary memory used to keep convertTo MD data before these data should be added to DataObjects More... | |
Private Attributes | |
size_t | m_bufferSize |
size_t | m_spectraChunk |
Additional Inherited Members | |
Protected Attributes inherited from Mantid::MDAlgorithms::ConvToMDBase | |
std::vector< coord_t > | m_Coord |
Mantid::Kernel::SpecialCoordinateSystem | m_coordinateSystem |
Any special coordinate system used. More... | |
std::vector< int32_t > | m_detID |
std::vector< size_t > | m_detIDMap |
uint16_t | m_ExpInfoIndex |
bool | m_ignoreZeros |
API::MatrixWorkspace_const_sptr | m_InWS2D |
size_t | m_NDims |
number of target ws dimensions More... | |
uint32_t | m_NSpectra |
int | m_NumThreads |
std::shared_ptr< MDEventWSWrapper > | m_OutWSWrapper |
MDTransf_sptr | m_QConverter |
UnitsConversionHelper | m_UnitConversion |
Static Protected Attributes inherited from Mantid::MDAlgorithms::ConvToMDBase | |
static Mantid::Kernel::Logger | g_Log |
The class to transform matrix workspace into MDEvent workspace when matrix workspace is ragged 2D workspace.
See http://www.mantidproject.org/Writing_custom_ConvertTo_MD_transformation for detailed description of this class place in the algorithms hierarchy.
Definition at line 34 of file ConvToMDHistoWS.h.
Mantid::MDAlgorithms::ConvToMDHistoWS::ConvToMDHistoWS | ( | ) |
Default constructor.
Definition at line 19 of file ConvToMDHistoWS.cpp.
|
overrideprivatevirtual |
convert range of spectra starting from initial spectra startSpectra into MD events
startSpectra | – initial spectra number to begin conversion from |
Implements Mantid::MDAlgorithms::ConvToMDBase.
Definition at line 49 of file ConvToMDHistoWS.cpp.
References Mantid::MDAlgorithms::UnitsConversionHelper::convertUnits(), Mantid::MDAlgorithms::isNaN(), m_bufferSize, Mantid::MDAlgorithms::ConvToMDBase::m_Coord, Mantid::MDAlgorithms::ConvToMDBase::m_detID, Mantid::MDAlgorithms::ConvToMDBase::m_detIDMap, Mantid::MDAlgorithms::ConvToMDBase::m_ExpInfoIndex, Mantid::MDAlgorithms::ConvToMDBase::m_ignoreZeros, Mantid::MDAlgorithms::ConvToMDBase::m_InWS2D, Mantid::MDAlgorithms::ConvToMDBase::m_NDims, Mantid::MDAlgorithms::ConvToMDBase::m_NSpectra, Mantid::MDAlgorithms::ConvToMDBase::m_OutWSWrapper, Mantid::MDAlgorithms::ConvToMDBase::m_QConverter, m_spectraChunk, Mantid::MDAlgorithms::ConvToMDBase::m_UnitConversion, Mantid::MDAlgorithms::UnitsConversionHelper::updateConversion(), and Mantid::Geometry::X.
Referenced by runConversion().
|
private |
function calculates the size of temporary memory used to keep convertTo MD data before these data should be added to DataObjects
nThreads | – number of threads used to process data |
specSize | – the size of single spectra in matrix workspace; |
nPointsToProcess | – total number of data points in the workspace |
Definition at line 264 of file ConvToMDHistoWS.cpp.
References DATA_BUFFER_SIZE, m_bufferSize, and m_spectraChunk.
Referenced by runConversion().
|
overridevirtual |
method sets up all internal variables necessary to convert from Matrix2D workspace to MDEvent workspace
WSD | – the class describing the target MD workspace, sorurce matrtix workspace and the transformations, necessary to perform on these workspaces |
inWSWrapper | – the class wrapping the target MD workspace |
ignoreZeros | – if zero value signals should be rejected |
Reimplemented from Mantid::MDAlgorithms::ConvToMDBase.
Definition at line 29 of file ConvToMDHistoWS.cpp.
References Mantid::MDAlgorithms::ConvToMDBase::initialize(), and Mantid::MDAlgorithms::ConvToMDBase::m_InWS2D.
|
overridevirtual |
run conversion as multithread job
Set the special coordinate system flag on the output workspace.
Implements Mantid::MDAlgorithms::ConvToMDBase.
Definition at line 157 of file ConvToMDHistoWS.cpp.
References conversionChunk(), estimateThreadWork(), Mantid::MDAlgorithms::ConvToMDBase::m_Coord, Mantid::MDAlgorithms::ConvToMDBase::m_coordinateSystem, Mantid::MDAlgorithms::ConvToMDBase::m_InWS2D, Mantid::MDAlgorithms::ConvToMDBase::m_NDims, Mantid::MDAlgorithms::ConvToMDBase::m_NSpectra, Mantid::MDAlgorithms::ConvToMDBase::m_NumThreads, Mantid::MDAlgorithms::ConvToMDBase::m_OutWSWrapper, Mantid::MDAlgorithms::ConvToMDBase::m_QConverter, m_spectraChunk, Mantid::Kernel::ProgressBase::report(), Mantid::Kernel::ProgressBase::resetNumSteps(), Mantid::Kernel::ThreadSchedulerFIFO::size(), and tp.
|
private |
Definition at line 50 of file ConvToMDHistoWS.h.
Referenced by conversionChunk(), and estimateThreadWork().
|
private |
Definition at line 47 of file ConvToMDHistoWS.h.
Referenced by conversionChunk(), estimateThreadWork(), and runConversion().