Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::DataHandling::EventWorkspaceCollection Class Reference

EventWorkspaceCollection : Collection of EventWorspaces to give backward-forward compatibility around performing operations on groups. More...

#include <EventWorkspaceCollection.h>

Public Member Functions

void applyFilter (const boost::function< DataObjects::EventWorkspace_sptr(DataObjects::EventWorkspace_sptr)> &func)
 
void applyFilterInPlace (const boost::function< void(API::MatrixWorkspace_sptr)> &func)
 
API::Workspace_sptr combinedWorkspace ()
 
 EventWorkspaceCollection ()
 Constructor. More...
 
 EventWorkspaceCollection (const EventWorkspaceCollection &other)=delete
 
Mantid::API::AxisgetAxis (const size_t &i) const
 
std::vector< size_t > getDetectorIDToWorkspaceIndexVector (Mantid::specnum_t &offset, bool dothrow) const
 
Types::Core::DateAndTime getFirstPulseTime () const
 
Geometry::Instrument_const_sptr getInstrument () const
 
size_t getNumberEvents () const
 
size_t getNumberHistograms () const
 
DataObjects::EventWorkspace_sptr getSingleHeldWorkspace ()
 
DataObjects::EventListgetSpectrum (const size_t index)
 
const DataObjects::EventListgetSpectrum (const size_t index) const
 
DataObjects::EventListgetSpectrum (const size_t workspace_index, const size_t periodNumber)
 
const DataObjects::EventListgetSpectrum (const size_t workspace_index, const size_t periodNumber) const
 
std::vector< size_t > getSpectrumToWorkspaceIndexVector (Mantid::specnum_t &offset) const
 
API::RunmutableRun ()
 
API::SamplemutableSample ()
 
size_t nPeriods () const
 
EventWorkspaceCollectionoperator= (const EventWorkspaceCollection &other)=delete
 
void reserveEventListAt (size_t wi, size_t size)
 
const API::Runrun () const
 
void setAllX (const HistogramData::BinEdges &x)
 
void setDetectorIdsForAllPeriods (const size_t spectrumNumber, const detid_t id)
 
void setGeometryFlag (const int flag)
 
void setHeight (const float flag)
 
void setIndexInfo (const Indexing::IndexInfo &indexInfo)
 
void setInstrument (const Geometry::Instrument_const_sptr &inst)
 
void setMonitorWorkspace (const std::shared_ptr< API::MatrixWorkspace > &monitorWS)
 
void setNPeriods (size_t nPeriods, std::unique_ptr< const Kernel::TimeSeriesProperty< int > > &periodLog)
 
void setSpectrumNumberForAllPeriods (const size_t spectrumNumber, const specnum_t specid)
 
void setSpectrumNumbersFromUniqueSpectra (const std::set< int > &uniqueSpectra)
 
void setThickness (const float flag)
 
void setTitle (const std::string &title)
 
void setWidth (const float flag)
 
virtual bool threadSafe () const
 Returns true if the EventWorkspace is safe for multithreaded operations. More...
 
void updateSpectraUsing (const API::SpectrumDetectorMapping &map)
 
virtual ~EventWorkspaceCollection ()=default
 

Private Member Functions

DataObjects::EventWorkspace_sptr createEmptyEventWorkspace () const
 Create Empty EventWorkspaces. More...
 

Private Attributes

std::vector< DataObjects::EventWorkspace_sptrm_WsVec
 Vector of EventWorkspaces. More...
 

Detailed Description

EventWorkspaceCollection : Collection of EventWorspaces to give backward-forward compatibility around performing operations on groups.

Behave similar to an EventWorkspace with some some additional new functionality. Original purpose to support LoadEventNexus for the MultiPeriod cases.

Definition at line 30 of file EventWorkspaceCollection.h.

Constructor & Destructor Documentation

◆ EventWorkspaceCollection() [1/2]

Mantid::DataHandling::EventWorkspaceCollection::EventWorkspaceCollection ( )

Constructor.

Definition at line 54 of file EventWorkspaceCollection.cpp.

◆ EventWorkspaceCollection() [2/2]

Mantid::DataHandling::EventWorkspaceCollection::EventWorkspaceCollection ( const EventWorkspaceCollection other)
delete

◆ ~EventWorkspaceCollection()

virtual Mantid::DataHandling::EventWorkspaceCollection::~EventWorkspaceCollection ( )
virtualdefault

Member Function Documentation

◆ applyFilter()

