Mantid
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::DataObjects::MDGridBox Class Reference

Templated class for a GRIDDED multi-dimensional event "box". More...

#include <MDGridBox.h>

Inheritance diagram for Mantid::DataObjects::MDGridBox:
Mantid::DataObjects::MDBoxBase< MDE, nd >

Public Types

using boxVector_t = std::vector< MDBoxBase< MDE, nd > * >
 Typedef for a vector of MDBoxBase pointers. More...
 
using sptr = std::shared_ptr< MDGridBox< MDE, nd > >
 Typedef for a shared pointer to a MDGridBox. More...
 
- Public Types inherited from Mantid::DataObjects::MDBoxBase< MDE, nd >
using sptr = std::shared_ptr< MDBoxBase< MDE, nd > >
 Convenience typedef for a shared pointer to a this type of class. More...
 

Public Member Functions

size_t addEvent (const MDE &event) override
 Add a single event. More...
 
size_t addEventUnsafe (const MDE &event) override
 Add a single event, with no mutex locking. More...
 
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) override
 
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) override
 
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) override
 
void calculateCentroid (coord_t *) const override
 The function used to satisfy IMDNode interface but the physical meaning is unclear. More...
 
void calculateCentroid (coord_t *, const int) const override
 The function used to satisfy IMDNode interface but the physical meaning is unclear. More...
 
void calculateGridCaches () override final
 
void centerpointBin (MDBin< MDE, nd > &bin, bool *fullyContained) const override
 Perform centerpoint binning of events. More...
 
void centroidSphere (Mantid::API::CoordTransform &radiusTransform, const coord_t radiusSquared, coord_t *centroid, signal_t &signal) const override
 Find the centroid around a sphere. More...
 
void clear () override
 
void clearDataFromMemory () override
 
void clearFileBacked (bool loadDiskBackedData) override
 
void generalBin (MDBin< MDE, nd > &, Mantid::Geometry::MDImplicitFunction &) const override
 General binning method for any shape. More...
 
const API::IMDNodegetBoxAtCoord (const coord_t *coords) override
 
std::vector< MDBoxBase< MDE, nd > * > & getBoxes ()
 For testing: get (a reference to) the vector of boxes. More...
 
void getBoxes (std::vector< API::IMDNode * > &outBoxes, const std::function< bool(API::IMDNode *)> &cond) final override
 
void getBoxes (std::vector< API::IMDNode * > &outBoxes, size_t maxDepth, bool leafOnly) override
 
void getBoxes (std::vector< API::IMDNode * > &outBoxes, size_t maxDepth, bool leafOnly, Mantid::Geometry::MDImplicitFunction *function) override
 
coord_tgetCentroid () const override
 The function used to satisfy IMDNode interface but the physical meaning is unclear. More...
 
API::IMDNodegetChild (size_t index) override
 
size_t getChildIndexFromID (size_t childId) const
 
size_t getDataInMemorySize () const override
 
std::vector< MDE > * getEventsCopy () override
 Return a copy of contained events. More...
 
Kernel::ISaveablegetISaveable () const override
 get const object responsible for saving the box to a file. More...
 
Kernel::ISaveablegetISaveable () override
 get object responsible for saving the box to a file. More...
 
bool getIsMasked () const override
 
uint64_t getNPoints () const override
 Uses the cached value of points stored in the grid box. More...
 
size_t getNumChildren () const override
 
size_t getNumDims () const override
 
size_t getNumMDBoxes () const override
 
uint64_t getTotalDataSize () const override
 
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 override
 Cylinder (peak) integration. More...
 
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 override
 Sphere (peak) integration. More...
 
bool isBox () const override
 to avoid casting (which need also the number of dimensions) method say if Node is a box. More...
 
void loadAndAddFrom (API::IBoxControllerIO *const, uint64_t, size_t) override
 Load the box data of specified size from the disk location provided using the class, respoinsible for the file IO. More...
 
void loadAndAddFrom (API::IBoxControllerIO *const, uint64_t, size_t, std::vector< coord_t > &) override
 Load the box data of specified size from the disk location provided using the class, responsible for the file IO. More...
 
