Mantid
|
#include <IMDNode.h>
Public Member Functions | |
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. More... | |
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. More... | |
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. More... | |
virtual void | calculateCentroid (coord_t *) const =0 |
Calculate the centroid of this box and all sub-boxes. More... | |
virtual void | calculateCentroid (coord_t *, const int) const =0 |
Calculate the centroid of this box and all sub-boxes. More... | |
virtual void | calcVolume ()=0 |
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. More... | |
virtual void | clear ()=0 |
Clear all contained data including precalculated averages. More... | |
virtual void | clearDataFromMemory ()=0 |
drop event data from memory but keep averages More... | |
virtual void | clearFileBacked (bool loadFileData)=0 |
if node was fileBacked, the method clears file-backed information More... | |
virtual const IMDNode * | getBoxAtCoord (const coord_t *)=0 |
virtual Mantid::API::BoxController * | getBoxController () const =0 |
get box controller More... | |
virtual Mantid::API::BoxController * | getBoxController ()=0 |
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. More... | |
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 by the function. More... | |
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. More... | |
virtual void | getCenter (coord_t *const) const =0 |
virtual coord_t * | getCentroid () const =0 |
Get the centroid of this box and all sub-boxes. More... | |
virtual IMDNode * | getChild (size_t index)=0 |
Return the indexth child MDBoxBase. More... | |
virtual unsigned int | getCoordType () const =0 |
virtual size_t | getDataInMemorySize () const =0 |
get size of the data located in memory, it is equivalent to getNPoints above for memory based workspace but may be different for file based one ; More... | |
virtual uint32_t | getDepth () const =0 |
virtual signal_t | getError () const =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 type Used to save events from plain binary file. More... | |
virtual std::string | getEventType () const =0 |
virtual Mantid::Geometry::MDDimensionExtents< coord_t > & | getExtents (size_t dim)=0 |
virtual size_t | getID () const =0 |
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 occupies too much memory. More... | |
virtual Kernel::ISaveable * | getISaveable ()=0 |
Return the pointer to the structure responsible for saving the box on disk if the workspace occupies too much memory. More... | |
virtual bool | getIsMasked () const =0 |
Getter for the masking. More... | |
virtual uint64_t | getNPoints () const =0 |
Get total number of points both in memory and on file if present;. More... | |
virtual size_t | getNumChildren () const =0 |
Get the # of children MDBoxBase'es (non-recursive) More... | |
virtual size_t | getNumDims () const =0 |
Get number of dimensions, the box with this interface has. More... | |
virtual size_t | getNumMDBoxes () const =0 |
Get the total # of unsplit MDBoxes contained. More... | |
virtual const IMDNode * | getParent () const =0 |
Return a pointer to the parent box (const) More... | |
virtual IMDNode * | getParent ()=0 |
Return a pointer to the parent box. More... | |
virtual signal_t | getSignal () const =0 |
virtual signal_t | getSignalByNEvents () const |
virtual signal_t | getSignalNormalized () const =0 |
virtual uint64_t | getTotalDataSize () const =0 |
virtual std::vector< Mantid::Kernel::VMD > | getVertexes () const =0 |
virtual std::unique_ptr< coord_t[]> | getVertexesArray (size_t &numVertices) const =0 |
virtual std::unique_ptr< coord_t[]> | getVertexesArray (size_t &numVertices, const size_t outDimensions, const bool *maskDim) const =0 |
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 dimensions to two values. More... | |
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, e.g. More... | |
virtual bool | isBox () const =0 |
virtual bool | isLeaf () const =0 |
Is this node a leaf: getNumChildren() == 0. More... | |
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, respoinsible for the file IO and append them to the box. More... | |
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, respoinsible for the file IO and append them to the box. More... | |
virtual void | mask ()=0 |
Setter for masking the box. More... | |
virtual void | refreshCache (Kernel::ThreadScheduler *=nullptr)=0 |
Recalculate signal etc. More... | |
virtual void | reserveMemoryForLoad (uint64_t)=0 |
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. More... | |
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. More... | |
virtual void | setErrorSquared (const signal_t)=0 |
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 file. More... | |
virtual void | setFileBacked ()=0 |
initiate the structure responsible for swapping the box on HDD if out of memory with default parameters (it does not know its place on HDD and was not saved). More... | |
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. More... | |
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 More... | |
virtual void | setInverseVolume (const coord_t)=0 |
virtual void | setParent (IMDNode *parent)=0 |
Return a pointer to the parent box. More... | |
virtual void | setSignal (const signal_t)=0 |
virtual void | splitAllIfNeeded (Mantid::Kernel::ThreadScheduler *=nullptr)=0 |
Split sub-boxes, if this is possible and neede for this box. More... | |
virtual void | transformDimensions (std::vector< double > &scaling, std::vector< double > &offset)=0 |
virtual void | unmask ()=0 |
Setter for unmasking the box. More... | |
virtual | ~IMDNode ()=default |
This is an interface to MDBox or MDGridBox of an MDWorkspace. More... | |
Static Public Member Functions | |
static bool | CompareFilePosition (const IMDNode *const a, const IMDNode *const b) |
Helper method for sorting MDBoxBasees by file position. More... | |
static void | sortObjByID (std::vector< IMDNode * > &boxes) |
Static method for sorting a list of MDBoxBase pointers by their file position, ascending. More... | |
|
virtualdefault |
This is an interface to MDBox or MDGridBox of an MDWorkspace.
|
pure virtual |
Add a single event defined by its components.
|
pure virtual |
Add several events from the vector of event parameters.
|
pure virtual |
Add a single event, with no mutex locking.
|
pure virtual |
Calculate the centroid of this box and all sub-boxes.
Referenced by Mantid::MDAlgorithms::FindPeaksMD::findPeaks().
|
pure virtual |
Calculate the centroid of this box and all sub-boxes.
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
Referenced by Mantid::DataObjects::MDBoxFlatTree::restoreBoxTree().
|
pure virtual |
Find the centroid of all events contained within by doing a weighted average of their coordinates.
radiusTransform | :: nd-to-1 coordinate transformation that converts from these dimensions to the distance (squared) from the center of the sphere. | |
radiusSquared | :: radius^2 below which to integrate | |
[out] | centroid | :: array of size [nd]; its centroid will be added |
[out] | signal | :: set to the integrated signal |
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
Clear all contained data including precalculated averages.
Referenced by Mantid::MDAlgorithms::MergeMDFiles::loadEventsFromSubBoxes().
|
pure virtual |
drop event data from memory but keep averages
|
pure virtual |
if node was fileBacked, the method clears file-backed information
loadFileData | – if true, the data on HDD and not yet in memory are loaded into memory before deleting fileBacked information, if false, all on HDD contents are discarded, which can break the data integrity (used by destructor) |
|
inlinestatic |
Helper method for sorting MDBoxBasees by file position.
MDGridBoxes return 0 for file position and so aren't sorted.
a | :: an MDBoxBase pointer |
b | :: an MDBoxBase pointer |
Definition at line 279 of file IMDNode.h.
References getID().
Referenced by sortObjByID().
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
get box controller
Implemented in Mantid::DataObjects::MDBoxBase.
Referenced by Mantid::DataObjects::MDBoxSaveable::flushData(), Mantid::DataObjects::MDBoxSaveable::load(), and Mantid::DataObjects::MDBoxSaveable::save().
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
Fill a vector with all the boxes who are the childred of this one up to a certain depth.
Referenced by Mantid::MDAlgorithms::ApplyDetailedBalanceMD::applyDetailedBalance(), Mantid::MDAlgorithms::PolarizationAngleCorrectionMD::applyPolarizationAngleCorrection(), Mantid::MDAlgorithms::DgsScatteredTransmissionCorrectionMD::correctForTransmission(), Mantid::MDAlgorithms::MergeMD::doPlus(), Mantid::MDAlgorithms::DivideMD::execEventScalar(), Mantid::MDAlgorithms::MultiplyMD::execEventScalar(), and Mantid::MDAlgorithms::FlippingRatioCorrectionMD::executeTemplatedMDE().
|
pure virtual |
Fill a vector with all the boxes who are the childred of this one up to a certain depth and selected by the function.
|
pure virtual |
Fill a vector with all the boxes who are satisfying the condition.
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
Get the centroid of this box and all sub-boxes.
Referenced by Mantid::MDAlgorithms::FindPeaksMD::findPeaks().
|
pure virtual |
Return the indexth child MDBoxBase.
Referenced by Mantid::MDAlgorithms::CompareMDWorkspaces::compare2Boxes().
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
get size of the data located in memory, it is equivalent to getNPoints above for memory based workspace but may be different for file based one ;
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
Referenced by Mantid::MDAlgorithms::CompareMDWorkspaces::compare2Boxes().
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
Referenced by Mantid::MDAlgorithms::CompareMDWorkspaces::compare2Boxes().
|
pure virtual |
The method to convert events in a box into a table of coodrinates/signal/errors casted into coord_t type Used to save events from plain binary file.
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
Referenced by Mantid::MDAlgorithms::CompareMDWorkspaces::compare2Boxes().
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
Referenced by Mantid::MDAlgorithms::CompareMDWorkspaces::compare2Boxes(), CompareFilePosition(), and Mantid::MDAlgorithms::MergeMDFiles::loadEventsFromSubBoxes().
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
Referenced by Mantid::MDAlgorithms::CompareMDWorkspaces::compare2Boxes(), and Mantid::DataObjects::MDBoxFlatTree::restoreBoxTree().
|
pure virtual |
Return the pointer to the sconst tructure responsible for saving the box on disk if the workspace occupies too much memory.
|
pure virtual |
Return the pointer to the structure responsible for saving the box on disk if the workspace occupies too much memory.
|
pure virtual |
Getter for the masking.
|
pure virtual |
Get total number of points both in memory and on file if present;.
Referenced by Mantid::MDAlgorithms::CompareMDWorkspaces::compare2Boxes(), Mantid::MDAlgorithms::CompareMDWorkspaces::compareMDEventWorkspaces(), Mantid::MDAlgorithms::FindPeaksMD::findPeaks(), and getSignalByNEvents().
|
pure virtual |
Get the # of children MDBoxBase'es (non-recursive)
Referenced by Mantid::MDAlgorithms::CompareMDWorkspaces::compare2Boxes().
|
pure virtual |
Get number of dimensions, the box with this interface has.
|
pure virtual |
Get the total # of unsplit MDBoxes contained.
|
pure virtual |
Return a pointer to the parent box (const)
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
Return a pointer to the parent box.
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
Referenced by Mantid::MDAlgorithms::CompareMDWorkspaces::compare2Boxes(), and getSignalByNEvents().
|
inlinevirtual |
Definition at line 266 of file IMDNode.h.
References getNPoints(), and getSignal().
Referenced by Mantid::MDAlgorithms::FindPeaksMD::findPeaks().
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
Cylinder (peak) integration The CoordTransform object could be used for more cylinder reduces the dimensions to two values.
radiusTransform | :: nd-to-1 coordinate transformation that converts from these dimensions to the distance (squared) from the center of the sphere. |
radius | :: radius of cylinder below which to integrate |
length | :: length of cylinder below which to integrate |
signal | [out] :: set to the integrated signal |
errorSquared | [out] :: set to the integrated squared error. |
signal_fit | [out] :: array of values for the fit. |
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
Sphere (peak) integration The CoordTransform object could be used for more complex shapes, e.g.
"lentil" integration, as long as it reduces the dimensions to a single value.
radiusTransform | :: nd-to-1 coordinate transformation that converts from these dimensions to the distance (squared) from the center of the sphere. |
radiusSquared | :: radius^2 below which to integrate |
signal | [out] :: set to the integrated signal |
errorSquared | [out] :: set to the integrated squared error. |
innerRadiusSquared | :: radius^2 of inner background |
useOnePercentBackgroundCorrection | :: if one percent correction should be applied to background. |
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
|
pure virtual |
Is this node a leaf: getNumChildren() == 0.
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
Load the additional box data of specified size from the disk location provided using the class, respoinsible for the file IO and append them to the box.
|
pure virtual |
Load the additional box data of specified size from the disk location provided using the class, respoinsible for the file IO and append them to the box.
Allow for passing temporary memory
Referenced by Mantid::DataObjects::MDBoxSaveable::load(), and Mantid::MDAlgorithms::MergeMDFiles::loadEventsFromSubBoxes().
|
pure virtual |
Setter for masking the box.
|
pure virtual |
Recalculate signal etc.
|
pure virtual |
Referenced by Mantid::MDAlgorithms::MergeMDFiles::loadEventsFromSubBoxes().
|
pure virtual |
Save the box at specific disk position using the class, respoinsible for the file IO.
Referenced by Mantid::DataObjects::MDBoxSaveable::save().
|
pure virtual |
Sets the children from a vector of children.
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
Referenced by Mantid::DataObjects::MDBoxFlatTree::restoreBoxTree().
|
pure virtual |
The method to convert the table of data into vector of events Used to load events from plain binary file.
coordTable | – vector of events data, which would be packed into events |
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
initiate the structure responsible for swapping the box on HDD if out of memory with default parameters (it does not know its place on HDD and was not saved).
|
pure virtual |
initiate the structure responsible for swapping the box on HDD if out of memory.
Referenced by Mantid::DataObjects::MDBoxFlatTree::restoreBoxTree().
|
pure virtual |
sets the special id, which specify the position of this node in the chain linearly ordered nodes
Implemented in Mantid::DataObjects::MDBoxBase.
Referenced by Mantid::DataObjects::MDBoxFlatTree::restoreBoxTree().
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
Referenced by Mantid::DataObjects::MDBoxFlatTree::restoreBoxTree().
|
pure virtual |
Return a pointer to the parent box.
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
Referenced by Mantid::DataObjects::MDBoxFlatTree::restoreBoxTree().
|
inlinestatic |
Static method for sorting a list of MDBoxBase pointers by their file position, ascending.
This should optimize the speed of loading a bit by reducing the amount of disk seeking.
boxes | :: ref to a vector of boxes. It will be sorted in-place. |
Definition at line 292 of file IMDNode.h.
References CompareFilePosition().
Referenced by Mantid::MDAlgorithms::BinMD::binByIterating(), Mantid::MDAlgorithms::TransformMD::doTransform(), Mantid::DataObjects::MDBoxFlatTree::initFlatStructure(), and Mantid::MDAlgorithms::SliceMD::slice().
|
pure virtual |
Split sub-boxes, if this is possible and neede for this box.
|
pure virtual |
Implemented in Mantid::DataObjects::MDBoxBase.
|
pure virtual |
Setter for unmasking the box.