void Mantid::DataHandling::EventWorkspaceCollection::applyFilter ( const boost::function< DataObjects::EventWorkspace_sptr(DataObjects::EventWorkspace_sptr)> &  func)

Definition at line 228 of file EventWorkspaceCollection.cpp.

References m_WsVec.

◆ applyFilterInPlace()

void Mantid::DataHandling::EventWorkspaceCollection::applyFilterInPlace ( const boost::function< void(API::MatrixWorkspace_sptr)> &  func)

Definition at line 224 of file EventWorkspaceCollection.cpp.

References m_WsVec.

◆ combinedWorkspace()

API::Workspace_sptr Mantid::DataHandling::EventWorkspaceCollection::combinedWorkspace ( )

Definition at line 112 of file EventWorkspaceCollection.cpp.

References getSingleHeldWorkspace(), m_WsVec, and nPeriods().

◆ createEmptyEventWorkspace()

EventWorkspace_sptr Mantid::DataHandling::EventWorkspaceCollection::createEmptyEventWorkspace ( ) const
private

Create Empty EventWorkspaces.

Create a blank event workspace.

Returns
A shared pointer to a new empty EventWorkspace object

Definition at line 60 of file EventWorkspaceCollection.cpp.

References Mantid::Kernel::SingletonHolder< T >::Instance().

Referenced by setNPeriods().

◆ getAxis()

Mantid::API::Axis * Mantid::DataHandling::EventWorkspaceCollection::getAxis ( const size_t &  i) const

◆ getDetectorIDToWorkspaceIndexVector()

std::vector< size_t > Mantid::DataHandling::EventWorkspaceCollection::getDetectorIDToWorkspaceIndexVector ( Mantid::specnum_t offset,
bool  dothrow 
) const

◆ getFirstPulseTime()

Types::Core::DateAndTime Mantid::DataHandling::EventWorkspaceCollection::getFirstPulseTime ( ) const

Definition at line 179 of file EventWorkspaceCollection.cpp.

References m_WsVec.

◆ getInstrument()

Geometry::Instrument_const_sptr Mantid::DataHandling::EventWorkspaceCollection::getInstrument ( ) const

Definition at line 126 of file EventWorkspaceCollection.cpp.

References m_WsVec.

◆ getNumberEvents()

size_t Mantid::DataHandling::EventWorkspaceCollection::getNumberEvents ( ) const

Definition at line 185 of file EventWorkspaceCollection.cpp.

References m_WsVec.

◆ getNumberHistograms()

size_t Mantid::DataHandling::EventWorkspaceCollection::getNumberHistograms ( ) const

◆ getSingleHeldWorkspace()

DataObjects::EventWorkspace_sptr Mantid::DataHandling::EventWorkspaceCollection::getSingleHeldWorkspace ( )

Definition at line 110 of file EventWorkspaceCollection.cpp.

References m_WsVec.

Referenced by combinedWorkspace().

◆ getSpectrum() [1/4]

EventList & Mantid::DataHandling::EventWorkspaceCollection::getSpectrum ( const size_t  index)

Definition at line 130 of file EventWorkspaceCollection.cpp.

References index, and m_WsVec.

◆ getSpectrum() [2/4]

const EventList & Mantid::DataHandling::EventWorkspaceCollection::getSpectrum ( const size_t  index) const

Definition at line 131 of file EventWorkspaceCollection.cpp.

References index, and m_WsVec.

◆ getSpectrum() [3/4]

DataObjects::EventList & Mantid::DataHandling::EventWorkspaceCollection::getSpectrum ( const size_t  workspace_index,
const size_t  periodNumber 
)

Definition at line 167 of file EventWorkspaceCollection.cpp.

References m_WsVec.

◆ getSpectrum() [4/4]

const DataObjects::EventList & Mantid::DataHandling::EventWorkspaceCollection::getSpectrum ( const size_t  workspace_index,
const size_t  periodNumber 
) const

◆ getSpectrumToWorkspaceIndexVector()

std::vector< size_t > Mantid::DataHandling::EventWorkspaceCollection::getSpectrumToWorkspaceIndexVector ( Mantid::specnum_t offset) const

◆ mutableRun()

API::Run & Mantid::DataHandling::EventWorkspaceCollection::mutableRun ( )

Definition at line 128 of file EventWorkspaceCollection.cpp.

References m_WsVec.

Referenced by setNPeriods().

◆ mutableSample()

API::Sample & Mantid::DataHandling::EventWorkspaceCollection::mutableSample ( )