void mask () override
 Setter for masking the box. More...
 
 MDGridBox (const MDGridBox< MDE, nd > &other, Mantid::API::BoxController *const otherBC)
 
 MDGridBox (Mantid::API::BoxController *const bc, const uint32_t depth, const std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > &extentsVector)
 
 MDGridBox (MDBox< MDE, nd > *box)
 
 MDGridBox (std::shared_ptr< API::BoxController > &bc, const uint32_t depth, const std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > &extentsVector)
 
void refreshCache (Kernel::ThreadScheduler *ts=nullptr) override
 
void reserveMemoryForLoad (uint64_t) override
 
void saveAt (API::IBoxControllerIO *const, uint64_t) const override
 Save the box at specific disk position using the class, respoinsible for the file IO. More...
 
void setChild (size_t index, MDGridBox< MDE, nd > *newChild)
 
void setChildren (const std::vector< API::IMDNode * > &otherBoxes, const size_t indexStart, const size_t indexEnd) override
 
void setFileBacked () override
 
void setFileBacked (const uint64_t, const size_t, const bool) override
 Recursively make all underlaying boxes file-backed. More...
 
void setNPoints (const uint64_t &n)
 
void splitAllIfNeeded (Kernel::ThreadScheduler *ts=nullptr) override
 
void splitContents (size_t index, Kernel::ThreadScheduler *ts=nullptr)
 
void transformDimensions (std::vector< double > &scaling, std::vector< double > &offset) override
 
void unmask () override
 Setter for unmasking the box. More...
 
 ~MDGridBox () override
 
- Public Member Functions inherited from Mantid::DataObjects::MDBoxBase< MDE, nd >
virtual size_t addEvent (const MDE &point)=0
 Add a single event. More...
 
virtual size_t addEvents (const std::vector< MDE > &events)
 
virtual size_t addEventsUnsafe (const std::vector< MDE > &events)
 
virtual size_t addEventUnsafe (const MDE &point)=0
 Add a single event, with no mutex locking. More...
 
virtual void calculateGridCaches ()
 
void calcVolume () override
 Compute the volume of the box by simply multiplying each dimension range. More...
 
virtual void centerpointBin (MDBin< MDE, nd > &bin, bool *fullyContained) const=0
 Perform centerpoint binning of events. More...
 
void centroidSphere (Mantid::API::CoordTransform &radiusTransform, const coord_t radiusSquared, coord_t *centroid, signal_t &signal) const override=0
 Find the centroid around a sphere. More...
 
virtual void generalBin (MDBin< MDE, nd > &bin, Mantid::Geometry::MDImplicitFunction &function) const=0
 General binning method for any shape. More...
 
const IMDNodegetBoxAtCoord (const coord_t *) override
 Returns the lowest-level box at the given coordinates. More...
 
Mantid::API::BoxControllergetBoxController () const override
 
Mantid::API::BoxControllergetBoxController () override
 
coord_t getBoxSize (size_t d)
 For testing: return the internal-stored size of each box in each dimension. More...
 
void getCenter (coord_t *const center) const override
 Get the center of the box. More...
 
unsigned int getCoordType () const override
 
uint32_t getDepth () const override
 For testing, mostly: return the recursion depth of this box. More...
 
signal_t getError () const override
 Returns the integrated error from all points within. More...
 
signal_t getErrorSquared () const override
 Returns the integrated error squared from all points within. More...
 
virtual signal_t getErrorSquaredNormalized () const
 Returns the integrated error squared from all points within, normalized for the cell volume. More...
 
virtual std::vector< MDE > * getEventsCopy ()=0
 Return a copy of contained events. More...
 
void getEventsData (std::vector< coord_t > &, size_t &nColumns) const override
 The method to convert events in a box into a table of coodrinates/signal/errors casted into coord_t type Used to conver events into plain data array. More...
 
std::string getEventType () const override
 
Mantid::Geometry::MDDimensionExtents< coord_t > & getExtents (size_t dim) override
 Get the extents for this box. More...
 
std::string getExtentsStr () const
 Returns the extents as a string, for convenience. More...
 
size_t getID () const override
 
coord_t getInverseVolume () const override
 Return the inverse of the volume of the cell. More...
 
const IMDNodegetParent () const override
 Return a pointer to the parent box (const) More...
 
IMDNodegetParent () override
 Return a pointer to the parent box. More...
 
