Mantid
Loading...
Searching...
No Matches
Classes | Functions
Mantid::DataObjects::detail Namespace Reference

Factory methods for creating MatrixWorkspaces. More...

Classes

struct  IsIndexInfo
 
struct  IsIndexInfo< Indexing::IndexInfo >
 

Functions

template<class T >
std::unique_ptr< T > createConcreteHelper ()
 
template<>
MANTID_DATAOBJECTS_DLL std::unique_ptr< API::MatrixWorkspacecreateConcreteHelper ()
 
template<>
MANTID_DATAOBJECTS_DLL std::unique_ptr< API::HistoWorkspacecreateConcreteHelper ()
 
template<>
std::unique_ptr< API::MatrixWorkspacecreateConcreteHelper ()
 
template<>
std::unique_ptr< API::HistoWorkspacecreateConcreteHelper ()
 
template<class T >
std::unique_ptr< T > createHelper ()
 
template<>
MANTID_DATAOBJECTS_DLL std::unique_ptr< API::HistoWorkspacecreateHelper ()
 
template<>
MANTID_DATAOBJECTS_DLL std::unique_ptr< EventWorkspacecreateHelper ()
 
template<>
MANTID_DATAOBJECTS_DLL std::unique_ptr< API::MatrixWorkspacecreateHelper ()
 
template<>
std::unique_ptr< EventWorkspacecreateHelper ()
 
template<>
std::unique_ptr< API::HistoWorkspacecreateHelper ()
 
template<>
std::unique_ptr< API::MatrixWorkspacecreateHelper ()
 
template<class UseIndexInfo >
void doInitializeFromParent (const API::MatrixWorkspace &parent, API::MatrixWorkspace &workspace, const bool differentSize)
 
template<>
void doInitializeFromParent< std::true_type > (const API::MatrixWorkspace &parent, API::MatrixWorkspace &child, const bool differentSize)
 Same as WorkspaceFactory::initializeFromParent, with modifications for changed IndexInfo. More...
 
template<class HistArg >
void fixDistributionFlag (API::MatrixWorkspace &, const HistArg &)
 
template<>
MANTID_DATAOBJECTS_DLL void fixDistributionFlag (API::MatrixWorkspace &workspace, const HistogramData::Histogram &histArg)
 
template<>
void fixDistributionFlag (API::MatrixWorkspace &workspace, const HistogramData::Histogram &histArg)
 
template<class UseIndexInfo >
void initializeFromParent (const API::MatrixWorkspace &parent, API::MatrixWorkspace &ws)
 Initialize a MatrixWorkspace from its parent including instrument, unit, number of spectra and Run. More...
 
template void MANTID_DATAOBJECTS_DLL initializeFromParent< std::false_type > (const API::MatrixWorkspace &, API::MatrixWorkspace &)
 
template void MANTID_DATAOBJECTS_DLL initializeFromParent< std::true_type > (const API::MatrixWorkspace &, API::MatrixWorkspace &)
 
MANTID_DATAOBJECTS_DLL HistogramData::Histogram stripData (HistogramData::Histogram histogram)
 

Detailed Description

Factory methods for creating MatrixWorkspaces.

A template parameter T specifies the type of (or a base type of) the created workspace:

Other arguments can include:

Available variants are:

create<T>(NumSpectra, Histogram)
create<T>(IndexInfo, Histogram)
create<T>(Instrument, NumSpectra, Histogram)
create<T>(Instrument, IndexInfo, Histogram)
create<T>(ParentWS)
create<T>(ParentWS, Histogram)
create<T>(ParentWS, NumSpectra, Histogram)
create<T>(ParentWS, IndexInfo, Histogram)
Base Instrument Class.
Definition: Instrument.h:47

In all cases a (smart) pointer to T is returned.

Author
Simon Heybrock
Date
2016

Function Documentation

◆ createConcreteHelper() [1/5]

template<class T >
std::unique_ptr< T > Mantid::DataObjects::detail::createConcreteHelper ( )

Definition at line 97 of file WorkspaceCreation.h.

◆ createConcreteHelper() [2/5]

template<>
MANTID_DATAOBJECTS_DLL std::unique_ptr< API::MatrixWorkspace > Mantid::DataObjects::detail::createConcreteHelper ( )

Definition at line 26 of file WorkspaceCreation.cpp.

◆ createConcreteHelper() [3/5]

template<>
MANTID_DATAOBJECTS_DLL std::unique_ptr< API::HistoWorkspace > Mantid::DataObjects::detail::createConcreteHelper ( )

Definition at line 26 of file WorkspaceCreation.cpp.

◆ createConcreteHelper() [4/5]

template<>
std::unique_ptr< API::MatrixWorkspace > Mantid::DataObjects::detail::createConcreteHelper ( )

Definition at line 26 of file WorkspaceCreation.cpp.

◆ createConcreteHelper() [5/5]

template<>
std::unique_ptr< API::HistoWorkspace > Mantid::DataObjects::detail::createConcreteHelper ( )

