Mantid
Loading...
Searching...
No Matches
IMDEventWorkspace.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
10#include "MantidAPI/DllConfig.h"
13#include "MantidAPI/IMDNode.h"
23
24namespace Mantid {
25namespace API {
26
37public:
39
42
44 IMDEventWorkspace_uptr cloneEmpty() const { return IMDEventWorkspace_uptr(doCloneEmpty()); }
45
47 virtual void initialize() = 0;
49
51 virtual std::vector<Mantid::Geometry::MDDimensionExtents<coord_t>> getMinimumExtents(size_t depth = 2) const = 0;
52
55 virtual std::vector<std::string> getBoxControllerStats() const = 0;
56
59
60 virtual void getBoxes(std::vector<API::IMDNode *> &boxes, size_t maxDepth, bool leafOnly) = 0;
61
63 virtual bool isFileBacked() const = 0;
64
66 virtual void setFileBacked() = 0;
67
69 virtual void splitBox() = 0;
70
72 virtual void refreshCache() = 0;
73
75 virtual void setMinRecursionDepth(size_t depth) = 0;
76
78 virtual std::string getEventTypeName() const = 0;
80 virtual size_t sizeofEvent() const = 0;
81
84
85 bool fileNeedsUpdating() const;
86
87 void setFileNeedsUpdating(bool value);
88
89 bool threadSafe() const override;
90
91 virtual void setCoordinateSystem(const Mantid::Kernel::SpecialCoordinateSystem coordinateSystem) = 0;
92
95 virtual void setDisplayNormalizationHisto(Mantid::API::MDNormalization preferredNormalizationHisto) = 0;
97
99 virtual void setDisplayNormalization(Mantid::API::MDNormalization preferredNormalization) = 0;
101
102 // Check if this class has an oriented lattice on a sample object
103 virtual bool hasOrientedLattice() const override { return MultipleExperimentInfos::hasOrientedLattice(); }
104
105 virtual void setBox(API::IMDNode *box) = 0;
106
107protected:
110
111 const std::string toString() const override;
115
116private:
117 IMDEventWorkspace *doClone() const override = 0;
118 IMDEventWorkspace *doCloneEmpty() const override = 0;
119};
120
121} // namespace API
122
123} // namespace Mantid
double value
The value of the point.
Definition: FitMW.cpp:51
Abstract base class for multi-dimension event workspaces (MDEventWorkspace).
virtual Mantid::API::BoxController_const_sptr getBoxController() const =0
Mantid::API::MDNormalization displayNormalizationHisto() const override=0
virtual Mantid::API::BoxController_sptr getBoxController()=0
IMDEventWorkspace_uptr clone() const
Returns a clone of the workspace.
virtual void setFileBacked()=0
set filebacked on the contained box
virtual void initialize()=0
Perform initialization after dimensions (and others) have been set.
virtual std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > getMinimumExtents(size_t depth=2) const =0
Get the minimum extents that hold the data.
virtual void setDisplayNormalizationHisto(Mantid::API::MDNormalization preferredNormalizationHisto)=0
Preferred visual normalizaiton method for any histo workspaces created from this.
virtual void splitBox()=0
Split the top-level MDBox into a MDGridBox.
virtual void setBox(API::IMDNode *box)=0
virtual bool hasOrientedLattice() const override
virtual void setDisplayNormalization(Mantid::API::MDNormalization preferredNormalization)=0
Preferred visual normalization method.
virtual std::vector< std::string > getBoxControllerStats() const =0
Returns some information about the box controller, to be displayed in the GUI, for example.
virtual void refreshCache()=0
Refresh the cache (integrated signal of each box)
IMDEventWorkspace & operator=(const IMDEventWorkspace &)=delete
Mantid::API::MDNormalization displayNormalization() const override=0
virtual void setCoordinateSystem(const Mantid::Kernel::SpecialCoordinateSystem coordinateSystem)=0
virtual void splitAllIfNeeded(Kernel::ThreadScheduler *ts)=0
Split all boxes that exceed the split threshold.
virtual size_t sizeofEvent() const =0
Return the size(in bytes) for the event, which this workspace contains.
virtual void getBoxes(std::vector< API::IMDNode * > &boxes, size_t maxDepth, bool leafOnly)=0
IMDEventWorkspace * doClone() const override=0
Virtual clone method. Not implemented to force implementation in children.
virtual std::string getEventTypeName() const =0
Return the type of event contained, as a string. MDEvent or MDLeanEvent.
virtual void setMinRecursionDepth(size_t depth)=0
Recurse down to a minimum depth.
virtual bool isFileBacked() const =0
IMDEventWorkspace * doCloneEmpty() const override=0
Virtual cloneEmpty method.
IMDEventWorkspace_uptr cloneEmpty() const
Returns a default-initialized clone of the workspace.
bool m_fileNeedsUpdating
Marker set to true when a file-backed workspace needs its back-end file updated (by calling SaveMD(Up...
IMDEventWorkspace(const IMDEventWorkspace &)=default
Protected copy constructor. May be used by childs for cloning.
Basic MD Workspace Abstract Class.
Definition: IMDWorkspace.h:40
Small class that allows a MDEventWorkspace or a MDHistoWorkspace to hold several ExperimentInfo class...
The ThreadScheduler object defines how tasks are allocated to threads and in what order.
std::unique_ptr< IMDEventWorkspace > IMDEventWorkspace_uptr
unique pointer to Mantid::API::IMDEventWorkspace
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.
Definition: IMDIterator.h:25
SpecialCoordinateSystem
Special coordinate systems for Q3D.
std::enable_if< std::is_pointer< Arg >::value, bool >::type threadSafe(Arg workspace)
Thread-safety check Checks the workspace to ensure it is suitable for multithreaded access.
Definition: MultiThreaded.h:22
Helper class which provides the Collimation Length for SANS instruments.