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

Templated class for the multi-dimensional event workspace. More...

#include <MDEventWorkspace.h>

Inheritance diagram for Mantid::DataObjects::MDEventWorkspace:
Mantid::API::IMDEventWorkspace Mantid::API::IMDWorkspace Mantid::API::MultipleExperimentInfos Mantid::API::Workspace Mantid::API::MDGeometry Mantid::Kernel::DataItem

Public Types

using MDEventType = MDE
 Typedef to access the MDEventType. More...
 
using sptr = std::shared_ptr< MDEventWorkspace< MDE, nd > >
 Typedef for a shared pointer of this kind of event workspace. More...
 

Public Member Functions

size_t addEvent (const MDE &event)
 
size_t addEvents (const std::vector< MDE > &events)
 
void clearFileBacked (bool LoadFileBackedData) override
 if workspace was file-backed, this should clear file-backed information and close back-up files. More...
 
void clearMDMasking () override
 Clear masking. More...
 
std::unique_ptr< MDEventWorkspaceclone () const
 Returns a clone of the workspace. More...
 
std::unique_ptr< MDEventWorkspacecloneEmpty () const
 Returns a default-initialized clone of the workspace. More...
 
std::vector< std::unique_ptr< Mantid::API::IMDIterator > > createIterators (size_t suggestedNumCores=1, Mantid::Geometry::MDImplicitFunction *function=nullptr) const override
 Creates a new iterator pointing to the first cell (box) in the workspace. More...
 
Mantid::API::MDNormalization displayNormalization () const override
 
Mantid::API::MDNormalization displayNormalizationHisto () const override
 
std::vector< coord_testimateResolution () const override
 
MDBoxBase< MDE, nd > * getBox ()
 
const MDBoxBase< MDE, nd > * getBox () const
 
std::set< coord_tgetBoxBoundaryBisectsOnLine (const Kernel::VMD &start, const Kernel::VMD &end, const size_t num_d, const Kernel::VMD &dir, const coord_t length) const
 
Mantid::API::BoxController_const_sptr getBoxController () const override
 Returns the BoxController used in this workspace. More...
 
Mantid::API::BoxController_sptr getBoxController () override
 Returns the BoxController used in this workspace. More...
 
std::vector< std::string > getBoxControllerStats () const override
 Returns some information about the box controller, to be displayed in the GUI, for example. More...
 
void getBoxes (std::vector< API::IMDNode * > &boxes, size_t maxDepth, bool leafOnly) override
 
std::string getEventTypeName () const override
 Return the type of event contained, as a string. MDEvent or MDLeanEvent. More...
 
LinePlot getLinePlot (const Mantid::Kernel::VMD &start, const Mantid::Kernel::VMD &end, API::MDNormalization normalize) const override
 Method to generate a line plot through a MD-workspace. More...
 
size_t getMemorySize () const override
 
std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > getMinimumExtents (size_t depth=2) const override
 Get the minimum extents that hold the data. More...
 
uint64_t getNEvents () const override
 
signal_t getNormalizedError (const API::IMDNode *box, const Mantid::API::MDNormalization &normalization) const
 
signal_t getNormalizedSignal (const API::IMDNode *box, const Mantid::API::MDNormalization &normalization) const
 
uint64_t getNPoints () const override
 
size_t getNumDims () const override
 
signal_t getSignalAtCoord (const coord_t *coords, const Mantid::API::MDNormalization &normalization) const override
 Returns the (normalized) signal at a given coordinates. More...
 
signal_t getSignalWithMaskAtCoord (const coord_t *coords, const Mantid::API::MDNormalization &normalization) const override
 Returns the (normalized) signal at a given coordinates. More...
 
Kernel::SpecialCoordinateSystem getSpecialCoordinateSystem () const override
 Get the coordinate system. More...
 
const std::string id () const override
 A string ID for the class. More...
 
void initialize () override
 Perform initialization after dimensions (and others) have been set. More...
 
bool isFileBacked () const override
 
bool isGridBox ()
 Return true if the underlying box is a MDGridBox. More...
 
bool isInBounds (const coord_t *coords) const
 
Mantid::API::ITableWorkspace_sptr makeBoxTable (size_t start, size_t num) override
 this is the method to build table workspace from any workspace. More...
 
 MDEventWorkspace (Mantid::API::MDNormalization preferredNormalization=Mantid::API::MDNormalization::VolumeNormalization, Mantid::API::MDNormalization preferredNormalizationHisto=Mantid::API::MDNormalization::VolumeNormalization)
 
MDEventWorkspace< MDE, nd > & operator= (const MDEventWorkspace< MDE, nd > &other)=delete
 
void refreshCache () override
 Refresh the cache (integrated signal of each box) More...
 
void setBox (API::IMDNode *box) override
 Set the base-level box contained within. More...
 
void setCoordinateSystem (const Kernel::SpecialCoordinateSystem coordSystem) override
 Set the coordinate system. More...
 
void setDisplayNormalization (Mantid::API::MDNormalization preferredNormalization) override
 Preferred visual normalization method. More...
 
void setDisplayNormalizationHisto (Mantid::API::MDNormalization preferredNormalizationHisto) override
 Preferred visual normalizaiton method for any histo workspaces created from this. More...
 
void setFileBacked () override
 set filebacked on the contained box More...
 