Definition at line 129 of file EventWorkspaceCollection.cpp.

References m_WsVec.

◆ nPeriods()

size_t Mantid::DataHandling::EventWorkspaceCollection::nPeriods ( ) const

◆ operator=()

EventWorkspaceCollection & Mantid::DataHandling::EventWorkspaceCollection::operator= ( const EventWorkspaceCollection other)
delete

◆ reserveEventListAt()

void Mantid::DataHandling::EventWorkspaceCollection::reserveEventListAt ( size_t  wi,
size_t  size 
)

Definition at line 102 of file EventWorkspaceCollection.cpp.

References m_WsVec.

◆ run()

const API::Run & Mantid::DataHandling::EventWorkspaceCollection::run ( ) const

Definition at line 127 of file EventWorkspaceCollection.cpp.

References m_WsVec.

◆ setAllX()

void Mantid::DataHandling::EventWorkspaceCollection::setAllX ( const HistogramData::BinEdges &  x)

Definition at line 180 of file EventWorkspaceCollection.cpp.

References m_WsVec, and Mantid::Geometry::x.

◆ setDetectorIdsForAllPeriods()

void Mantid::DataHandling::EventWorkspaceCollection::setDetectorIdsForAllPeriods ( const size_t  spectrumNumber,
const detid_t  id 
)

Definition at line 152 of file EventWorkspaceCollection.cpp.

References m_WsVec.

◆ setGeometryFlag()

void Mantid::DataHandling::EventWorkspaceCollection::setGeometryFlag ( const int  flag)

◆ setHeight()

void Mantid::DataHandling::EventWorkspaceCollection::setHeight ( const float  flag)

◆ setIndexInfo()

void Mantid::DataHandling::EventWorkspaceCollection::setIndexInfo ( const Indexing::IndexInfo &  indexInfo)

Definition at line 189 of file EventWorkspaceCollection.cpp.

References m_WsVec.

◆ setInstrument()

void Mantid::DataHandling::EventWorkspaceCollection::setInstrument ( const Geometry::Instrument_const_sptr inst)

Definition at line 195 of file EventWorkspaceCollection.cpp.

References m_WsVec.

◆ setMonitorWorkspace()

void Mantid::DataHandling::EventWorkspaceCollection::setMonitorWorkspace ( const std::shared_ptr< API::MatrixWorkspace > &  monitorWS)

Definition at line 198 of file EventWorkspaceCollection.cpp.

References m_WsVec.

◆ setNPeriods()

void Mantid::DataHandling::EventWorkspaceCollection::setNPeriods ( size_t  nPeriods,
std::unique_ptr< const Kernel::TimeSeriesProperty< int > > &  periodLog 
)

◆ setSpectrumNumberForAllPeriods()

void Mantid::DataHandling::EventWorkspaceCollection::setSpectrumNumberForAllPeriods ( const size_t  spectrumNumber,
const specnum_t  specid 
)

Definition at line 145 of file EventWorkspaceCollection.cpp.

References m_WsVec.

◆ setSpectrumNumbersFromUniqueSpectra()

void Mantid::DataHandling::EventWorkspaceCollection::setSpectrumNumbersFromUniqueSpectra ( const std::set< int > &  uniqueSpectra)

Definition at line 134 of file EventWorkspaceCollection.cpp.

References m_WsVec.

◆ setThickness()

void Mantid::DataHandling::EventWorkspaceCollection::setThickness ( const float  flag)

◆ setTitle()

void Mantid::DataHandling::EventWorkspaceCollection::setTitle ( const std::string &  title)

Definition at line 220 of file EventWorkspaceCollection.cpp.

References m_WsVec.

◆ setWidth()

void Mantid::DataHandling::EventWorkspaceCollection::setWidth ( const float  flag)

◆ threadSafe()

bool Mantid::DataHandling::EventWorkspaceCollection::threadSafe ( ) const
virtual

Returns true if the EventWorkspace is safe for multithreaded operations.

Definition at line 236 of file EventWorkspaceCollection.cpp.

◆ updateSpectraUsing()

void Mantid::DataHandling::EventWorkspaceCollection::updateSpectraUsing ( const API::SpectrumDetectorMapping map)

Definition at line 202 of file EventWorkspaceCollection.cpp.

References m_WsVec.

Member Data Documentation

◆ m_WsVec

std::vector<DataObjects::EventWorkspace_sptr> Mantid::DataHandling::EventWorkspaceCollection::m_WsVec
private

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