Definition at line 29 of file WorkspaceCreation.cpp.

◆ createHelper() [1/7]

template<class T >
std::unique_ptr< T > Mantid::DataObjects::detail::createHelper ( )

Definition at line 95 of file WorkspaceCreation.h.

◆ createHelper() [2/7]

template<>
MANTID_DATAOBJECTS_DLL std::unique_ptr< API::HistoWorkspace > Mantid::DataObjects::detail::createHelper ( )

Definition at line 20 of file WorkspaceCreation.cpp.

◆ createHelper() [3/7]

template<>
MANTID_DATAOBJECTS_DLL std::unique_ptr< EventWorkspace > Mantid::DataObjects::detail::createHelper ( )

Definition at line 20 of file WorkspaceCreation.cpp.

◆ createHelper() [4/7]

template<>
MANTID_DATAOBJECTS_DLL std::unique_ptr< API::MatrixWorkspace > Mantid::DataObjects::detail::createHelper ( )

Definition at line 20 of file WorkspaceCreation.cpp.

◆ createHelper() [5/7]

template<>
std::unique_ptr< EventWorkspace > Mantid::DataObjects::detail::createHelper ( )

Definition at line 20 of file WorkspaceCreation.cpp.

◆ createHelper() [6/7]

template<>
std::unique_ptr< API::HistoWorkspace > Mantid::DataObjects::detail::createHelper ( )

Definition at line 22 of file WorkspaceCreation.cpp.

◆ createHelper() [7/7]

template<>
std::unique_ptr< API::MatrixWorkspace > Mantid::DataObjects::detail::createHelper ( )

Definition at line 24 of file WorkspaceCreation.cpp.

◆ doInitializeFromParent()

template<class UseIndexInfo >
void Mantid::DataObjects::detail::doInitializeFromParent ( const API::MatrixWorkspace parent,
API::MatrixWorkspace workspace,
const bool  differentSize 
)

◆ doInitializeFromParent< std::true_type >()

template<>
void Mantid::DataObjects::detail::doInitializeFromParent< std::true_type > ( const API::MatrixWorkspace parent,
API::MatrixWorkspace child,
const bool  differentSize 
)

Same as WorkspaceFactory::initializeFromParent, with modifications for changed IndexInfo.

IndexInfo used for initialization this implies that the following data from the parent is not applicable (since no automatic mapping possible):

  • Bin masking
  • Spectrum numbers and detector ID grouping
  • Y axis

Definition at line 49 of file WorkspaceCreation.cpp.

References Mantid::API::MatrixWorkspace::indexInfo(), Mantid::Kernel::SingletonHolder< T >::Instance(), and Mantid::API::MatrixWorkspace::setIndexInfo().

◆ fixDistributionFlag() [1/3]

template<class HistArg >
void Mantid::DataObjects::detail::fixDistributionFlag ( API::MatrixWorkspace ,
const HistArg &   
)

Definition at line 111 of file WorkspaceCreation.h.

Referenced by Mantid::DataObjects::create().

◆ fixDistributionFlag() [2/3]

template<>
MANTID_DATAOBJECTS_DLL void Mantid::DataObjects::detail::fixDistributionFlag ( API::MatrixWorkspace workspace,
const HistogramData::Histogram &  histArg 
)

Definition at line 80 of file WorkspaceCreation.cpp.

References workspace.

◆ fixDistributionFlag() [3/3]

template<>
void Mantid::DataObjects::detail::fixDistributionFlag ( API::MatrixWorkspace workspace,
const HistogramData::Histogram &  histArg 
)

Definition at line 80 of file WorkspaceCreation.cpp.

References workspace.

◆ initializeFromParent()

template<class UseIndexInfo >
void Mantid::DataObjects::detail::initializeFromParent ( const API::MatrixWorkspace parent,
API::MatrixWorkspace ws 
)

Initialize a MatrixWorkspace from its parent including instrument, unit, number of spectra and Run.

initializeFromParent

Parameters
parent
ws

Definition at line 71 of file WorkspaceCreation.cpp.

References Mantid::API::MatrixWorkspace::mutableX(), Mantid::API::MatrixWorkspace::x(), and Mantid::API::MatrixWorkspace::y().

◆ initializeFromParent< std::false_type >()

template void MANTID_DATAOBJECTS_DLL Mantid::DataObjects::detail::initializeFromParent< std::false_type > ( const API::MatrixWorkspace ,
API::MatrixWorkspace  
)

◆ initializeFromParent< std::true_type >()

template void MANTID_DATAOBJECTS_DLL Mantid::DataObjects::detail::initializeFromParent< std::true_type > ( const API::MatrixWorkspace ,
API::MatrixWorkspace  
)

◆ stripData()

HistogramData::Histogram Mantid::DataObjects::detail::stripData ( HistogramData::Histogram  histogram)

Definition at line 14 of file WorkspaceCreation.cpp.

Referenced by Mantid::DataObjects::create().