14#include "MantidDataObjects/DllConfig.h"
24namespace DataObjects {
44 using sptr = std::shared_ptr<MDEventWorkspace<MDE, nd>>;
55 std::unique_ptr<MDEventWorkspace>
clone()
const {
return std::unique_ptr<MDEventWorkspace>(doClone()); }
58 std::unique_ptr<MDEventWorkspace>
cloneEmpty()
const {
return std::unique_ptr<MDEventWorkspace>(doCloneEmpty()); }
61 void initialize()
override;
63 const std::string id()
const override;
69 size_t getNumDims()
const override;
72 uint64_t getNPoints()
const override;
73 uint64_t
getNEvents()
const override {
return getNPoints(); }
76 std::vector<std::unique_ptr<Mantid::API::IMDIterator>>
77 createIterators(
size_t suggestedNumCores = 1,
88 bool isInBounds(
const coord_t *coords)
const;
98 std::set<coord_t> getBoxBoundaryBisectsOnLine(
const Kernel::VMD &start,
const Kernel::VMD &end,
const size_t num_d,
105 size_t getMemorySize()
const override;
116 std::vector<std::string> getBoxControllerStats()
const override;
119 bool isFileBacked()
const override {
return m_BoxController->isFileBacked(); }
121 std::vector<coord_t> estimateResolution()
const override;
127 void splitBox()
override;
129 void refreshCache()
override;
131 std::string getEventTypeName()
const override;
135 void setMinRecursionDepth(
size_t minDepth)
override;
141 void getBoxes(std::vector<API::IMDNode *> &boxes,
size_t maxDepth,
bool leafOnly)
override {
142 this->getBox()->getBoxes(boxes, maxDepth, leafOnly);
145 size_t addEvent(
const MDE &event);
147 size_t addEvents(
const std::vector<MDE> &events);
149 std::vector<Mantid::Geometry::MDDimensionExtents<coord_t>> getMinimumExtents(
size_t depth = 2)
const override;
168 void setMDMasking(std::unique_ptr<Mantid::Geometry::MDImplicitFunction> maskingRegion)
override;
171 void clearMDMasking()
override;
178 virtual void setFileBacked(
const std::string &fileName);
179 void setFileBacked()
override;
182 void clearFileBacked(
bool LoadFileBackedData)
override;
199 const size_t num_boundaries,
const coord_t length,
const coord_t dir_current_dim,
200 const coord_t box_size, std::set<coord_t> &mid_points)
const;
206 std::unique_ptr<MDBoxBase<MDE, nd>>
data;
#define TMDE_CLASS
Macro to make declaring template classes faster.
Abstract base class for multi-dimension event workspaces (MDEventWorkspace).
Templated super-class of a multi-dimensional event "box".
Templated class for the multi-dimensional event workspace.
Kernel::SpecialCoordinateSystem m_coordSystem
std::shared_ptr< MDEventWorkspace< MDE, nd > > sptr
Typedef for a shared pointer of this kind of event workspace.
void getBoxes(std::vector< API::IMDNode * > &boxes, size_t maxDepth, bool leafOnly) override
std::unique_ptr< MDEventWorkspace > cloneEmpty() const
Returns a default-initialized clone of the workspace.
API::BoxController_sptr m_BoxController
Box controller in use.
uint64_t getNEvents() const override
const MDBoxBase< MDE, nd > * getBox() const
bool isGridBox()
Return true if the underlying box is a MDGridBox.
MDEventWorkspace< MDE, nd > & operator=(const MDEventWorkspace< MDE, nd > &other)=delete
std::unique_ptr< MDEventWorkspace > clone() const
Returns a clone of the workspace.
bool isFileBacked() const override
MDEventWorkspace * doCloneEmpty() const override
Virtual cloneEmpty method.
Mantid::API::MDNormalization m_displayNormalization
Display normalization for the event workspace itself.
Mantid::API::MDNormalization m_displayNormalizationHisto
Display normalization to pass onto generated histo workspaces.
MDE MDEventType
Typedef to access the MDEventType.
void setBox(API::IMDNode *box) override
Set the base-level box contained within.
size_t sizeofEvent() const override
return the size (in bytes) of an event, this workspace contains
MDBoxBase< MDE, nd > * getBox()
std::unique_ptr< MDBoxBase< MDE, nd > > data
MDBox containing all of the events in the workspace.
MDEventWorkspace * doClone() const override
Virtual clone method. Not implemented to force implementation in children.
Mantid::API::BoxController_const_sptr getBoxController() const override
Returns the BoxController used in this workspace.
virtual ~MDEventWorkspace() override=default
Mantid::API::BoxController_sptr getBoxController() override
Returns the BoxController used in this workspace.
Templated class for a GRIDDED multi-dimensional event "box".
An "ImplicitFunction" defining a hyper-cuboid-shaped region in N dimensions.
The concrete, templated class for properties.
The ThreadScheduler object defines how tasks are allocated to threads and in what order.
std::shared_ptr< ITableWorkspace > ITableWorkspace_sptr
shared pointer to Mantid::API::ITableWorkspace
std::shared_ptr< const BoxController > BoxController_const_sptr
Shared ptr to a const BoxController.
std::shared_ptr< BoxController > BoxController_sptr
Shared ptr to BoxController.
MDNormalization
Enum describing different ways to normalize the signal in a MDWorkspace.
@ VolumeNormalization
Divide the signal by the volume of the box/bin.
MDEventWorkspace< MDLeanEvent< nd >, nd > MDLeanEventWS
MDEventWorkspace< MDEvent< nd >, nd > MDEventWS
Shorthand for the instantiated MDEventWorkspace types.
SpecialCoordinateSystem
Special coordinate systems for Q3D.
Helper class which provides the Collimation Length for SANS instruments.
float coord_t
Typedef for the data type to use for coordinate axes in MD objects such as MDBox, MDEventWorkspace,...
double signal_t
Typedef for the signal recorded in a MDBox, etc.
MANTID_DATAOBJECTS_EXTERN_TEMPLATE(Kernel::PropertyWithValue< std::shared_ptr< DataObjects::MDEventWS< 1 > > >)