21namespace DataObjects {
41 using sptr = std::shared_ptr<MDEventWorkspace<MDE, nd>>;
52 std::unique_ptr<MDEventWorkspace>
clone()
const {
return std::unique_ptr<MDEventWorkspace>(doClone()); }
55 std::unique_ptr<MDEventWorkspace>
cloneEmpty()
const {
return std::unique_ptr<MDEventWorkspace>(doCloneEmpty()); }
58 void initialize()
override;
60 const std::string id()
const override;
66 size_t getNumDims()
const override;
69 uint64_t getNPoints()
const override;
70 uint64_t
getNEvents()
const override {
return getNPoints(); }
73 std::vector<std::unique_ptr<Mantid::API::IMDIterator>>
74 createIterators(
size_t suggestedNumCores = 1,
85 bool isInBounds(
const coord_t *coords)
const;
95 std::set<coord_t> getBoxBoundaryBisectsOnLine(
const Kernel::VMD &start,
const Kernel::VMD &end,
const size_t num_d,
102 size_t getMemorySize()
const override;
113 std::vector<std::string> getBoxControllerStats()
const override;
116 bool isFileBacked()
const override {
return m_BoxController->isFileBacked(); }
118 std::vector<coord_t> estimateResolution()
const override;
124 void splitBox()
override;
126 void refreshCache()
override;
128 std::string getEventTypeName()
const override;
132 void setMinRecursionDepth(
size_t minDepth)
override;
138 void getBoxes(std::vector<API::IMDNode *> &boxes,
size_t maxDepth,
bool leafOnly)
override {
139 this->getBox()->getBoxes(boxes, maxDepth, leafOnly);
142 size_t addEvent(
const MDE &event);
144 size_t addEvents(
const std::vector<MDE> &events);
146 std::vector<Mantid::Geometry::MDDimensionExtents<coord_t>> getMinimumExtents(
size_t depth = 2)
const override;
165 void setMDMasking(std::unique_ptr<Mantid::Geometry::MDImplicitFunction> maskingRegion)
override;
168 void clearMDMasking()
override;
175 virtual void setFileBacked(
const std::string &fileName);
176 void setFileBacked()
override;
179 void clearFileBacked(
bool LoadFileBackedData)
override;
196 const size_t num_boundaries,
const coord_t length,
const coord_t dir_current_dim,
197 const coord_t box_size, std::set<coord_t> &mid_points)
const;
203 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 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.
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.