virtual void setFileBacked (const std::string &fileName)
 make the workspace file backed if it has not been already file backed; More...
 
void setMDMasking (std::unique_ptr< Mantid::Geometry::MDImplicitFunction > maskingRegion) override
 Apply masking. More...
 
void setMinRecursionDepth (size_t minDepth) override
 Recurse down to a minimum depth. More...
 
size_t sizeofEvent () const override
 return the size (in bytes) of an event, this workspace contains More...
 
void splitAllIfNeeded (Kernel::ThreadScheduler *ts) override
 Split all boxes that exceed the split threshold. More...
 
void splitBox () override
 Split the top-level MDBox into a MDGridBox. More...
 
void splitTrackedBoxes (Kernel::ThreadScheduler *ts)
 
virtual ~MDEventWorkspace () override=default
 
- Public Member Functions inherited from Mantid::API::IMDEventWorkspace
IMDEventWorkspace_uptr clone () const
 Returns a clone of the workspace. More...
 
IMDEventWorkspace_uptr cloneEmpty () const
 Returns a default-initialized clone of the workspace. More...
 
Mantid::API::MDNormalization displayNormalization () const override=0
 
Mantid::API::MDNormalization displayNormalizationHisto () const override=0
 
bool fileNeedsUpdating () const
 
virtual Mantid::API::BoxController_const_sptr getBoxController () const =0
 
virtual Mantid::API::BoxController_sptr getBoxController ()=0
 
virtual std::vector< std::string > getBoxControllerStats () const =0
 Returns some information about the box controller, to be displayed in the GUI, for example. More...
 
virtual void getBoxes (std::vector< API::IMDNode * > &boxes, size_t maxDepth, bool leafOnly)=0
 
virtual std::string getEventTypeName () const =0
 Return the type of event contained, as a string. MDEvent or MDLeanEvent. More...
 
virtual std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > getMinimumExtents (size_t depth=2) const =0
 Get the minimum extents that hold the data. More...
 
virtual bool hasOrientedLattice () const override
 
 IMDEventWorkspace ()
 Empty constructor. More...
 
virtual void initialize ()=0
 Perform initialization after dimensions (and others) have been set. More...
 
virtual bool isFileBacked () const =0
 
IMDEventWorkspaceoperator= (const IMDEventWorkspace &)=delete
 
virtual void refreshCache ()=0
 Refresh the cache (integrated signal of each box) More...
 
virtual void setBox (API::IMDNode *box)=0
 
virtual void setCoordinateSystem (const Mantid::Kernel::SpecialCoordinateSystem coordinateSystem)=0
 
virtual void setDisplayNormalization (Mantid::API::MDNormalization preferredNormalization)=0
 Preferred visual normalization method. More...
 
virtual void setDisplayNormalizationHisto (Mantid::API::MDNormalization preferredNormalizationHisto)=0
 Preferred visual normalizaiton method for any histo workspaces created from this. More...
 
virtual void setFileBacked ()=0
 set filebacked on the contained box More...
 
void setFileNeedsUpdating (bool value)
 Sets the marker set to true when a file-backed workspace needs its back-end file updated (by calling SaveMD(UpdateFileBackEnd=1) ) More...
 
virtual void setMinRecursionDepth (size_t depth)=0
 Recurse down to a minimum depth. More...
 
virtual size_t sizeofEvent () const =0
 Return the size(in bytes) for the event, which this workspace contains. More...
 
virtual void splitAllIfNeeded (Kernel::ThreadScheduler *ts)=0
 Split all boxes that exceed the split threshold. More...
 
virtual void splitBox ()=0
 Split the top-level MDBox into a MDGridBox. More...
 
bool threadSafe () const override
 Is the workspace thread-safe. More...
 
- Public Member Functions inherited from Mantid::API::IMDWorkspace
std::string changeQConvention ()
 
virtual void clearFileBacked (bool)
 if a workspace was filebacked, this should clear file-based status, delete file-based information and close related files. More...
 
virtual void clearMDMasking ()=0
 Clear existing masks. More...
 
std::unique_ptr< IMDWorkspaceclone () const
 Returns a clone of the workspace. More...
 
std::unique_ptr< IMDWorkspacecloneEmpty () const
 Returns a default-initialized clone of the workspace. More...
 
std::unique_ptr< IMDIteratorcreateIterator (Mantid::Geometry::MDImplicitFunction *function=nullptr) const
 Creates a single iterator and returns it. More...
 
virtual std::vector< std::unique_ptr< IMDIterator > > createIterators (size_t suggestedNumCores=1, Mantid::Geometry::MDImplicitFunction *function=nullptr) const =0
 Creates a new iterator pointing to the first cell in the workspace. More...
 
virtual MDNormalization displayNormalization () const
 
virtual MDNormalization displayNormalizationHisto () const
 
std::string getConvention () const
 
virtual LinePlot getLinePlot (const Mantid::Kernel::VMD &start, const Mantid::Kernel::VMD &end, Mantid::API::MDNormalization normalize) const
 Method to generate a line plot through a MD-workspace. More...
 
virtual uint64_t getNEvents () const =0
 
virtual uint64_t getNPoints () const =0
 Get the number of points associated with the workspace. More...
 
virtual signal_t getSignalAtCoord (const coord_t *coords, const Mantid::API::MDNormalization &normalization) const =0
 Returns the (normalized) signal at a given coordinates. More...
 