signal_t getSignal () const override
 Returns the integrated signal from all points within. More...
 
signal_t getSignalNormalized () const override
 Returns the integrated signal from all points within, normalized for the cell volume. More...
 
virtual signal_t getTotalWeight () const
 Returns the total weight of all events within. More...
 
std::vector< Mantid::Kernel::VMDgetVertexes () const override
 
std::unique_ptr< coord_t[]> getVertexesArray (size_t &numVertices) const override
 
std::unique_ptr< coord_t[]> getVertexesArray (size_t &numVertices, const size_t outDimensions, const bool *maskDim) const override
 
coord_t getVolume () const
 Return the volume of the cell. More...
 
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 override=0
 Cylinder (peak) integration. More...
 
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 override=0
 Sphere (peak) integration. More...
 
bool isLeaf () const override final
 Is this node a leaf: getNumChildren() == 0. More...
 
 MDBoxBase (const MDBoxBase< MDE, nd > &box, Mantid::API::BoxController *const otherBC)
 
 MDBoxBase (Mantid::API::BoxController *const boxController, const uint32_t depth, const size_t boxID, const std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > &extentsVector)
 
 MDBoxBase (Mantid::API::BoxController *const boxController=nullptr, const uint32_t depth=0, const size_t boxID=UNDEF_SIZET)
 
void setDepth (uint32_t depth)
 For testing, mostly: set the recursion depth of this box. More...
 
void setErrorSquared (const signal_t ErrorSquared) override
 Sets the integrated error squared from all points within (mostly used for testing) More...
 
