Mantid
|
MDHistoDimensionBuilder : More...
#include <MDHistoDimensionBuilder.h>
Public Member Functions | |
IMDDimension_sptr | create () |
MDHistoDimension * | createRaw () |
size_t | getNumBins () const |
MDHistoDimensionBuilder () | |
Constructor. More... | |
void | setFrameName (std::string frameName) |
Setter for the frame name. More... | |
void | setId (std::string id) |
void | setMax (double max) |
void | setMin (double min) |
void | setName (const std::string &name) |
void | setNumBins (size_t nbins) |
void | setUnits (const Kernel::UnitLabel &units) |
Static Public Member Functions | |
template<typename CoordT > | |
static void | resizeToFitMDBox (CoordT &min, CoordT &max) |
Push the min/max values out by a defined amount. More... | |
Private Attributes | |
std::string | m_frameName |
Frame name. More... | |
std::string | m_id |
Cached id. More... | |
double | m_max |
Cached max. More... | |
bool | m_maxSet |
Flag indicating that max has been set. More... | |
double | m_min |
Cached min. More... | |
bool | m_minSet |
Flag indicating that min has been set. More... | |
std::string | m_name |
Cached name. More... | |
size_t | m_nbins |
Cached nbins. More... | |
Kernel::UnitLabel | m_units |
Cached units. More... | |
A builder for the MDHistogram workspace. Required to construct a valid MDHistogram dimension, where values can cannot easily be brought togeter at once. Also allows potential construction values to be overwritten simply.
Definition at line 28 of file MDHistoDimensionBuilder.h.
Mantid::Geometry::MDHistoDimensionBuilder::MDHistoDimensionBuilder | ( | ) |
Constructor.
Definition at line 17 of file MDHistoDimensionBuilder.cpp.
IMDDimension_sptr Mantid::Geometry::MDHistoDimensionBuilder::create | ( | ) |
Definition at line 113 of file MDHistoDimensionBuilder.cpp.
References createRaw().
Referenced by Mantid::MDAlgorithms::LoadSQW2::createEnDimension(), Mantid::MDAlgorithms::FitMD::createEventOutputWorkspace(), and Mantid::MDAlgorithms::LoadSQW2::createQDimension().
MDHistoDimension * Mantid::Geometry::MDHistoDimensionBuilder::createRaw | ( | ) |
Definition at line 76 of file MDHistoDimensionBuilder.cpp.
References Mantid::Kernel::UnitLabel::ascii(), m_frameName, m_id, m_max, m_maxSet, m_min, m_minSet, m_name, m_nbins, m_units, and Mantid::Geometry::makeMDFrameFactoryChain().
Referenced by create().
|
inline |
Definition at line 60 of file MDHistoDimensionBuilder.h.
|
inlinestatic |
Push the min/max values out by a defined amount.
This is primarily used for moving the dimensions boundaries so that an MDGridBox can encompass all of the data and not chop of events if some events lie exactly on a boundary
min | A reference to the minimum value [InOut] |
max | A reference to the maximum value [InOut] |
Definition at line 38 of file MDHistoDimensionBuilder.h.
Referenced by Mantid::MDAlgorithms::LoadSQW2::createEnDimension(), Mantid::MDAlgorithms::LoadSQW2::createQDimension(), and Mantid::MDAlgorithms::ConvertToMD::findMinMax().
void Mantid::Geometry::MDHistoDimensionBuilder::setFrameName | ( | std::string | frameName | ) |
Setter for the frame name.
frameName | the frame name |
Definition at line 70 of file MDHistoDimensionBuilder.cpp.
References m_frameName.
Referenced by Mantid::MDAlgorithms::LoadSQW2::createEnDimension(), Mantid::MDAlgorithms::FitMD::createEventOutputWorkspace(), and Mantid::MDAlgorithms::LoadSQW2::createQDimension().
void Mantid::Geometry::MDHistoDimensionBuilder::setId | ( | std::string | id | ) |
Definition at line 34 of file MDHistoDimensionBuilder.cpp.
References m_id.
Referenced by Mantid::MDAlgorithms::LoadSQW2::createEnDimension(), Mantid::MDAlgorithms::FitMD::createEventOutputWorkspace(), and Mantid::MDAlgorithms::LoadSQW2::createQDimension().
void Mantid::Geometry::MDHistoDimensionBuilder::setMax | ( | double | max | ) |
Definition at line 55 of file MDHistoDimensionBuilder.cpp.
References m_max, and m_maxSet.
Referenced by Mantid::MDAlgorithms::LoadSQW2::createEnDimension(), Mantid::MDAlgorithms::FitMD::createEventOutputWorkspace(), and Mantid::MDAlgorithms::LoadSQW2::createQDimension().
void Mantid::Geometry::MDHistoDimensionBuilder::setMin | ( | double | min | ) |
Definition at line 46 of file MDHistoDimensionBuilder.cpp.
References m_min, and m_minSet.
Referenced by Mantid::MDAlgorithms::LoadSQW2::createEnDimension(), Mantid::MDAlgorithms::FitMD::createEventOutputWorkspace(), and Mantid::MDAlgorithms::LoadSQW2::createQDimension().
void Mantid::Geometry::MDHistoDimensionBuilder::setName | ( | const std::string & | name | ) |
Definition at line 25 of file MDHistoDimensionBuilder.cpp.
References m_name, and Mantid::Kernel::Strings::strip().
Referenced by Mantid::MDAlgorithms::LoadSQW2::createEnDimension(), Mantid::MDAlgorithms::FitMD::createEventOutputWorkspace(), and Mantid::MDAlgorithms::LoadSQW2::createQDimension().
void Mantid::Geometry::MDHistoDimensionBuilder::setNumBins | ( | size_t | nbins | ) |
Definition at line 64 of file MDHistoDimensionBuilder.cpp.
References m_nbins.
Referenced by Mantid::MDAlgorithms::LoadSQW2::createEnDimension(), Mantid::MDAlgorithms::FitMD::createEventOutputWorkspace(), and Mantid::MDAlgorithms::LoadSQW2::createQDimension().
void Mantid::Geometry::MDHistoDimensionBuilder::setUnits | ( | const Kernel::UnitLabel & | units | ) |
Definition at line 40 of file MDHistoDimensionBuilder.cpp.
References m_units.
Referenced by Mantid::MDAlgorithms::LoadSQW2::createEnDimension(), Mantid::MDAlgorithms::FitMD::createEventOutputWorkspace(), and Mantid::MDAlgorithms::LoadSQW2::createQDimension().
|
private |
Frame name.
Definition at line 82 of file MDHistoDimensionBuilder.h.
Referenced by createRaw(), and setFrameName().
|
private |
Cached id.
Definition at line 68 of file MDHistoDimensionBuilder.h.
Referenced by createRaw(), and setId().
|
private |
Cached max.
Definition at line 74 of file MDHistoDimensionBuilder.h.
Referenced by createRaw(), and setMax().
|
private |
Flag indicating that max has been set.
Definition at line 80 of file MDHistoDimensionBuilder.h.
Referenced by createRaw(), and setMax().
|
private |
Cached min.
Definition at line 72 of file MDHistoDimensionBuilder.h.
Referenced by createRaw(), and setMin().
|
private |
Flag indicating that min has been set.
Definition at line 78 of file MDHistoDimensionBuilder.h.
Referenced by createRaw(), and setMin().
|
private |
Cached name.
Definition at line 66 of file MDHistoDimensionBuilder.h.
Referenced by createRaw(), and setName().
|
private |
Cached nbins.
Definition at line 76 of file MDHistoDimensionBuilder.h.
Referenced by createRaw(), and setNumBins().
|
private |
Cached units.
Definition at line 70 of file MDHistoDimensionBuilder.h.
Referenced by createRaw(), and setUnits().