signal_t getSignalAtVMD (const Mantid::Kernel::VMD &coords, const Mantid::API::MDNormalization &normalization=Mantid::API::VolumeNormalization) const
 Returns the signal (normalized by volume) at a given coordinates. More...
 
virtual signal_t getSignalWithMaskAtCoord (const coord_t *coords, const Mantid::API::MDNormalization &normalization) const =0
 Returns the (normalized) signal at a given coordinates or 0 if the value. More...
 
signal_t getSignalWithMaskAtVMD (const Mantid::Kernel::VMD &coords, const Mantid::API::MDNormalization &normalization=Mantid::API::VolumeNormalization) const
 Returns the signal (normalized by volume) at a given coordinates or 0 if masked. More...
 
virtual Kernel::SpecialCoordinateSystem getSpecialCoordinateSystem () const =0
 
virtual bool hasOrientedLattice () const =0
 
 IMDWorkspace (const Parallel::StorageMode storageMode=Parallel::StorageMode::Cloned)
 Default constructor. More...
 
virtual bool isMDHistoWorkspace () const
 
virtual ITableWorkspace_sptr makeBoxTable (size_t, size_t)
 this is the method to build table workspace from any workspace. More...
 
IMDWorkspaceoperator= (const IMDWorkspace &other)=delete
 
void setConvention (std::string convention)
 
virtual void setMDMasking (std::unique_ptr< Mantid::Geometry::MDImplicitFunction > maskingRegion)=0
 Setter for the masking region. More...
 
- Public Member Functions inherited from Mantid::API::Workspace
Workspace_uptr clone () const
 Returns a clone (copy) of the workspace with covariant return type in all derived classes. More...
 
Workspace_uptr cloneEmpty () const
 Returns a default-initialized clone of the workspace. More...
 
const std::string & getComment () const
 Get the workspace comment. More...
 
const WorkspaceHistorygetHistory () const
 Returns a reference to the WorkspaceHistory const. More...
 
virtual size_t getMemorySize () const =0
 Get the footprint in memory in bytes. More...
 
std::string getMemorySizeAsStr () const
 Returns the memory footprint in sensible units. More...
 
const std::string & getName () const override
 Get the workspace name. More...
 
virtual const std::string getTitle () const
 Get the workspace title. More...
 
WorkspaceHistoryhistory ()
 Returns a reference to the WorkspaceHistory. More...
 
bool isDirty (const int n=1) const
 Check whether other algorithms have been applied to the workspace by checking the history length. More...
 
virtual bool isGroup () const
 
Workspaceoperator= (const Workspace &other)=delete
 
void setComment (const std::string &)
 Set the comment field of the workspace. More...
 
virtual void setTitle (const std::string &)
 Set the title of the workspace. More...
 
Parallel::StorageMode storageMode () const
 Returns the storage mode (used for MPI runs) More...
 
bool threadSafe () const override
 Marks the workspace as safe for multiple threads to edit data simutaneously. More...
 
 Workspace (const Parallel::StorageMode storageMode=Parallel::StorageMode::Cloned)
 
 ~Workspace ()
 
- Public Member Functions inherited from Mantid::Kernel::DataItem
 DataItem ()
 Default constructor. More...
 
 DataItem (const DataItem &other)
 Copy constructor Always makes a unique lock. More...
 
virtual ~DataItem ()
 Destructor. More...
 
void readLock ()
 Acquires a read lock. More...
 
void unlock ()
 
- Public Member Functions inherited from Mantid::API::MDGeometry
void addDimension (const std::shared_ptr< Mantid::Geometry::IMDDimension > &dim)
 Add a dimension. More...
 
void addDimension (Mantid::Geometry::IMDDimension *dim)
 Add a dimension. More...
 
bool allBasisNormalized () const
 
void clearOriginalWorkspaces ()
 Clear original workspaces. More...
 
void clearTransforms ()
 Clear transforms. More...
 
virtual std::vector< coord_testimateResolution () const
 
Mantid::Kernel::VMDgetBasisVector (size_t index)
 Get the basis vector (in the original workspace) for a dimension of this workspace. More...
 
const Mantid::Kernel::VMDgetBasisVector (size_t index) const
 Get the basis vector (in the original workspace) for a dimension of this workspace. More...
 
virtual std::shared_ptr< const Mantid::Geometry::IMDDimensiongetDimension (size_t index) const
 Get a dimension. More...
 
size_t getDimensionIndexById (const std::string &id) const
 Get the index of the dimension that matches the ID given. More...
 
size_t getDimensionIndexByName (const std::string &name) const
 Get the index of the dimension that matches the name given. More...
 
virtual std::shared_ptr< const Mantid::Geometry::IMDDimensiongetDimensionWithId (std::string id) const
 Get a dimension. More...
 
std::string getGeometryXML () const
 
std::vector< std::shared_ptr< const Geometry::IMDDimension > > getNonIntegratedDimensions () const
 Get non-collapsed dimensions. More...
 
size_t getNumberTransformsFromOriginal () const
 Get the number of transforms defined from the original coordinate system. More...
 
size_t getNumberTransformsToOriginal () const
 Get the number of transforms defined to the original coordinate system. More...
 
virtual size_t getNumDims () const
 