void setEventsData (const std::vector< coord_t > &) override
 The method to convert the table of data into vector of events Used to convert from a vector of values (2D table in Fortran representation (by rows) into box events. More...
 
void setExtents (double min[nd], double max[nd])
 Set the extents of this box. More...
 
void setExtents (size_t dim, double min, double max)
 Set the extents of this box. More...
 
void setID (const size_t &newID) override
 sets the special id, which specify the position of this node in the chain linearly ordered nodes More...
 
void setInverseVolume (const coord_t invVolume) override
 Sets the inverse of the volume of the cell. More...
 
void setParent (IMDNode *parent) override
 Return a pointer to the parent box. More...
 
void setSignal (const signal_t signal) override
 Sets the integrated signal from all points within (mostly used for testing) More...
 
virtual void setTotalWeight (const signal_t total)
 Sets the total weight from all points within (mostly used for testing) More...
 
void transformDimensions (std::vector< double > &scaling, std::vector< double > &offset) override
 

Private Member Functions

size_t calculateChildIndex (const MDE &event) const
 Compute the index of the child box for the given event. More...
 
size_t computeSizesFromSplit ()
 
void fillBoxShell (const size_t tot, const coord_t ChildInverseVolume)
 
size_t getLinearIndex (size_t *indices) const
 
size_t initGridBox ()
 common part of MDGridBox contstructor; More...
 
 MDGridBox ()=default
 Private constructor as it does not work without box controller. More...
 
 MDGridBox (const MDGridBox< MDE, nd > &box)
 private default copy constructor as the only correct constructor is the one with box controller More...
 

Private Attributes

coord_t diagonalSquared
 Length (squared) of the diagonal through every dimension = sum( boxSize[i]^2 ) Used in some calculations like peak integration. More...
 
std::vector< MDBoxBase< MDE, nd > * > m_Children
 1D array of boxes contained within. More...
 
double m_SubBoxSize [nd]
 size of each sub-box (the one this GridBox can be split into) in correspondent direction More...
 
size_t nPoints
 Cached number of points contained (including all sub-boxes) More...
 
size_t numBoxes
 How many boxes in the boxes vector? This is just to avoid boxes.size() calls. More...
 
size_t split [nd]
 Each dimension is split into this many equally-sized boxes. More...
 
size_t splitCumul [nd]
 Cumulative dimension splitting: split[n] = 1*split[0]*split[..]*split[n-1]. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Mantid::DataObjects::MDBoxBase< MDE, nd >
void calcCaches (const EventIterator &begin, const EventIterator &end)
 Calculates caches if the events are known. More...
 
- Protected Attributes inherited from Mantid::DataObjects::MDBoxBase< MDE, nd >
Mantid::Geometry::MDDimensionExtents< coord_textents [nd]
 Array of MDDimensionStats giving the extents and other stats on the box dimensions. More...
 
Mantid::API::BoxController *const m_BoxController
 The box splitting controller, shared with all boxes in the hierarchy. More...
 
coord_t m_centroid [nd]
 
std::mutex m_dataMutex
 Mutex for modifying the event list or box averages. More...
 
uint32_t m_depth
 Recursion depth. More...
 
signal_t m_errorSquared
 Cached total error (squared) from all points within. More...
 
size_t m_fileID
 The id which specify location of this box in a linear chain of ordered boxes (e.g. More...
 
coord_t m_inverseVolume
 Inverse of the volume of the cell, to be used for normalized signal. More...
 
Mantid::API::IMDNodem_parent
 Pointer to the parent of this box. NULL if no parent. More...
 
signal_t m_signal
 Cached total signal from all points within. More...
 
signal_t m_totalWeight
 Cached total weight of all events Set when refreshCache() is called. More...
 

Detailed Description

Templated class for a GRIDDED multi-dimensional event "box".

A MDGridBox contains a dense array with nd dimensions of MDBoxBase'es, each being either a regular MDBox or a MDGridBox itself.

This means that MDGridBoxes can be recursively gridded finer and finer.

Template Parameters
nd:: the number of dimensions that each MDLeanEvent will be tracking. an int > 0.
Author
Janik Zikovsky, SNS
Date
Dec 7, 2010

Definition at line 42 of file MDGridBox.h.

Member Typedef Documentation

◆ boxVector_t

using Mantid::DataObjects::MDGridBox::boxVector_t = std::vector<MDBoxBase<MDE, nd> *>

Typedef for a vector of MDBoxBase pointers.

Definition at line 206 of file MDGridBox.h.

◆ sptr

using Mantid::DataObjects::MDGridBox::sptr = std::shared_ptr<MDGridBox<MDE, nd> >

Typedef for a shared pointer to a MDGridBox.

Definition at line 203 of file MDGridBox.h.

Constructor & Destructor Documentation

◆ MDGridBox() [1/6]

Mantid::DataObjects::MDGridBox::MDGridBox ( std::shared_ptr< API::BoxController > &  bc,
const uint32_t  depth,
const std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > &  extentsVector 
)

◆ MDGridBox() [2/6]

Mantid::DataObjects::MDGridBox::MDGridBox ( Mantid::API::BoxController *const  bc,
const uint32_t  depth,
const std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > &  extentsVector 
)

◆ MDGridBox() [3/6]

Mantid::DataObjects::MDGridBox::MDGridBox ( MDBox< MDE, nd > *  box)

◆ MDGridBox() [4/6]

Mantid::DataObjects::MDGridBox::MDGridBox ( const MDGridBox< MDE, nd > &  other,
Mantid::API::BoxController *const  otherBC 
)

◆ ~MDGridBox()

Mantid::DataObjects::MDGridBox::~MDGridBox ( )
override

◆ MDGridBox() [5/6]

Mantid::DataObjects::MDGridBox::MDGridBox ( const MDGridBox< MDE, nd > &  box)
private

private default copy constructor as the only correct constructor is the one with box controller

◆ MDGridBox() [6/6]

Mantid::DataObjects::MDGridBox::MDGridBox ( )
privatedefault

Private constructor as it does not work without box controller.

Member Function Documentation

◆ addEvent()

size_t Mantid::DataObjects::MDGridBox::addEvent ( const MDE &  point)
overridevirtual

Add a single event.

Implements Mantid::DataObjects::MDBoxBase< MDE, nd >.

◆ addEventUnsafe()

size_t Mantid::DataObjects::MDGridBox::addEventUnsafe ( const MDE &  point)
overridevirtual

Add a single event, with no mutex locking.

Implements Mantid::DataObjects::MDBoxBase< MDE, nd >.

◆ buildAndAddEvent()

void Mantid::DataObjects::MDGridBox::buildAndAddEvent ( const signal_t  Signal,
const signal_t  errorSq,
const std::vector< coord_t > &  point,
uint16_t  expInfoIndex,
uint16_t  goniometerIndex,
uint32_t  detectorId 
)
override

◆ buildAndAddEvents()

size_t Mantid::DataObjects::MDGridBox::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 
)
override

◆ buildAndAddEventUnsafe()

void Mantid::DataObjects::MDGridBox::buildAndAddEventUnsafe ( const signal_t  Signal,
const signal_t  errorSq,
const std::vector< coord_t > &  point,
uint16_t  expInfoIndex,
uint16_t  goniometerIndex,
uint32_t  detectorId 
)
override

◆ calculateCentroid() [1/2]

void Mantid::DataObjects::MDGridBox::calculateCentroid ( coord_t ) const
inlineoverride

The function used to satisfy IMDNode interface but the physical meaning is unclear.

Definition at line 182 of file MDGridBox.h.

◆ calculateCentroid() [2/2]

void Mantid::DataObjects::MDGridBox::calculateCentroid ( coord_t ,
const int   
) const
inlineoverride

The function used to satisfy IMDNode interface but the physical meaning is unclear.

Definition at line 189 of file MDGridBox.h.

◆ calculateChildIndex()

size_t Mantid::DataObjects::MDGridBox::calculateChildIndex ( const MDE &  event) const
private

Compute the index of the child box for the given event.

◆ calculateGridCaches()

void Mantid::DataObjects::MDGridBox::calculateGridCaches ( )
finaloverridevirtual

◆ centerpointBin()

void Mantid::DataObjects::MDGridBox::centerpointBin ( MDBin< MDE, nd > &  bin,
bool *  fullyContained 
) const
overridevirtual

Perform centerpoint binning of events.

Parameters
bin:: MDBin object giving the limits of events to accept.
fullyContained:: optional bool array sized [nd] of which dimensions are known to be fully contained (for MDSplitBox)

Implements Mantid::DataObjects::MDBoxBase< MDE, nd >.

◆ centroidSphere()

void Mantid::DataObjects::MDGridBox::centroidSphere ( Mantid::API::CoordTransform radiusTransform,
const coord_t  radiusSquared,
coord_t centroid,
signal_t signal 
) const
overridevirtual

Find the centroid around a sphere.

Implements Mantid::DataObjects::MDBoxBase< MDE, nd >.

◆ clear()

void Mantid::DataObjects::MDGridBox::clear ( )
override

◆ clearDataFromMemory()

void Mantid::DataObjects::MDGridBox::clearDataFromMemory ( )
inlineoverride

Definition at line 69 of file MDGridBox.h.

◆ clearFileBacked()

void Mantid::DataObjects::MDGridBox::clearFileBacked ( bool  loadDiskBackedData)
override

◆ computeSizesFromSplit()

size_t Mantid::DataObjects::MDGridBox::computeSizesFromSplit ( )
private

◆ fillBoxShell()

void Mantid::DataObjects::MDGridBox::fillBoxShell ( const size_t  tot,
const coord_t  ChildInverseVolume 
)
private

◆ generalBin()

void Mantid::DataObjects::MDGridBox::generalBin ( MDBin< MDE, nd > &  bin,
Mantid::Geometry::MDImplicitFunction function 
) const
inlineoverridevirtual

General binning method for any shape.

Implements Mantid::DataObjects::MDBoxBase< MDE, nd >.

Definition at line 150 of file MDGridBox.h.

◆ getBoxAtCoord()

const API::IMDNode * Mantid::DataObjects::MDGridBox::getBoxAtCoord ( const coord_t coords)
override

◆ getBoxes() [1/4]

std::vector< MDBoxBase< MDE, nd > * > & Mantid::DataObjects::MDGridBox::getBoxes ( )
inline

For testing: get (a reference to) the vector of boxes.

Definition at line 177 of file MDGridBox.h.

◆ getBoxes() [2/4]

void Mantid::DataObjects::MDGridBox::getBoxes ( std::vector< API::IMDNode * > &  outBoxes,
const std::function< bool(API::IMDNode *)> &  cond 
)
finaloverride

◆ getBoxes() [3/4]

void Mantid::DataObjects::MDGridBox::getBoxes ( std::vector< API::IMDNode * > &  outBoxes,
size_t  maxDepth,
bool  leafOnly 
)
override

◆ getBoxes() [4/4]

void Mantid::DataObjects::MDGridBox::getBoxes ( std::vector< API::IMDNode * > &  outBoxes,
size_t  maxDepth,
bool  leafOnly,
Mantid::Geometry::MDImplicitFunction function 
)
override

◆ getCentroid()

coord_t * Mantid::DataObjects::MDGridBox::getCentroid ( ) const
inlineoverride

The function used to satisfy IMDNode interface but the physical meaning is unclear.

Definition at line 196 of file MDGridBox.h.

◆ getChild()

API::IMDNode * Mantid::DataObjects::MDGridBox::getChild ( size_t  index)
override

◆ getChildIndexFromID()

size_t Mantid::DataObjects::MDGridBox::getChildIndexFromID ( size_t  childId) const

◆ getDataInMemorySize()

size_t Mantid::DataObjects::MDGridBox::getDataInMemorySize ( ) const
override
Returns
the number of points (events) this box keeps in memory. May be different from total number of points for file based workspaces/boxes. Calculates recursively from child boxes

◆ getEventsCopy()

std::vector< MDE > * Mantid::DataObjects::MDGridBox::getEventsCopy ( )
overridevirtual

Return a copy of contained events.

Implements Mantid::DataObjects::MDBoxBase< MDE, nd >.

◆ getISaveable() [1/2]

Kernel::ISaveable * Mantid::DataObjects::MDGridBox::getISaveable ( ) const
inlineoverride

get const object responsible for saving the box to a file.

Returns
the const pointer the const object. The GridBox is not saveable at the moment so it is always NULL

Definition at line 63 of file MDGridBox.h.

◆ getISaveable() [2/2]

Kernel::ISaveable * Mantid::DataObjects::MDGridBox::getISaveable ( )
inlineoverride

get object responsible for saving the box to a file.

Returns
the const pointer to the object. The GridBox is not saveable at the moment so it is always NULL

Definition at line 59 of file MDGridBox.h.

◆ getIsMasked()

bool Mantid::DataObjects::MDGridBox::getIsMasked ( ) const
override

◆ getLinearIndex()

size_t Mantid::DataObjects::MDGridBox::getLinearIndex ( size_t *  indices) const
private

◆ getNPoints()

uint64_t Mantid::DataObjects::MDGridBox::getNPoints ( ) const
inlineoverride

Uses the cached value of points stored in the grid box.

Returns
the total number of points (events) in this box (in memory and in file if present)

Definition at line 97 of file MDGridBox.h.

◆ getNumChildren()

size_t Mantid::DataObjects::MDGridBox::getNumChildren ( ) const
override

◆ getNumDims()

size_t Mantid::DataObjects::MDGridBox::getNumDims ( ) const
override

◆ getNumMDBoxes()

size_t Mantid::DataObjects::MDGridBox::getNumMDBoxes ( ) const
override

◆ getTotalDataSize()

uint64_t Mantid::DataObjects::MDGridBox::getTotalDataSize ( ) const
inlineoverride
Returns
the amount of memory that the object's data ocupy. Currently uses cached value.

Definition at line 100 of file MDGridBox.h.

◆ initGridBox()

size_t Mantid::DataObjects::MDGridBox::initGridBox ( )
private

common part of MDGridBox contstructor;

◆ integrateCylinder()

void Mantid::DataObjects::MDGridBox::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
overridevirtual

Cylinder (peak) integration.

Implements Mantid::DataObjects::MDBoxBase< MDE, nd >.

◆ integrateSphere()

void Mantid::DataObjects::MDGridBox::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
overridevirtual

Sphere (peak) integration.

Implements Mantid::DataObjects::MDBoxBase< MDE, nd >.

◆ isBox()

bool Mantid::DataObjects::MDGridBox::isBox ( ) const
inlineoverride

to avoid casting (which need also the number of dimensions) method say if Node is a box.

if not, it is gridbox

Definition at line 111 of file MDGridBox.h.

◆ loadAndAddFrom() [1/2]

void Mantid::DataObjects::MDGridBox::loadAndAddFrom ( API::IBoxControllerIO * const  ,
uint64_t  ,
size_t   
)
inlineoverride

Load the box data of specified size from the disk location provided using the class, respoinsible for the file IO.

Definition at line 85 of file MDGridBox.h.

◆ loadAndAddFrom() [2/2]

void Mantid::DataObjects::MDGridBox::loadAndAddFrom ( API::IBoxControllerIO * const  ,
uint64_t  ,
size_t  ,
std::vector< coord_t > &   
)
inlineoverride

Load the box data of specified size from the disk location provided using the class, responsible for the file IO.

Overload that allows passing temporary memory

Definition at line 79 of file MDGridBox.h.

◆ mask()

void Mantid::DataObjects::MDGridBox::mask ( )
override

Setter for masking the box.

◆ refreshCache()

void Mantid::DataObjects::MDGridBox::refreshCache ( Kernel::ThreadScheduler ts = nullptr)
override

◆ reserveMemoryForLoad()

void Mantid::DataObjects::MDGridBox::reserveMemoryForLoad ( uint64_t  )
inlineoverride

Definition at line 88 of file MDGridBox.h.

◆ saveAt()

void Mantid::DataObjects::MDGridBox::saveAt ( API::IBoxControllerIO * const  ,
uint64_t   
) const
inlineoverride

Save the box at specific disk position using the class, respoinsible for the file IO.

Definition at line 74 of file MDGridBox.h.

◆ setChild()

void Mantid::DataObjects::MDGridBox::setChild ( size_t  index,
MDGridBox< MDE, nd > *  newChild 
)

◆ setChildren()

void Mantid::DataObjects::MDGridBox::setChildren ( const std::vector< API::IMDNode * > &  otherBoxes,
const size_t  indexStart,
const size_t  indexEnd 
)
override

◆ setFileBacked() [1/2]

void Mantid::DataObjects::MDGridBox::setFileBacked ( )
override

◆ setFileBacked() [2/2]

void Mantid::DataObjects::MDGridBox::setFileBacked ( const uint64_t  ,
const  size_t,
const bool   
)
override

Recursively make all underlaying boxes file-backed.

◆ setNPoints()

void Mantid::DataObjects::MDGridBox::setNPoints ( const uint64_t &  n)
inline

Definition at line 92 of file MDGridBox.h.

References n.

◆ splitAllIfNeeded()

void Mantid::DataObjects::MDGridBox::splitAllIfNeeded ( Kernel::ThreadScheduler ts = nullptr)
override

◆ splitContents()

void Mantid::DataObjects::MDGridBox::splitContents ( size_t  index,
Kernel::ThreadScheduler ts = nullptr 
)

◆ transformDimensions()

void Mantid::DataObjects::MDGridBox::transformDimensions ( std::vector< double > &  scaling,
std::vector< double > &  offset 
)
override

◆ unmask()

void Mantid::DataObjects::MDGridBox::unmask ( )
override

Setter for unmasking the box.

Member Data Documentation

◆ diagonalSquared

coord_t Mantid::DataObjects::MDGridBox::diagonalSquared
private

Length (squared) of the diagonal through every dimension = sum( boxSize[i]^2 ) Used in some calculations like peak integration.

Definition at line 232 of file MDGridBox.h.

◆ m_Children

std::vector<MDBoxBase<MDE, nd> *> Mantid::DataObjects::MDGridBox::m_Children
private

1D array of boxes contained within.

These map to the nd-array.

Definition at line 227 of file MDGridBox.h.

◆ m_SubBoxSize

double Mantid::DataObjects::MDGridBox::m_SubBoxSize[nd]
private

size of each sub-box (the one this GridBox can be split into) in correspondent direction

Definition at line 219 of file MDGridBox.h.

◆ nPoints

size_t Mantid::DataObjects::MDGridBox::nPoints
private

Cached number of points contained (including all sub-boxes)

Definition at line 235 of file MDGridBox.h.

◆ numBoxes

size_t Mantid::DataObjects::MDGridBox::numBoxes
private

How many boxes in the boxes vector? This is just to avoid boxes.size() calls.

Definition at line 223 of file MDGridBox.h.

◆ split

size_t Mantid::DataObjects::MDGridBox::split[nd]
private

Each dimension is split into this many equally-sized boxes.

Definition at line 213 of file MDGridBox.h.

◆ splitCumul

size_t Mantid::DataObjects::MDGridBox::splitCumul[nd]
private

Cumulative dimension splitting: split[n] = 1*split[0]*split[..]*split[n-1].

Definition at line 216 of file MDGridBox.h.


The documentation for this class was generated from the following file: