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

Small class that allows a MDEventWorkspace or a MDHistoWorkspace to hold several ExperimentInfo classes. More...

#include <MultipleExperimentInfos.h>

Inheritance diagram for Mantid::API::MultipleExperimentInfos:
Mantid::API::IMDEventWorkspace Mantid::API::IMDHistoWorkspace Mantid::DataObjects::MDEventWorkspace MDHistoWorkspaceTester Mantid::DataObjects::MDHistoWorkspace

Public Member Functions

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

const std::string toString () const
 Returns a string description of the object. More...
 

Private Attributes

std::vector< ExperimentInfo_sptrm_expInfos
 Vector for each ExperimentInfo class. More...
 

Detailed Description

Small class that allows a MDEventWorkspace or a MDHistoWorkspace to hold several ExperimentInfo classes.

Date
2011-11-28

Definition at line 20 of file MultipleExperimentInfos.h.

Constructor & Destructor Documentation

◆ MultipleExperimentInfos() [1/2]

Mantid::API::MultipleExperimentInfos::MultipleExperimentInfos ( )
default

◆ MultipleExperimentInfos() [2/2]

Mantid::API::MultipleExperimentInfos::MultipleExperimentInfos ( const MultipleExperimentInfos other)

Copy constructor.

Parameters
other:: other workspace to copy

Definition at line 25 of file MultipleExperimentInfos.cpp.

◆ ~MultipleExperimentInfos()

virtual Mantid::API::MultipleExperimentInfos::~MultipleExperimentInfos ( )
virtualdefault

Member Function Documentation

◆ addExperimentInfo()

uint16_t Mantid::API::MultipleExperimentInfos::addExperimentInfo ( const ExperimentInfo_sptr ei)

Add a new ExperimentInfo to this MDEventWorkspace.

Parameters
ei:: shared ptr to the ExperimentInfo class to add
Returns
the expInfoIndex at which it was added
Exceptions
std::runtime_errorif you reach the limit of 65536 entries.

Definition at line 63 of file MultipleExperimentInfos.cpp.

References m_expInfos.

◆ copyExperimentInfos()

void Mantid::API::MultipleExperimentInfos::copyExperimentInfos ( const MultipleExperimentInfos other)

Copy the experiment infos from another.

Deep copy.

Parameters
other:: other workspace to copy

Definition at line 90 of file MultipleExperimentInfos.cpp.

References m_expInfos.

Referenced by export_MultipleExperimentInfos(), operator=(), and Mantid::MDAlgorithms::SliceMD::slice().

◆ getExperimentInfo() [1/2]

ExperimentInfo_sptr Mantid::API::MultipleExperimentInfos::getExperimentInfo ( const uint16_t  expInfoIndex)

Get the ExperimentInfo for the given Experiment-Info Index.

Parameters
expInfoIndex:: 0-based index of the run to get.
Returns
shared ptr to the ExperimentInfo class

Definition at line 38 of file MultipleExperimentInfos.cpp.

References m_expInfos.

Referenced by export_MultipleExperimentInfos(), Mantid::MDAlgorithms::FindPeaksMD::findPeaks(), and hasOrientedLattice().

◆ getExperimentInfo() [2/2]

ExperimentInfo_const_sptr Mantid::API::MultipleExperimentInfos::getExperimentInfo ( const uint16_t  expInfoIndex) const

Get the ExperimentInfo for the given Experiment-Info Index.

Parameters
expInfoIndex:: 0-based index of the run to get.
Returns
shared ptr to the ExperimentInfo class

Definition at line 50 of file MultipleExperimentInfos.cpp.

References m_expInfos.

◆ getNumExperimentInfo()

uint16_t Mantid::API::MultipleExperimentInfos::getNumExperimentInfo ( ) const
Returns
the number of ExperimentInfo's in this workspace

Definition at line 85 of file MultipleExperimentInfos.cpp.

References m_expInfos.

Referenced by export_MultipleExperimentInfos(), Mantid::MDAlgorithms::FindPeaksMD::findPeaks(), and hasOrientedLattice().

◆ hasOrientedLattice()

bool Mantid::API::MultipleExperimentInfos::hasOrientedLattice ( ) const

◆ operator=()

MultipleExperimentInfos & Mantid::API::MultipleExperimentInfos::operator= ( const MultipleExperimentInfos other)

Definition at line 27 of file MultipleExperimentInfos.cpp.

References copyExperimentInfos().

◆ setExperimentInfo()

void Mantid::API::MultipleExperimentInfos::setExperimentInfo ( const uint16_t  expInfoIndex,
ExperimentInfo_sptr  ei 
)

Replace the ExperimentInfo entry at a given place.

Parameters
expInfoIndex:: 0-based index of the run to replace
ei:: shared ptr to the ExperimentInfo class to add

Definition at line 77 of file MultipleExperimentInfos.cpp.

References m_expInfos.

◆ toString()

const std::string Mantid::API::MultipleExperimentInfos::toString ( ) const
protected

Returns a string description of the object.

Definition at line 113 of file MultipleExperimentInfos.cpp.

References m_expInfos.

Referenced by Mantid::API::IMDEventWorkspace::toString(), and Mantid::API::IMDHistoWorkspace::toString().

Member Data Documentation

◆ m_expInfos

std::vector<ExperimentInfo_sptr> Mantid::API::MultipleExperimentInfos::m_expInfos
private

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