virtual size_t getNumNonIntegratedDims () const
 
Mantid::Kernel::VMDgetOrigin ()
 
const Mantid::Kernel::VMDgetOrigin () const
 
std::shared_ptr< WorkspacegetOriginalWorkspace (size_t index=0) const
 Get the "original" workspace (the workspace that was the source for a binned MDWorkspace). More...
 
std::shared_ptr< const Mantid::Geometry::IMDDimensiongetTDimension () const
 Get the t-dimension mapping. More...
 
Mantid::API::CoordTransform const * getTransformFromOriginal (size_t index=0) const
 Get the Coordinate Transformation that goes from the original workspace to this workspace's coordinates. More...
 
Mantid::API::CoordTransform const * getTransformToOriginal (size_t index=0) const
 Get the Coordinate Transformation that goes from THIS workspace's coordinates to the ORIGINAL workspace's coordinates. More...
 
const Kernel::DblMatrixgetWTransf () const
 get the transformation from Qin crystal cartezian coordinate system to Q in orthogonal or real HKL coordiate system alined with arbitrary slicing plane More...
 
std::shared_ptr< const Mantid::Geometry::IMDDimensiongetXDimension () const
 Get the x-dimension mapping. More...
 
std::shared_ptr< const Mantid::Geometry::IMDDimensiongetYDimension () const
 Get the y-dimension mapping. More...
 
std::shared_ptr< const Mantid::Geometry::IMDDimensiongetZDimension () const
 Get the z-dimension mapping. More...
 
bool hasOriginalWorkspace (size_t index=0) const
 
void initGeometry (const std::vector< std::shared_ptr< Geometry::IMDDimension > > &dimensions)
 Initialize the geometry. More...
 
 MDGeometry ()
 Constructor. More...
 
 MDGeometry (const MDGeometry &other)
 Copy Constructor. More...
 
size_t numOriginalWorkspaces () const
 
MDGeometryoperator= (const MDGeometry &other)
 
void setBasisVector (size_t index, const Mantid::Kernel::VMD &vec)
 Set the basis vector (in the original workspace) for a dimension of this workspace. More...
 
void setOrigin (const Mantid::Kernel::VMD &orig)
 Sets the origin of this geometry. More...
 
void setOriginalWorkspace (std::shared_ptr< Workspace > ws, size_t index=0)
 Set the "original" workspace (the workspace that was the source for a binned MDWorkspace). More...
 
void setTransformFromOriginal (Mantid::API::CoordTransform *transform, size_t index=0)
 Sets the Coordinate Transformation that goes from the original workspace to this workspace's coordinates. More...
 
void setTransformToOriginal (Mantid::API::CoordTransform *transform, size_t index=0)
 Sets the Coordinate Transformation that goes from THIS workspace's coordinates to the ORIGINAL workspace's coordinates. More...
 
void setWTransf (const Kernel::DblMatrix &WTransf)
 set the transformation from Q in crystal cartezian coordinate system to Q in orthogonal or real HKL coordiate system alined with arbitrary slicing plane More...
 
void transformDimensions (std::vector< double > &scaling, std::vector< double > &offset)
 Transform the dimensions contained in this geometry x' = x*scaling + offset. More...
 
virtual ~MDGeometry ()
 Destructor. More...
 
- Public Member Functions inherited from Mantid::API::MultipleExperimentInfos
uint16_t addExperimentInfo (const ExperimentInfo_sptr &ei)
 Add a new ExperimentInfo to this MDEventWorkspace. More...
 
void copyExperimentInfos (const MultipleExperimentInfos &other)
 Copy the experiment infos from another. More...
 
ExperimentInfo_sptr getExperimentInfo (const uint16_t expInfoIndex)
 Get the ExperimentInfo for the given Experiment-Info Index. More...
 
ExperimentInfo_const_sptr getExperimentInfo (const uint16_t expInfoIndex) const
 Get the ExperimentInfo for the given Experiment-Info Index. More...
 
uint16_t getNumExperimentInfo () const
 
bool hasOrientedLattice () const
 
 MultipleExperimentInfos ()=default
 
 MultipleExperimentInfos (const MultipleExperimentInfos &other)
 Copy constructor. More...
 
MultipleExperimentInfosoperator= (const MultipleExperimentInfos &other)
 
void setExperimentInfo (const uint16_t expInfoIndex, ExperimentInfo_sptr ei)
 Replace the ExperimentInfo entry at a given place. More...
 
virtual ~MultipleExperimentInfos ()=default
 

Protected Member Functions

void getBoundariesInDimension (const Mantid::Kernel::VMD &start, const Mantid::Kernel::VMD &dir, const size_t num_boundaries, const coord_t length, const coord_t dir_current_dim, const coord_t box_size, std::set< coord_t > &mid_points) const
 Insert box bisects in position-along-line coords in a single dimension. More...
 
 MDEventWorkspace (const MDEventWorkspace< MDE, nd > &other)
 Protected copy constructor. May be used by childs for cloning. More...
 
- Protected Member Functions inherited from Mantid::API::IMDEventWorkspace
 IMDEventWorkspace (const IMDEventWorkspace &)=default
 Protected copy constructor. May be used by childs for cloning. More...
 
const std::string toString () const override
 Serializes the object to a string. More...
 
