|
Mantid
|
#include <MDEventFactory.h>
Public Types | |
| enum | BoxType { MDBoxWithLean = 0 , MDGridBoxWithLean = 1 , MDBoxWithFat = 2 , MDGridBoxWithFat = 3 , NumBoxTypes = 4 } |
| enum defines fifferent box types generated by createBox factory We will use typecast from integer to these types so it is important to define consisten numbers to these types More... | |
Static Public Member Functions | |
| static API::IMDNode * | createBox (size_t nDimensions, BoxType Type, API::BoxController_sptr &splitter, const std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > &extentsVector=std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > >(), const uint32_t depth=0, const size_t nBoxEvents=UNDEF_SIZET, const size_t boxID=UNDEF_SIZET) |
| Create a MDBox or MDGridBoxof the given type. | |
| static API::IMDEventWorkspace_sptr | CreateMDWorkspace (size_t nd, const std::string &eventType="MDLeanEvent", const Mantid::API::MDNormalization &preferredNormalization=Mantid::API::MDNormalization::VolumeNormalization, const Mantid::API::MDNormalization &preferredNormalizationHisto=Mantid::API::MDNormalization::VolumeNormalization) |
| Create a MDEventWorkspace of the given type. | |
| static size_t | getMaxNumDim () |
| Returns max number of MD dimensions allowed by current Mantid version. | |
Private Types | |
| enum | { MAX_MD_DIMENSIONS_NUM = 9 } |
| definition which states how many dimensions to generate. More... | |
| using | fpCreateBox = API::IMDNode *(*)(API::BoxController *, const std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > &, const uint32_t, const size_t, const size_t) |
| using | fpCreateMDWS = API::IMDEventWorkspace *(*)(const std::string &, const Mantid::API::MDNormalization &, const Mantid::API::MDNormalization &) |
Static Private Member Functions | |
| template<size_t nd> | |
| static API::IMDNode * | createMDBoxFat (API::BoxController *splitter, const std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > &extentsVector, const uint32_t depth, const size_t nBoxEvents, const size_t boxID) |
| Method to create MDBox for events (Constructor wrapper) with given number of dimensions. | |
| template<size_t nd> | |
| static API::IMDNode * | createMDBoxLean (API::BoxController *splitter, const std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > &extentsVector, const uint32_t depth, const size_t nBoxEvents, const size_t boxID) |
| Method to create MDBox for lean events (Constructor wrapper) with given number of dimensions. | |
| static API::IMDNode * | createMDBoxWrong (API::BoxController *, const std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > &, const uint32_t, const size_t, const size_t) |
| Method to create any MDBox type with 0 number of dimensions. | |
| template<size_t nd> | |
| static API::IMDNode * | createMDGridBoxFat (API::BoxController *splitter, const std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > &extentsVector, const uint32_t depth, const size_t nBoxEvents=0, const size_t boxID=0) |
| Method to create MDGridBox for events (Constructor wrapper) with given number of dimensions. | |
| template<size_t nd> | |
| static API::IMDNode * | createMDGridBoxLean (API::BoxController *splitter, const std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > &extentsVector, const uint32_t depth, const size_t nBoxEvents=0, const size_t boxID=0) |
| Method to create MDGridBox for lean events (Constructor wrapper) with given number of dimensions. | |
| template<size_t nd> | |
| static API::IMDEventWorkspace * | createMDWorkspaceND (const std::string &eventType, const Mantid::API::MDNormalization &preferredNormalization, const Mantid::API::MDNormalization &preferredNormalizationHisto) |
| Template to create md workspace with specific number of dimensions. | |
| template<> | |
| API::IMDEventWorkspace * | createMDWorkspaceND (const std::string &eventType, const Mantid::API::MDNormalization &preferredNormalization, const Mantid::API::MDNormalization &preferredNormalizationHisto) |
| Template to create md workspace w ith 0 number of dimentisons. | |
Static Private Attributes | |
| static std::vector< fpCreateBox > | boxCreatorFP |
| static vector, conaining the pointers to the functions creating MD boxes | |
| static LOOP< MAX_MD_DIMENSIONS_NUM > | CODE_GENERATOR |
| static std::vector< fpCreateMDWS > | wsCreatorFP |
Friends | |
| template<size_t nd> | |
| class | LOOP |
Definition at line 30 of file MDEventFactory.h.
|
private |
Definition at line 67 of file MDEventFactory.h.
|
private |
Definition at line 76 of file MDEventFactory.h.
|
private |
definition which states how many dimensions to generate.
This defines the number of dimensions in MD wokspace supported by Mantid IF THIS NUMBER CHANGES, ONE HAS TO RUN generate_mdevent_declarations.py located with MDEventFactory.cpp file TO REINSTANTIATE AUTOGENERATED CODE
| Enumerator | |
|---|---|
| MAX_MD_DIMENSIONS_NUM | |
Definition at line 36 of file MDEventFactory.h.
enum defines fifferent box types generated by createBox factory We will use typecast from integer to these types so it is important to define consisten numbers to these types
| Enumerator | |
|---|---|
| MDBoxWithLean | |
| MDGridBoxWithLean | |
| MDBoxWithFat | |
| MDGridBoxWithFat | |
| NumBoxTypes | |
Definition at line 42 of file MDEventFactory.h.
|
static |
Create a MDBox or MDGridBoxof the given type.
| nDimensions | :: number of dimensions |
| Type | :: enum descibing the box (MDBox or MDGridBox) and the event type (MDEvent or MDLeanEvent) |
| splitter | :: shared pointer to the box controller responsible for splitting boxes. The BC is not incremented as boxes take usual pointer from this pointer |
| extentsVector,: | box extents in all n-dimensions (min-max) |
| depth | :: the depth of the box within the box tree |
| nBoxEvents | :: if defined, specify the memory the box should allocate to accept events – not used for MDGridBox |
| boxID | :: the unique identifier, referencing location of the box in 1D linked list of boxes. – not used for MDGridBox |
Definition at line 203 of file MDEventFactory.cpp.
References boxCreatorFP, MAX_MD_DIMENSIONS_NUM, and NumBoxTypes.
Referenced by Mantid::DataObjects::MDBoxFlatTree::restoreBoxTree().
|
staticprivate |
Method to create MDBox for events (Constructor wrapper) with given number of dimensions.
| splitter | :: BoxController that controls how boxes split |
| extentsVector | :: vector defining the extents of the box in all n-dimensions |
| depth | :: splitting depth of the new box. |
| nBoxEvents | :: number of events to reserve memory for (if needed). |
| boxID | :: id for the given box |
Definition at line 316 of file MDEventFactory.cpp.
|
staticprivate |
Method to create MDBox for lean events (Constructor wrapper) with given number of dimensions.
| splitter | :: BoxController that controls how boxes split |
| extentsVector | :: vector defining the extents of the box in all n-dimensions |
| depth | :: splitting depth of the new box. |
| nBoxEvents | :: number of events to reserve memory for (if needed). |
| boxID | :: id for the given box |
Definition at line 300 of file MDEventFactory.cpp.
|
staticprivate |
Method to create any MDBox type with 0 number of dimensions.
As it is wrong, just throws
Definition at line 284 of file MDEventFactory.cpp.
Referenced by Mantid::DataObjects::LOOP< 0 >::EXEC().
|
staticprivate |
Method to create MDGridBox for events (Constructor wrapper) with given number of dimensions.
| splitter | :: BoxController that controls how boxes split |
| extentsVector | :: vector defining the extents of the box in all n-dimensions |
| depth | :: splitting depth of the new box. |
| nBoxEvents | – not used |
| boxID | :: — not used |
Definition at line 348 of file MDEventFactory.cpp.
|
staticprivate |
Method to create MDGridBox for lean events (Constructor wrapper) with given number of dimensions.
| splitter | :: BoxController that controls how boxes split |
| extentsVector | :: vector defining the extents of the box in all n-dimensions |
| depth | :: splitting depth of the new box. |
| nBoxEvents | – not used |
| boxID | :: — not used |
Definition at line 332 of file MDEventFactory.cpp.
|
static |
Create a MDEventWorkspace of the given type.
| nd | :: number of dimensions |
| eventType | :: string describing the event type (MDEvent or MDLeanEvent) |
| preferredNormalization | the preferred normalization for the event workspace |
| preferredNormalizationHisto | preferred normalization for histo workspaces which derive from this event workspace |
Definition at line 177 of file MDEventFactory.cpp.
References MAX_MD_DIMENSIONS_NUM, and wsCreatorFP.
Referenced by Mantid::MDAlgorithms::ConvertSpiceDataToRealSpace::createDataMDWorkspace(), Mantid::MDAlgorithms::FitMD::createEventOutputWorkspace(), Mantid::MDAlgorithms::ConvertCWSDExpToMomentum::createExperimentMDWorkspace(), Mantid::MDAlgorithms::ConvertCWSDMDtoHKL::createHKLMDWorkspace(), Mantid::MDAlgorithms::ConvertSpiceDataToRealSpace::createMonitorMDWorkspace(), Mantid::MDAlgorithms::MergeMD::createOutputWorkspace(), Mantid::MDAlgorithms::ConvertHFIRSCDtoMDE::exec(), Mantid::MDAlgorithms::ConvertToDetectorFaceMD::exec(), Mantid::MDAlgorithms::ConvertToDiffractionMDWorkspace::exec(), Mantid::MDAlgorithms::CreateMDWorkspace::exec(), Mantid::MDAlgorithms::ImportMDEventWorkspace::exec(), Mantid::MDAlgorithms::LoadDNSSCD::exec(), and Mantid::MDAlgorithms::LoadMD::exec().
|
staticprivate |
Template to create md workspace with specific number of dimensions.
| eventType | – type of event (lean or full) to generate workspace for |
| preferredNormalization | the preferred normalization for the event workspace |
| preferredNormalizationHisto | the preferred normalization for a derived histo workspace |
Definition at line 249 of file MDEventFactory.cpp.
|
staticprivate |
Template to create md workspace w ith 0 number of dimentisons.
As this is wrong, just throws. Used as terminator and check for the wrong dimensions number
| eventType | – type of event (lean or full) to generate workspace for - -does not actually used. |
| preferredNormalization | the preferred normalization of the workspace |
| preferredNormalizationHisto | the preferred normalization of the derived histo workspace |
Definition at line 269 of file MDEventFactory.cpp.
References UNUSED_ARG.
|
inlinestatic |
Returns max number of MD dimensions allowed by current Mantid version.
Definition at line 64 of file MDEventFactory.h.
Referenced by Mantid::DataObjects::MDBoxFlatTree::restoreBoxTree().
|
friend |
Definition at line 116 of file MDEventFactory.h.
|
staticprivate |
static vector, conaining the pointers to the functions creating MD boxes
Definition at line 72 of file MDEventFactory.h.
Referenced by createBox(), Mantid::DataObjects::LOOP< nd >::EXEC(), and Mantid::DataObjects::LOOP< 0 >::EXEC().
|
staticprivate |
Definition at line 118 of file MDEventFactory.h.
|
staticprivate |
Definition at line 79 of file MDEventFactory.h.
Referenced by CreateMDWorkspace(), Mantid::DataObjects::LOOP< nd >::EXEC(), and Mantid::DataObjects::LOOP< 0 >::EXEC().