Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::MDAlgorithms::ConvToMDHistoWS Class Reference

The class to transform matrix workspace into MDEvent workspace when matrix workspace is ragged 2D workspace. More...

#include <ConvToMDHistoWS.h>

Inheritance diagram for Mantid::MDAlgorithms::ConvToMDHistoWS:
Mantid::MDAlgorithms::ConvToMDBase

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...
 
UnitsConversionHelpergetUnitConversionHelper ()
 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_tm_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< MDEventWSWrapperm_OutWSWrapper
 
MDTransf_sptr m_QConverter
 
UnitsConversionHelper m_UnitConversion
 
- Static Protected Attributes inherited from Mantid::MDAlgorithms::ConvToMDBase
static Mantid::Kernel::Logger g_Log
 

Detailed Description

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.

Date
11-10-2011

Definition at line 34 of file ConvToMDHistoWS.h.

Constructor & Destructor Documentation

◆ ConvToMDHistoWS()

Mantid::MDAlgorithms::ConvToMDHistoWS::ConvToMDHistoWS ( )

Default constructor.

Definition at line 19 of file ConvToMDHistoWS.cpp.

Member Function Documentation

◆ conversionChunk()

size_t Mantid::MDAlgorithms::ConvToMDHistoWS::conversionChunk ( size_t  startSpectra)
overrideprivatevirtual

◆ estimateThreadWork()

void Mantid::MDAlgorithms::ConvToMDHistoWS::estimateThreadWork ( size_t  nThreads,
size_t  specSize,
size_t  nPointsToProcess 
)
private

function calculates the size of temporary memory used to keep convertTo MD data before these data should be added to DataObjects

Parameters
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().

◆ initialize()

size_t Mantid::MDAlgorithms::ConvToMDHistoWS::initialize ( const MDWSDescription WSD,
std::shared_ptr< MDEventWSWrapper inWSWrapper,
bool  ignoreZeros 
)
overridevirtual

method sets up all internal variables necessary to convert from Matrix2D workspace to MDEvent workspace

Parameters
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.

◆ runConversion()

void Mantid::MDAlgorithms::ConvToMDHistoWS::runConversion ( API::Progress pProgress)
overridevirtual

Member Data Documentation

◆ m_bufferSize

size_t Mantid::MDAlgorithms::ConvToMDHistoWS::m_bufferSize
private

Definition at line 50 of file ConvToMDHistoWS.h.

Referenced by conversionChunk(), and estimateThreadWork().

◆ m_spectraChunk

size_t Mantid::MDAlgorithms::ConvToMDHistoWS::m_spectraChunk
private

Definition at line 47 of file ConvToMDHistoWS.h.

Referenced by conversionChunk(), estimateThreadWork(), and runConversion().


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