Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
Mantid::MDAlgorithms::ConvToMDBase Class Referenceabstract

Class describes the interface to the methods, which perform conversion from usual workspaces to MDEventWorkspace. More...

#include <ConvToMDBase.h>

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

Public Member Functions

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

Protected Attributes

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

static Mantid::Kernel::Logger g_Log
 

Private Member Functions

virtual size_t conversionChunk (size_t job_ID)=0
 internal function which do one peace of work, which should be performed by one thread More...
 

Detailed Description

Class describes the interface to the methods, which perform conversion from usual workspaces to MDEventWorkspace.

See http://www.mantidproject.org/Writing_custom_ConvertTo_MD_transformation for detailed description of this class place in the algorithms hierarchy.

Date
07-01-2012

Definition at line 34 of file ConvToMDBase.h.

Constructor & Destructor Documentation

◆ ConvToMDBase()

Mantid::MDAlgorithms::ConvToMDBase::ConvToMDBase ( )

empty default constructor

Definition at line 102 of file ConvToMDBase.cpp.

◆ ~ConvToMDBase()

virtual Mantid::MDAlgorithms::ConvToMDBase::~ConvToMDBase ( )
virtualdefault

virtual destructor

Member Function Documentation

◆ conversionChunk()

virtual size_t Mantid::MDAlgorithms::ConvToMDBase::conversionChunk ( size_t  job_ID)
privatepure virtual

internal function which do one peace of work, which should be performed by one thread

Parameters
job_ID– the identifier which specifies, what part of the work on the workspace this job has to do. Often it is a spectra number

Implemented in Mantid::MDAlgorithms::ConvToMDHistoWS, and Mantid::MDAlgorithms::ConvToMDEventsWS.

◆ getUnitConversionHelper()

UnitsConversionHelper & Mantid::MDAlgorithms::ConvToMDBase::getUnitConversionHelper ( )
inline

method returns unit conversion helper, used to convert input workspace units to the units, used by appropriate MD transformation (if such conversion is necessary)

Definition at line 53 of file ConvToMDBase.h.

◆ initialize()

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

method which initiates all main class variables

method which initates all main class variables

Parameters
WSD– class describing the target workspace. the algorithm uses target workspace limints, transformation matix from source to the target workspace and the parameters, needed for unit conversion (if any)
inWSWrapper– shared pointer to target MD Event workspace to add converted events to.
ignoreZeros– if true, 0 values on input histograms do not copied as events into resulting MD workspace. By false(default), they do.

Reimplemented in Mantid::MDAlgorithms::ConvToMDEventsWS, Mantid::MDAlgorithms::ConvToMDEventsWSIndexing, and Mantid::MDAlgorithms::ConvToMDHistoWS.

Definition at line 29 of file ConvToMDBase.cpp.

References Mantid::MDAlgorithms::MDWSDescription::AlgID, g_Log, Mantid::MDAlgorithms::MDWSDescription::getCoordinateSystem(), Mantid::MDAlgorithms::MDWSDescription::getEMode(), Mantid::MDAlgorithms::MDWSDescription::getInWS(), Mantid::API::LogManager::getPropertyValueAsType(), Mantid::Kernel::Logger::information(), Mantid::MDAlgorithms::UnitsConversionHelper::initialize(), Mantid::Kernel::SingletonHolder< T >::Instance(), m_Coord, m_coordinateSystem, m_detID, m_detIDMap, m_ExpInfoIndex, m_ignoreZeros, m_InWS2D, m_NDims, m_NSpectra, m_NumThreads, m_OutWSWrapper, Mantid::MDAlgorithms::MDWSDescription::m_PreprDetTable, m_QConverter, and m_UnitConversion.

Referenced by Mantid::MDAlgorithms::ConvToMDEventsWS::initialize(), and Mantid::MDAlgorithms::ConvToMDHistoWS::initialize().

◆ runConversion()

virtual void Mantid::MDAlgorithms::ConvToMDBase::runConversion ( API::Progress )
pure virtual

method which starts the conversion procedure

Implemented in Mantid::MDAlgorithms::ConvToMDEventsWS, and Mantid::MDAlgorithms::ConvToMDHistoWS.

◆ setDisplayNormalization()

void Mantid::MDAlgorithms::ConvToMDBase::setDisplayNormalization ( Mantid::API::IMDEventWorkspace_sptr  mdWorkspace,
const Mantid::API::MatrixWorkspace_sptr underlyingWorkspace 
)
virtual

Set the normalization options.

Definition at line 113 of file ConvToMDBase.cpp.

References m_QConverter.

Member Data Documentation

◆ g_Log

Kernel::Logger Mantid::MDAlgorithms::ConvToMDBase::g_Log
staticprotected

◆ m_Coord

std::vector<coord_t> Mantid::MDAlgorithms::ConvToMDBase::m_Coord
protected

◆ m_coordinateSystem

Mantid::Kernel::SpecialCoordinateSystem Mantid::MDAlgorithms::ConvToMDBase::m_coordinateSystem
protected

◆ m_detID

std::vector<int32_t> Mantid::MDAlgorithms::ConvToMDBase::m_detID
protected

◆ m_detIDMap

std::vector<size_t> Mantid::MDAlgorithms::ConvToMDBase::m_detIDMap
protected

◆ m_ExpInfoIndex

uint16_t Mantid::MDAlgorithms::ConvToMDBase::m_ExpInfoIndex
protected

◆ m_ignoreZeros

bool Mantid::MDAlgorithms::ConvToMDBase::m_ignoreZeros
protected

◆ m_InWS2D

API::MatrixWorkspace_const_sptr Mantid::MDAlgorithms::ConvToMDBase::m_InWS2D
protected

◆ m_NDims

size_t Mantid::MDAlgorithms::ConvToMDBase::m_NDims
protected

◆ m_NSpectra

uint32_t Mantid::MDAlgorithms::ConvToMDBase::m_NSpectra
protected

◆ m_NumThreads

int Mantid::MDAlgorithms::ConvToMDBase::m_NumThreads
protected

◆ m_OutWSWrapper

std::shared_ptr<MDEventWSWrapper> Mantid::MDAlgorithms::ConvToMDBase::m_OutWSWrapper
protected

◆ m_QConverter

MDTransf_sptr Mantid::MDAlgorithms::ConvToMDBase::m_QConverter
protected

◆ m_UnitConversion

UnitsConversionHelper Mantid::MDAlgorithms::ConvToMDBase::m_UnitConversion
protected

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