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

SplittersWorkspace : A TableWorkspace to contain TimeSplitters. More...

#include <SplittersWorkspace.h>

Inheritance diagram for Mantid::DataObjects::SplittersWorkspace:
Mantid::DataObjects::TableWorkspace Mantid::API::ISplittersWorkspace Mantid::API::ITableWorkspace Mantid::API::Workspace Mantid::Kernel::DataItem

Public Member Functions

void addSplitter (const Kernel::SplittingInterval &splitter) override
 
std::unique_ptr< SplittersWorkspaceclone () const
 Returns a clone of the workspace.
 
std::unique_ptr< SplittersWorkspacecloneEmpty () const
 Returns a default-initialized clone of the workspace.
 
size_t getNumberSplitters () const override
 
Kernel::SplittingInterval getSplitter (size_t index) override
 
SplittersWorkspaceoperator= (const SplittersWorkspace &other)=delete
 
bool removeSplitter (size_t) override
 
 SplittersWorkspace ()
 Constructor.
 
- Public Member Functions inherited from Mantid::DataObjects::TableWorkspace
API::Column_sptr addColumn (const std::string &type, const std::string &name) override
 Creates a new column.
 
template<class U >
cell_cast (size_t nRow, const std::string &col_name) const
 
template<class U >
cell_cast (size_t nRow, size_t nCol) const
 Casts cells through converting their values to/from double without type checking; Can produce stuped results in case if the type is in any way not related to double.
 
std::unique_ptr< TableWorkspaceclone () const
 Returns a clone of the workspace.
 
std::unique_ptr< TableWorkspacecloneEmpty () const
 Returns a default-initialized clone of the workspace.
 
size_t columnCount () const override
 Number of columns in the workspace.
 
void find (API::Boolean value, size_t &row, size_t col) override
 This method finds the row and column index of an API::Bollean value in a table workspace.
 
void find (const Mantid::Kernel::V3D &value, size_t &row, size_t col) override
 This method finds the row and column index of an Mantid::Kernel::V3D cell value in a table workspace.
 
void find (const std::string &value, size_t &row, size_t col) override
 This method finds the row and column index of an string cell value in a table workspace.
 
void find (double value, size_t &row, size_t col) override
 This method finds the row and column index of an double cell value in a table workspace.
 
void find (float value, size_t &row, size_t col) override
 This method finds the row and column index of an float value in a table workspace.
 
void find (size_t value, size_t &row, size_t col) override
 This method finds the row and column index of an integer cell value in a table workspace.
 
template<class T >
T * getColDataArray (const std::string &name)
 Non-throwing access to the pointer to the column data array for the column with given name.
 
template<class T >
T * getColDataArray (const std::string &name) const
 Non-throwing const access to the pointer to the column data array for the column with given name.
 
API::Column_const_sptr getColumn (const std::string &name) const override
 Gets the shared pointer to a column.
 
API::Column_sptr getColumn (const std::string &name) override
 Gets the shared pointer to a column.
 
API::Column_const_sptr getColumn (size_t index) const override
 Gets the shared pointer to a column by index - return none-modifyable column.
 
API::Column_sptr getColumn (size_t index) override
 Gets the shared pointer to a column.
 
std::vector< std::string > getColumnNames () const override
 Returns a vector of all column names.
 
template<class T >
std::vector< T > & getColVector (const std::string &name)
 get access to the column vector for column with given name .
 
template<class T >
const std::vector< T > & getColVector (const std::string &name) const
 get access to column vector for column with given name

 
template<class T >
std::vector< T > & getColVector (size_t index)
 get access to column vector for index i.
 
template<class T >
const std::vector< T > & getColVector (size_t index) const
 get constant access to column vector for index i.
 
API::LogManager_const_sptr getLogs () const override
 Get constant access to shared pointer containing workspace porperties.
 
size_t getMemorySize () const override
 Get the footprint in memory in KB.
 
const std::string id () const override
 Return the workspace typeID.
 
size_t insertRow (size_t index) override
 Inserts a row before row pointed to by index and fills it with default vales.
 
API::LogManager_sptr logs () override
 Get access to shared pointer containing workspace porperties.
 