- Protected Member Functions inherited from Mantid::API::IMDWorkspace
 IMDWorkspace (const IMDWorkspace &)=default
 Protected copy constructor. May be used by childs for cloning. More...
 
void makeSinglePointWithNaN (std::vector< coord_t > &x, std::vector< signal_t > &y, std::vector< signal_t > &e) const
 Make a single point with NaN as the signal and error This can be returned when there would otherwise be nothing to plot. More...
 
const std::string toString () const override
 Serializes the object to a string. More...
 
- Protected Member Functions inherited from Mantid::API::Workspace
void setStorageMode (Parallel::StorageMode mode)
 Sets the storage mode (used for MPI runs) More...
 
 Workspace (const Workspace &)
 Protected copy constructor. May be used by childs for cloning. More...
 
- Protected Member Functions inherited from Mantid::Kernel::DataItem
Poco::RWLock * getLock () const
 Private method to access the RWLock object. More...
 
- Protected Member Functions inherited from Mantid::API::MDGeometry
void deleteNotificationReceived (const std::shared_ptr< const Workspace > &deleted)
 Function called when observer objects recieves a notification. More...
 
- Protected Member Functions inherited from Mantid::API::MultipleExperimentInfos
const std::string toString () const
 Returns a string description of the object. More...
 

Protected Attributes

std::unique_ptr< MDBoxBase< MDE, nd > > data
 MDBox containing all of the events in the workspace. More...
 
API::BoxController_sptr m_BoxController
 Box controller in use. More...
 
Mantid::API::MDNormalization m_displayNormalization
 Display normalization for the event workspace itself. More...
 
Mantid::API::MDNormalization m_displayNormalizationHisto
 Display normalization to pass onto generated histo workspaces. More...
 
- Protected Attributes inherited from Mantid::API::IMDEventWorkspace
bool m_fileNeedsUpdating
 Marker set to true when a file-backed workspace needs its back-end file updated (by calling SaveMD(UpdateFileBackEnd=1) ) More...
 
- Protected Attributes inherited from Mantid::API::MDGeometry
std::vector< Mantid::Kernel::VMDm_basisVectors
 Vector of the basis vector (in the original workspace) for each dimension of this workspace. More...
 
std::vector< std::shared_ptr< Geometry::IMDDimension > > m_dimensions
 Vector of the dimensions used, in the order X Y Z t, etc. More...
 
std::unique_ptr< MDGeometryNotificationHelperm_notificationHelper
 Helper that deals with notifications and observing the ADS. More...
 
Mantid::Kernel::VMD m_origin
 Vector of the origin (in the original workspace) that corresponds to 0,0,0... in this workspace. More...
 
std::vector< std::shared_ptr< Workspace > > m_originalWorkspaces
 Pointer to the original workspace(s), if this workspace is a coordinate transformation from an original workspace. More...
 
std::vector< std::shared_ptr< const Mantid::API::CoordTransform > > m_transforms_FromOriginal
 Coordinate Transformation that goes from the original workspace to this workspace's coordinates. More...
 
std::vector< std::shared_ptr< const Mantid::API::CoordTransform > > m_transforms_ToOriginal
 Coordinate Transformation that goes from this workspace's coordinates to the original workspace coordinates. More...
 
Kernel::DblMatrix m_Wtransf
 the matrix which transforms momentums from orthogonal Q-system to Orthogonal HKL or non-orthogonal HKL system alighned WRT to arbitrary coordinate system requested See the UB matrix formalizm, pg 7 for further details on implementation. More...
 

Private Member Functions

MDEventWorkspacedoClone () const override
 Virtual clone method. Not implemented to force implementation in children. More...
 
MDEventWorkspacedoCloneEmpty () const override
 Virtual cloneEmpty method. More...
 

Private Attributes

Kernel::SpecialCoordinateSystem m_coordSystem
 

Detailed Description

Templated class for the multi-dimensional event workspace.

Template Parameters
MDE:: the type of MDEvent in the workspace. This can be, e.g. MDLeanEvent<nd> or MDEvent<nd>
nd:: the number of dimensions that each MDEvent will be tracking. an usigned int > 0. nd must match the number of dimensions in the MDE type!
Author
Janik Zikovsky, SNS
Date
Dec 3, 2010

Definition at line 38 of file MDEventWorkspace.h.

Member Typedef Documentation

◆ MDEventType

Typedef to access the MDEventType.

Definition at line 44 of file MDEventWorkspace.h.

◆ sptr

Typedef for a shared pointer of this kind of event workspace.

Definition at line 42 of file MDEventWorkspace.h.

Constructor & Destructor Documentation

◆ MDEventWorkspace() [1/2]

Mantid::DataObjects::MDEventWorkspace::MDEventWorkspace ( Mantid::API::MDNormalization  preferredNormalization = Mantid::API::MDNormalization::VolumeNormalization,
Mantid::API::MDNormalization  preferredNormalizationHisto = Mantid::API::MDNormalization::VolumeNormalization 
)

◆ ~MDEventWorkspace()

virtual Mantid::DataObjects::MDEventWorkspace::~MDEventWorkspace ( )
overridevirtualdefault

◆ MDEventWorkspace() [2/2]

Mantid::DataObjects::MDEventWorkspace::MDEventWorkspace ( const MDEventWorkspace< MDE, nd > &  other)
protected

