24template <
typename T>
class MDDimensionExtents;
25class MDImplicitFunction;
31class IBoxControllerIO;
51 virtual void setFileBacked(
const uint64_t ,
const size_t ,
const bool ) = 0;
72 std::vector<coord_t> &) = 0;
91 virtual size_t getID()
const = 0;
94 virtual void setID(
const size_t &newID) = 0;
121 virtual void setChildren(
const std::vector<IMDNode *> &boxes,
const size_t indexStart,
const size_t indexEnd) = 0;
132 virtual void getBoxes(std::vector<IMDNode *> &boxes,
size_t maxDepth,
bool leafOnly) = 0;
135 virtual void getBoxes(std::vector<IMDNode *> &boxes,
size_t maxDepth,
bool leafOnly,
139 virtual void getBoxes(std::vector<IMDNode *> &outBoxes,
const std::function<
bool(
IMDNode *)> &cond) = 0;
157 virtual void getEventsData(std::vector<coord_t> &coordTable,
size_t &nColumns)
const = 0;
167 uint16_t expInfoIndex, uint16_t goniometerIndex, uint32_t detectorId) = 0;
170 uint16_t expInfoIndex, uint16_t goniometerIndex, uint32_t detectorId) = 0;
172 virtual size_t buildAndAddEvents(
const std::vector<signal_t> &sigErrSq,
const std::vector<coord_t> &Coord,
173 const std::vector<uint16_t> &expInfoIndex,
174 const std::vector<uint16_t> &goniometerIndex,
175 const std::vector<uint32_t> &detectorId) = 0;
196 const bool useOnePercentBackgroundCorrection =
true)
const = 0;
225 std::vector<signal_t> &signal_fit)
const = 0;
258 virtual std::unique_ptr<coord_t[]>
getVertexesArray(
size_t &numVertices,
const size_t outDimensions,
259 const bool *maskDim)
const = 0;
std::map< DeltaEMode::Type, std::string > index
This class is used by MDBox and MDGridBox in order to intelligently determine optimal behavior.
The header describes interface to IO Operations perfomed by the box controller May be replaced by a b...
virtual signal_t getSignalNormalized() const =0
virtual void loadAndAddFrom(API::IBoxControllerIO *const, uint64_t, size_t, std::vector< coord_t > &)=0
Load the additional box data of specified size from the disk location provided using the class,...
virtual size_t getNumMDBoxes() const =0
Get the total # of unsplit MDBoxes contained.
virtual void setSignal(const signal_t)=0
virtual IMDNode * getParent()=0
Return a pointer to the parent box.
virtual const IMDNode * getParent() const =0
Return a pointer to the parent box (const)
virtual void clear()=0
Clear all contained data including precalculated averages.
virtual bool isBox() const =0
virtual void calculateCentroid(coord_t *) const =0
Calculate the centroid of this box and all sub-boxes.
virtual void mask()=0
Setter for masking the box.
virtual void integrateCylinder(Mantid::API::CoordTransform &radiusTransform, const coord_t radius, const coord_t length, signal_t &signal, signal_t &errorSquared, std::vector< signal_t > &signal_fit) const =0
Cylinder (peak) integration The CoordTransform object could be used for more cylinder reduces the dim...
virtual void getBoxes(std::vector< IMDNode * > &boxes, size_t maxDepth, bool leafOnly)=0
Fill a vector with all the boxes who are the childred of this one up to a certain depth.
static bool CompareFilePosition(const IMDNode *const a, const IMDNode *const b)
Helper method for sorting MDBoxBasees by file position.
virtual signal_t getSignalByNEvents() const
virtual size_t getNumChildren() const =0
Get the # of children MDBoxBase'es (non-recursive)
virtual coord_t getInverseVolume() const =0
virtual Kernel::ISaveable * getISaveable() const =0
Return the pointer to the sconst tructure responsible for saving the box on disk if the workspace occ...
virtual void clearDataFromMemory()=0
drop event data from memory but keep averages
virtual void refreshCache(Kernel::ThreadScheduler *=nullptr)=0
Recalculate signal etc.
virtual void centroidSphere(Mantid::API::CoordTransform &radiusTransform, const coord_t radiusSquared, coord_t *centroid, signal_t &signal) const =0
Find the centroid of all events contained within by doing a weighted average of their coordinates.
virtual void integrateSphere(Mantid::API::CoordTransform &radiusTransform, const coord_t radiusSquared, signal_t &signal, signal_t &errorSquared, const coord_t innerRadiusSquared=0.0, const bool useOnePercentBackgroundCorrection=true) const =0
Sphere (peak) integration The CoordTransform object could be used for more complex shapes,...
virtual std::string getEventType() const =0
virtual void splitAllIfNeeded(Mantid::Kernel::ThreadScheduler *=nullptr)=0
Split sub-boxes, if this is possible and neede for this box.
virtual void saveAt(API::IBoxControllerIO *const, uint64_t) const =0
Save the box at specific disk position using the class, respoinsible for the file IO.
virtual std::unique_ptr< coord_t[]> getVertexesArray(size_t &numVertices) const =0
virtual unsigned int getCoordType() const =0
virtual bool getIsMasked() const =0
Getter for the masking.
virtual std::vector< Mantid::Kernel::VMD > getVertexes() const =0
virtual void calculateCentroid(coord_t *, const int) const =0
Calculate the centroid of this box and all sub-boxes.
virtual size_t buildAndAddEvents(const std::vector< signal_t > &sigErrSq, const std::vector< coord_t > &Coord, const std::vector< uint16_t > &expInfoIndex, const std::vector< uint16_t > &goniometerIndex, const std::vector< uint32_t > &detectorId)=0
Add several events from the vector of event parameters.
virtual void calcVolume()=0
virtual void loadAndAddFrom(API::IBoxControllerIO *const, uint64_t, size_t)=0
Load the additional box data of specified size from the disk location provided using the class,...
virtual void setErrorSquared(const signal_t)=0
virtual signal_t getErrorSquared() const =0
virtual void getEventsData(std::vector< coord_t > &coordTable, size_t &nColumns) const =0
The method to convert events in a box into a table of coodrinates/signal/errors casted into coord_t t...
virtual void transformDimensions(std::vector< double > &scaling, std::vector< double > &offset)=0
virtual void getCenter(coord_t *const) const =0
virtual void buildAndAddEvent(const signal_t Signal, const signal_t errorSq, const std::vector< coord_t > &point, uint16_t expInfoIndex, uint16_t goniometerIndex, uint32_t detectorId)=0
Add a single event defined by its components.
virtual coord_t * getCentroid() const =0
Get the centroid of this box and all sub-boxes.
virtual size_t getID() const =0
virtual ~IMDNode()=default
This is an interface to MDBox or MDGridBox of an MDWorkspace.
virtual uint64_t getNPoints() const =0
Get total number of points both in memory and on file if present;.
virtual void buildAndAddEventUnsafe(const signal_t Signal, const signal_t errorSq, const std::vector< coord_t > &point, uint16_t expInfoIndex, uint16_t goniometerIndex, uint32_t detectorId)=0
Add a single event, with no mutex locking.
virtual Mantid::API::BoxController * getBoxController()=0
virtual size_t getNumDims() const =0
Get number of dimensions, the box with this interface has.
virtual void clearFileBacked(bool loadFileData)=0
if node was fileBacked, the method clears file-backed information
virtual void setChildren(const std::vector< IMDNode * > &boxes, const size_t indexStart, const size_t indexEnd)=0
Sets the children from a vector of children.
virtual void unmask()=0
Setter for unmasking the box.
virtual Mantid::Geometry::MDDimensionExtents< coord_t > & getExtents(size_t dim)=0
virtual void setID(const size_t &newID)=0
sets the special id, which specify the position of this node in the chain linearly ordered nodes
virtual void getBoxes(std::vector< IMDNode * > &boxes, size_t maxDepth, bool leafOnly, Mantid::Geometry::MDImplicitFunction *function)=0
Fill a vector with all the boxes who are the childred of this one up to a certain depth and selected ...
virtual Kernel::ISaveable * getISaveable()=0
Return the pointer to the structure responsible for saving the box on disk if the workspace occupies ...
virtual size_t getDataInMemorySize() const =0
get size of the data located in memory, it is equivalent to getNPoints above for memory based workspa...
virtual uint32_t getDepth() const =0
virtual Mantid::API::BoxController * getBoxController() const =0
get box controller
virtual signal_t getError() const =0
virtual void setParent(IMDNode *parent)=0
Return a pointer to the parent box.
virtual uint64_t getTotalDataSize() const =0
virtual void setFileBacked(const uint64_t, const size_t, const bool)=0
initiate the structure responsible for swapping the box on HDD if out of memory.
virtual std::unique_ptr< coord_t[]> getVertexesArray(size_t &numVertices, const size_t outDimensions, const bool *maskDim) const =0
virtual const IMDNode * getBoxAtCoord(const coord_t *)=0
virtual void getBoxes(std::vector< IMDNode * > &outBoxes, const std::function< bool(IMDNode *)> &cond)=0
Fill a vector with all the boxes who are satisfying the condition.
virtual void setEventsData(const std::vector< coord_t > &coordTable)=0
The method to convert the table of data into vector of events Used to load events from plain binary f...
virtual bool isLeaf() const =0
Is this node a leaf: getNumChildren() == 0.
static void sortObjByID(std::vector< IMDNode * > &boxes)
Static method for sorting a list of MDBoxBase pointers by their file position, ascending.
virtual signal_t getSignal() const =0
virtual void reserveMemoryForLoad(uint64_t)=0
virtual IMDNode * getChild(size_t index)=0
Return the indexth child MDBoxBase.
virtual void setInverseVolume(const coord_t)=0
virtual void setFileBacked()=0
initiate the structure responsible for swapping the box on HDD if out of memory with default paramete...
Simple class that holds the extents (min/max) of a given dimension in a MD workspace or MDBox.
An "ImplicitFunction" defining a hyper-cuboid-shaped region in N dimensions.
An interface for objects that can be cached or saved to disk.
The ThreadScheduler object defines how tasks are allocated to threads and in what order.
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.