TableWorkspaceoperator= (const TableWorkspace &other)=delete
 
void removeColumn (const std::string &name) override
 Removes a column.
 
void removeRow (size_t index) override
 Delets a row if it exists.
 
size_t rowCount () const override
 Number of rows in the workspace.
 
void setRowCount (size_t count) final
 Resizes the workspace.
 
void sort (std::vector< std::pair< std::string, bool > > &criteria) override
 Sort this table.
 
 TableWorkspace (size_t nrows=0)
 Constructor.
 
- Public Member Functions inherited from Mantid::API::ITableWorkspace
virtual bool addColumns (const std::string &type, const std::string &name, size_t n)
 Creates n new columns of the same type.
 
TableRowHelper appendRow ()
 Appends a row.
 
BooleanBool (size_t row, size_t col)
 Get the reference to the element in row row and column col if its type is bool.
 
template<class T >
T & cell (size_t row, size_t col)
 Get the reference to the element in row row and column col.
 
ITableWorkspace_uptr clone () const
 Returns a clone of the workspace.
 
ITableWorkspace_uptr cloneColumns (const std::vector< std::string > &colNames) const
 Returns a clone of the workspace.
 
ITableWorkspace_uptr cloneEmpty () const
 Returns a default-initialized clone of the workspace.
 