Protected copy constructor. May be used by childs for cloning.

Member Function Documentation

◆ addEvent()

size_t Mantid::DataObjects::MDEventWorkspace::addEvent ( const MDE &  event)

◆ addEvents()

size_t Mantid::DataObjects::MDEventWorkspace::addEvents ( const std::vector< MDE > &  events)

◆ clearFileBacked()

void Mantid::DataObjects::MDEventWorkspace::clearFileBacked ( bool  LoadFileBackedData)
overridevirtual

if workspace was file-backed, this should clear file-backed information and close back-up files.

Reimplemented from Mantid::API::IMDWorkspace.

◆ clearMDMasking()

void Mantid::DataObjects::MDEventWorkspace::clearMDMasking ( )
overridevirtual

Clear masking.

Implements Mantid::API::IMDWorkspace.

◆ clone()

std::unique_ptr< MDEventWorkspace > Mantid::DataObjects::MDEventWorkspace::clone ( ) const
inline

Returns a clone of the workspace.

Definition at line 53 of file MDEventWorkspace.h.

Referenced by Mantid::MDAlgorithms::CloneMDWorkspace::doClone().

◆ cloneEmpty()

std::unique_ptr< MDEventWorkspace > Mantid::DataObjects::MDEventWorkspace::cloneEmpty ( ) const
inline

Returns a default-initialized clone of the workspace.

Definition at line 56 of file MDEventWorkspace.h.

◆ createIterators()

std::vector< std::unique_ptr< Mantid::API::IMDIterator > > Mantid::DataObjects::MDEventWorkspace::createIterators ( size_t  suggestedNumCores = 1,
Mantid::Geometry::MDImplicitFunction function = nullptr 
) const
overridevirtual

Creates a new iterator pointing to the first cell (box) in the workspace.

Implements Mantid::API::IMDWorkspace.

◆ displayNormalization()

Mantid::API::MDNormalization Mantid::DataObjects::MDEventWorkspace::displayNormalization ( ) const
overridevirtual
Returns
normalization preferred for visualization. Set to none for the generic case, but overriden elsewhere.

Implements Mantid::API::IMDEventWorkspace.

Referenced by Mantid::MDAlgorithms::SliceMD::slice().

◆ displayNormalizationHisto()

Mantid::API::MDNormalization Mantid::DataObjects::MDEventWorkspace::displayNormalizationHisto ( ) const
overridevirtual
Returns
normalization preferred for visualization of histo workspaces. Set to none for the generic case, but overriden elsewhere.

Implements Mantid::API::IMDEventWorkspace.

Referenced by Mantid::MDAlgorithms::SliceMD::slice().

◆ doClone()

MDEventWorkspace * Mantid::DataObjects::MDEventWorkspace::doClone ( ) const
inlineoverrideprivatevirtual

Virtual clone method. Not implemented to force implementation in children.

Implements Mantid::API::IMDEventWorkspace.

Definition at line 213 of file MDEventWorkspace.h.

◆ doCloneEmpty()

MDEventWorkspace * Mantid::DataObjects::MDEventWorkspace::doCloneEmpty ( ) const
inlineoverrideprivatevirtual

Virtual cloneEmpty method.

Not implemented to force implementation in children.

Implements Mantid::API::IMDEventWorkspace.

Definition at line 215 of file MDEventWorkspace.h.

◆ estimateResolution()

std::vector< coord_t > Mantid::DataObjects::MDEventWorkspace::estimateResolution ( ) const
overridevirtual
Returns
a vector with the size of the smallest bin in each dimension

Reimplemented from Mantid::API::MDGeometry.

◆ getBoundariesInDimension()

void Mantid::DataObjects::MDEventWorkspace::getBoundariesInDimension ( const Mantid::Kernel::VMD start,
const Mantid::Kernel::VMD dir,
const size_t  num_boundaries,
const coord_t  length,
const coord_t  dir_current_dim,
const coord_t  box_size,
std::set< coord_t > &  mid_points 
) const
protected

Insert box bisects in position-along-line coords in a single dimension.

◆ getBox() [1/2]

MDBoxBase< MDE, nd > * Mantid::DataObjects::MDEventWorkspace::getBox ( )
inline

◆ getBox() [2/2]

const MDBoxBase< MDE, nd > * Mantid::DataObjects::MDEventWorkspace::getBox ( ) const
inline
Returns
a pointer to the box (MDBox or MDGridBox) contained within, const version.

Definition at line 157 of file MDEventWorkspace.h.

◆ getBoxBoundaryBisectsOnLine()

std::set< coord_t > Mantid::DataObjects::MDEventWorkspace::getBoxBoundaryBisectsOnLine ( const Kernel::VMD start,
const Kernel::VMD end,
const size_t  num_d,
const Kernel::VMD dir,
const coord_t  length 
) const

◆ getBoxController() [1/2]

Mantid::API::BoxController_const_sptr Mantid::DataObjects::MDEventWorkspace::getBoxController ( ) const
inlineoverridevirtual

Returns the BoxController used in this workspace.

Implements Mantid::API::IMDEventWorkspace.

Definition at line 112 of file MDEventWorkspace.h.

◆ getBoxController() [2/2]

Mantid::API::BoxController_sptr Mantid::DataObjects::MDEventWorkspace::getBoxController ( )
inlineoverridevirtual