virtual bool customSort () const
 Does this type of TableWorkspace need a custom sorting call (e.g.
 
double & Double (size_t row, size_t col)
 Get the reference to the element in row row and column col if its type is double.
 
TableRowHelper getFirstRow ()
 Creates a TableRow object for the first row (row == 0).
 
template<class T >
T & getRef (const std::string &name, size_t index)
 Get a reference to a data element.
 
TableRowHelper getRow (size_t row)
 Creates a TableRow object for row row.
 
TableColumnHelper getVector (const std::string &name)
 Access the column with name name trough a ColumnVector object.
 
TableConstColumnHelper getVector (const std::string &name) const
 Access the column with name name trough a ColumnVector object.
 
int & Int (size_t row, size_t col)
 Get the reference to the element in row row and column col if its type is int.
 
 ITableWorkspace ()
 Constructor.
 
void modified ()
 If the workspace is the AnalysisDataService sends AfterReplaceNotification.
 
ITableWorkspaceoperator= (const ITableWorkspace &)=delete
 
std::string & String (size_t row, size_t col)
 Get the reference to the element in row row and column col if its type is std::string.
 
const std::string toString () const override
 Serializes the object to a string.
 
- 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.
 
Workspace_uptr cloneEmpty () const
 Returns a default-initialized clone of the workspace.
 
const std::string & getComment () const
 Get the workspace comment.
 
const WorkspaceHistorygetHistory () const
 Returns a reference to the WorkspaceHistory const.
 
std::string getMemorySizeAsStr () const
 Returns the memory footprint in sensible units.
 
const std::string & getName () const override
 Get the workspace name.
 
const std::string & getPythonVariableName () const
 
virtual const std::string getTitle () const
 Get the workspace title.
 
WorkspaceHistoryhistory ()
 Returns a reference to the WorkspaceHistory.
 
bool isDirty (const int n=1) const
 Check whether other algorithms have been applied to the workspace by checking the history length.
 
virtual bool isGroup () const
 
Workspaceoperator= (const Workspace &other)=delete
 
void setComment (const std::string &)
 Set the comment field of the workspace.
 
void setPythonVariableName (const std::string &)
 
virtual void setTitle (const std::string &)
 Set the title of the workspace.
 
bool threadSafe () const override
 Marks the workspace as safe for multiple threads to edit data simutaneously.
 
 Workspace ()
 
 ~Workspace ()
 
- Public Member Functions inherited from Mantid::Kernel::DataItem
 DataItem ()
 Default constructor.
 
 DataItem (const DataItem &other)
 Copy constructor Always makes a unique lock.
 
virtual ~DataItem ()
 Destructor.
 
void readLock ()
 Acquires a read lock.
 
void unlock ()
 
- Public Member Functions inherited from Mantid::API::ISplittersWorkspace
std::unique_ptr< ISplittersWorkspaceclone () const
 Returns a clone of the workspace.
 
 ISplittersWorkspace ()=default
 
ISplittersWorkspaceoperator= (const ISplittersWorkspace &other)=delete
 
virtual ~ISplittersWorkspace ()=default
 

Protected Member Functions

 SplittersWorkspace (const SplittersWorkspace &)=default
 Protected copy constructor. May be used by childs for cloning.
 
- Protected Member Functions inherited from Mantid::DataObjects::TableWorkspace
 TableWorkspace (const TableWorkspace &other)
 Protected copy constructor. May be used by childs for cloning.
 
- Protected Member Functions inherited from Mantid::API::ITableWorkspace
void insertInColumn (Column *c, size_t index)
 Insert a new element into a column.
 
 ITableWorkspace (const ITableWorkspace &)=default
 Protected copy constructor. May be used by childs for cloning.
 
void removeFromColumn (Column *c, size_t index)
 Remove an element from a column.
 
void resizeColumn (Column *c, size_t size)
 Resize a column.
 
- Protected Member Functions inherited from Mantid::API::Workspace
 Workspace (const Workspace &)
 Protected copy constructor. May be used by childs for cloning.
 
- Protected Member Functions inherited from Mantid::Kernel::DataItem
Poco::RWLock * getLock () const
 Private method to access the RWLock object.
 
- Protected Member Functions inherited from Mantid::API::ISplittersWorkspace
 ISplittersWorkspace (const ISplittersWorkspace &)=default
 Protected copy constructor. May be used by childs for cloning.
 

Private Member Functions

SplittersWorkspacedoClone () const override
 Virtual clone method. Not implemented to force implementation in children.
 
SplittersWorkspacedoCloneEmpty () const override
 Virtual cloneEmpty method.
 

Detailed Description

SplittersWorkspace : A TableWorkspace to contain TimeSplitters.

It will be used as an input for FilterEvents, which is the ultimate method for event filtering. There can be various algorithms to generate an object like this.

A SplittersWorkspace contains 3 columns as int64, int64 and int32 to denote (1) splitter start time (2) splitter end time and (3) group workspace index

Date
2012-04-03

Definition at line 30 of file SplittersWorkspace.h.

Constructor & Destructor Documentation

◆ SplittersWorkspace() [1/2]

Mantid::DataObjects::SplittersWorkspace::SplittersWorkspace ( )

Constructor.

Definition at line 23 of file SplittersWorkspace.cpp.

References Mantid::DataObjects::TableWorkspace::addColumn().

◆ SplittersWorkspace() [2/2]

Mantid::DataObjects::SplittersWorkspace::SplittersWorkspace ( const SplittersWorkspace )
protecteddefault

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

Member Function Documentation

◆ addSplitter()

void Mantid::DataObjects::SplittersWorkspace::addSplitter ( const Kernel::SplittingInterval splitter)
overridevirtual

◆ clone()

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

Returns a clone of the workspace.

Definition at line 35 of file SplittersWorkspace.h.

◆ cloneEmpty()

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

Returns a default-initialized clone of the workspace.

Definition at line 38 of file SplittersWorkspace.h.

◆ doClone()

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

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

Reimplemented from Mantid::API::ITableWorkspace.

Definition at line 54 of file SplittersWorkspace.h.

◆ doCloneEmpty()

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

Virtual cloneEmpty method.

Not implemented to force implementation in children.

Implements Mantid::API::ITableWorkspace.

Definition at line 55 of file SplittersWorkspace.h.

◆ getNumberSplitters()

size_t Mantid::DataObjects::SplittersWorkspace::getNumberSplitters ( ) const
overridevirtual

◆ getSplitter()

Kernel::SplittingInterval Mantid::DataObjects::SplittersWorkspace::getSplitter ( size_t  index)
overridevirtual

◆ operator=()

SplittersWorkspace & Mantid::DataObjects::SplittersWorkspace::operator= ( const SplittersWorkspace other)
delete

◆ removeSplitter()

bool Mantid::DataObjects::SplittersWorkspace::removeSplitter ( size_t  index)
overridevirtual

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