◆ getBoxControllerStats()

std::vector< std::string > Mantid::DataObjects::MDEventWorkspace::getBoxControllerStats ( ) const
overridevirtual

Returns some information about the box controller, to be displayed in the GUI, for example.

Implements Mantid::API::IMDEventWorkspace.

◆ getBoxes()

void Mantid::DataObjects::MDEventWorkspace::getBoxes ( std::vector< API::IMDNode * > &  boxes,
size_t  maxDepth,
bool  leafOnly 
)
inlineoverridevirtual

Implements Mantid::API::IMDEventWorkspace.

Definition at line 139 of file MDEventWorkspace.h.

◆ getEventTypeName()

std::string Mantid::DataObjects::MDEventWorkspace::getEventTypeName ( ) const
overridevirtual

Return the type of event contained, as a string. MDEvent or MDLeanEvent.

Implements Mantid::API::IMDEventWorkspace.

◆ getLinePlot()

LinePlot Mantid::DataObjects::MDEventWorkspace::getLinePlot ( const Mantid::Kernel::VMD start,
const Mantid::Kernel::VMD end,
API::MDNormalization  normalize 
) const
overridevirtual

Method to generate a line plot through a MD-workspace.

Obtain coordinates for a line plot through a IMDWorkspace.

Cross the workspace from start to end points, recording the signal along the line. Sets the x,y vectors to the histogram bin boundaries and counts

Parameters
start:: coordinates of the start point of the line
end:: coordinates of the end point of the line
normalize:: how to normalize the signal
Returns
:: a LinePlot in which x is set to the boundaries of the bins, relative to start of the line, y is set to the normalized signal for each bin with Length = length(x) - 1 and e is set to the normalized errors for each bin with Length = length(x) - 1.

Reimplemented from Mantid::API::IMDWorkspace.

◆ getMemorySize()

size_t Mantid::DataObjects::MDEventWorkspace::getMemorySize ( ) const
overridevirtual
Returns
the number of bytes of memory used by the workspace.

Implements Mantid::API::Workspace.

◆ getMinimumExtents()

std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > Mantid::DataObjects::MDEventWorkspace::getMinimumExtents ( size_t  depth = 2) const
overridevirtual

Get the minimum extents that hold the data.

Implements Mantid::API::IMDEventWorkspace.

◆ getNEvents()

uint64_t Mantid::DataObjects::MDEventWorkspace::getNEvents ( ) const
inlineoverridevirtual

Implements Mantid::API::IMDWorkspace.

Definition at line 71 of file MDEventWorkspace.h.

Referenced by Mantid::MDAlgorithms::SliceMD::slice().

◆ getNormalizedError()

signal_t Mantid::DataObjects::MDEventWorkspace::getNormalizedError ( const API::IMDNode box,
const Mantid::API::MDNormalization normalization 
) const

◆ getNormalizedSignal()

signal_t Mantid::DataObjects::MDEventWorkspace::getNormalizedSignal ( const API::IMDNode box,
const Mantid::API::MDNormalization normalization 
) const

◆ getNPoints()

uint64_t Mantid::DataObjects::MDEventWorkspace::getNPoints ( ) const
overridevirtual
Returns
the total number of points (events) in this workspace

Implements Mantid::API::IMDWorkspace.

Referenced by Mantid::MDAlgorithms::LoadMD::doLoad(), Mantid::MDAlgorithms::MinusMD::doMinus(), and Mantid::MDAlgorithms::MergeMD::doPlus().

◆ getNumDims()

size_t Mantid::DataObjects::MDEventWorkspace::getNumDims ( ) const
overridevirtual
Returns
the number of dimensions in this workspace

Reimplemented from Mantid::API::MDGeometry.

Referenced by Mantid::MDAlgorithms::DgsScatteredTransmissionCorrectionMD::correctForTransmission().

◆ getSignalAtCoord()

signal_t Mantid::DataObjects::MDEventWorkspace::getSignalAtCoord ( const coord_t coords,
const Mantid::API::MDNormalization normalization 
) const
overridevirtual

Returns the (normalized) signal at a given coordinates.

Implements Mantid::API::IMDWorkspace.

◆ getSignalWithMaskAtCoord()

signal_t Mantid::DataObjects::MDEventWorkspace::getSignalWithMaskAtCoord ( const coord_t coords,
const Mantid::API::MDNormalization normalization 
) const
overridevirtual

Returns the (normalized) signal at a given coordinates.

Implements Mantid::API::IMDWorkspace.

◆ getSpecialCoordinateSystem()

Kernel::SpecialCoordinateSystem Mantid::DataObjects::MDEventWorkspace::getSpecialCoordinateSystem ( ) const
overridevirtual

◆ id()

const std::string Mantid::DataObjects::MDEventWorkspace::id ( ) const
overridevirtual

A string ID for the class.

Implements Mantid::Kernel::DataItem.

Referenced by Mantid::MDAlgorithms::FindPeaksMD::findPeaks().

◆ initialize()

void Mantid::DataObjects::MDEventWorkspace::initialize ( )
overridevirtual

Perform initialization after dimensions (and others) have been set.

Implements Mantid::API::IMDEventWorkspace.

Referenced by Mantid::MDAlgorithms::SliceMD::slice().

◆ isFileBacked()

bool Mantid::DataObjects::MDEventWorkspace::isFileBacked ( ) const
inlineoverridevirtual

◆ isGridBox()

bool Mantid::DataObjects::MDEventWorkspace::isGridBox ( )
inline

Return true if the underlying box is a MDGridBox.

Definition at line 150 of file MDEventWorkspace.h.

◆ isInBounds()

bool Mantid::DataObjects::MDEventWorkspace::isInBounds ( const coord_t coords) const

◆ makeBoxTable()

Mantid::API::ITableWorkspace_sptr Mantid::DataObjects::MDEventWorkspace::makeBoxTable ( size_t  ,
size_t   
)
overridevirtual

this is the method to build table workspace from any workspace.

It does not have much sence and may be placed here erroneously

Reimplemented from Mantid::API::IMDWorkspace.

◆ operator=()

MDEventWorkspace< MDE, nd > & Mantid::DataObjects::MDEventWorkspace::operator= ( const MDEventWorkspace< MDE, nd > &  other)
delete

◆ refreshCache()

void Mantid::DataObjects::MDEventWorkspace::refreshCache ( )
overridevirtual

◆ setBox()

void Mantid::DataObjects::MDEventWorkspace::setBox ( API::IMDNode box)
inlineoverridevirtual

Set the base-level box contained within.

Used in file loading

Implements Mantid::API::IMDEventWorkspace.

Definition at line 161 of file MDEventWorkspace.h.

Referenced by Mantid::MDAlgorithms::LoadMD::doLoad().

◆ setCoordinateSystem()

void Mantid::DataObjects::MDEventWorkspace::setCoordinateSystem ( const Kernel::SpecialCoordinateSystem  coordSystem)
overridevirtual

◆ setDisplayNormalization()

void Mantid::DataObjects::MDEventWorkspace::setDisplayNormalization ( Mantid::API::MDNormalization  preferredNormalization)
overridevirtual

Preferred visual normalization method.

Implements Mantid::API::IMDEventWorkspace.

◆ setDisplayNormalizationHisto()

void Mantid::DataObjects::MDEventWorkspace::setDisplayNormalizationHisto ( Mantid::API::MDNormalization  preferredNormalizationHisto)
overridevirtual

Preferred visual normalizaiton method for any histo workspaces created from this.

Implements Mantid::API::IMDEventWorkspace.

◆ setFileBacked() [1/2]

void Mantid::DataObjects::MDEventWorkspace::setFileBacked ( )
overridevirtual

set filebacked on the contained box

Implements Mantid::API::IMDEventWorkspace.

◆ setFileBacked() [2/2]

virtual void Mantid::DataObjects::MDEventWorkspace::setFileBacked ( const std::string &  fileName)
virtual

make the workspace file backed if it has not been already file backed;

◆ setMDMasking()

void Mantid::DataObjects::MDEventWorkspace::setMDMasking ( std::unique_ptr< Mantid::Geometry::MDImplicitFunction maskingRegion)
overridevirtual

Apply masking.

Implements Mantid::API::IMDWorkspace.

◆ setMinRecursionDepth()

void Mantid::DataObjects::MDEventWorkspace::setMinRecursionDepth ( size_t  depth)
overridevirtual

Recurse down to a minimum depth.

Implements Mantid::API::IMDEventWorkspace.

Referenced by Mantid::MDAlgorithms::CreateMDWorkspace::finish().

◆ sizeofEvent()

size_t Mantid::DataObjects::MDEventWorkspace::sizeofEvent ( ) const
inlineoverridevirtual

return the size (in bytes) of an event, this workspace contains

Implements Mantid::API::IMDEventWorkspace.

Definition at line 131 of file MDEventWorkspace.h.

◆ splitAllIfNeeded()

void Mantid::DataObjects::MDEventWorkspace::splitAllIfNeeded ( Kernel::ThreadScheduler ts)
overridevirtual

◆ splitBox()

void Mantid::DataObjects::MDEventWorkspace::splitBox ( )
overridevirtual

◆ splitTrackedBoxes()

void Mantid::DataObjects::MDEventWorkspace::splitTrackedBoxes ( Kernel::ThreadScheduler ts)

Member Data Documentation

◆ data

std::unique_ptr<MDBoxBase<MDE, nd> > Mantid::DataObjects::MDEventWorkspace::data
protected

MDBox containing all of the events in the workspace.

Definition at line 204 of file MDEventWorkspace.h.

◆ m_BoxController

API::BoxController_sptr Mantid::DataObjects::MDEventWorkspace::m_BoxController
protected

Box controller in use.

Definition at line 201 of file MDEventWorkspace.h.

◆ m_coordSystem

Kernel::SpecialCoordinateSystem Mantid::DataObjects::MDEventWorkspace::m_coordSystem
private

Definition at line 217 of file MDEventWorkspace.h.

◆ m_displayNormalization

Mantid::API::MDNormalization Mantid::DataObjects::MDEventWorkspace::m_displayNormalization
protected

Display normalization for the event workspace itself.

Definition at line 208 of file MDEventWorkspace.h.

◆ m_displayNormalizationHisto

Mantid::API::MDNormalization Mantid::DataObjects::MDEventWorkspace::m_displayNormalizationHisto
protected

Display normalization to pass onto generated histo workspaces.

Definition at line 210 of file MDEventWorkspace.h.


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