Mantid
|
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::Axis * | getAxis (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::EventList & | getSpectrum (const size_t index) |
const DataObjects::EventList & | getSpectrum (const size_t index) const |
DataObjects::EventList & | getSpectrum (const size_t workspace_index, const size_t periodNumber) |
const DataObjects::EventList & | getSpectrum (const size_t workspace_index, const size_t periodNumber) const |
std::vector< size_t > | getSpectrumToWorkspaceIndexVector (Mantid::specnum_t &offset) const |
API::Run & | mutableRun () |
API::Sample & | mutableSample () |
size_t | nPeriods () const |
EventWorkspaceCollection & | operator= (const EventWorkspaceCollection &other)=delete |
void | reserveEventListAt (size_t wi, size_t size) |
const API::Run & | run () 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_sptr > | m_WsVec |
Vector of EventWorkspaces. More... | |
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.
Mantid::DataHandling::EventWorkspaceCollection::EventWorkspaceCollection | ( | ) |
Constructor.
Definition at line 54 of file EventWorkspaceCollection.cpp.
|
delete |
|
virtualdefault |
References Mantid::Kernel::threadSafe().
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.
void Mantid::DataHandling::EventWorkspaceCollection::applyFilterInPlace | ( | const boost::function< void(API::MatrixWorkspace_sptr)> & | func | ) |
Definition at line 224 of file EventWorkspaceCollection.cpp.
References m_WsVec.
API::Workspace_sptr Mantid::DataHandling::EventWorkspaceCollection::combinedWorkspace | ( | ) |
Definition at line 112 of file EventWorkspaceCollection.cpp.
References getSingleHeldWorkspace(), m_WsVec, and nPeriods().
|
private |
Create Empty EventWorkspaces.
Create a blank event workspace.
Definition at line 60 of file EventWorkspaceCollection.cpp.
References Mantid::Kernel::SingletonHolder< T >::Instance().
Referenced by setNPeriods().
Mantid::API::Axis * Mantid::DataHandling::EventWorkspaceCollection::getAxis | ( | const size_t & | i | ) | const |
Definition at line 159 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by Mantid::DataHandling::DefaultEventLoader::makeMapToEventLists().
std::vector< size_t > Mantid::DataHandling::EventWorkspaceCollection::getDetectorIDToWorkspaceIndexVector | ( | Mantid::specnum_t & | offset, |
bool | dothrow | ||
) | const |
Definition at line 174 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by Mantid::DataHandling::DefaultEventLoader::DefaultEventLoader().
Types::Core::DateAndTime Mantid::DataHandling::EventWorkspaceCollection::getFirstPulseTime | ( | ) | const |
Definition at line 179 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Geometry::Instrument_const_sptr Mantid::DataHandling::EventWorkspaceCollection::getInstrument | ( | ) | const |
Definition at line 126 of file EventWorkspaceCollection.cpp.
References m_WsVec.
size_t Mantid::DataHandling::EventWorkspaceCollection::getNumberEvents | ( | ) | const |
Definition at line 185 of file EventWorkspaceCollection.cpp.
References m_WsVec.
size_t Mantid::DataHandling::EventWorkspaceCollection::getNumberHistograms | ( | ) | const |
Definition at line 160 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by Mantid::DataHandling::DefaultEventLoader::DefaultEventLoader(), and Mantid::DataHandling::DefaultEventLoader::makeMapToEventLists().
DataObjects::EventWorkspace_sptr Mantid::DataHandling::EventWorkspaceCollection::getSingleHeldWorkspace | ( | ) |
Definition at line 110 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by combinedWorkspace().
EventList & Mantid::DataHandling::EventWorkspaceCollection::getSpectrum | ( | const size_t | index | ) |
Definition at line 130 of file EventWorkspaceCollection.cpp.
const EventList & Mantid::DataHandling::EventWorkspaceCollection::getSpectrum | ( | const size_t | index | ) | const |
Definition at line 131 of file EventWorkspaceCollection.cpp.
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.
const DataObjects::EventList & Mantid::DataHandling::EventWorkspaceCollection::getSpectrum | ( | const size_t | workspace_index, |
const size_t | periodNumber | ||
) | const |
Definition at line 162 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by Mantid::DataHandling::DefaultEventLoader::DefaultEventLoader(), and Mantid::DataHandling::DefaultEventLoader::makeMapToEventLists().
std::vector< size_t > Mantid::DataHandling::EventWorkspaceCollection::getSpectrumToWorkspaceIndexVector | ( | Mantid::specnum_t & | offset | ) | const |
Definition at line 171 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by Mantid::DataHandling::DefaultEventLoader::DefaultEventLoader().
API::Run & Mantid::DataHandling::EventWorkspaceCollection::mutableRun | ( | ) |
Definition at line 128 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by setNPeriods().
API::Sample & Mantid::DataHandling::EventWorkspaceCollection::mutableSample | ( | ) |
Definition at line 129 of file EventWorkspaceCollection.cpp.
References m_WsVec.
size_t Mantid::DataHandling::EventWorkspaceCollection::nPeriods | ( | ) | const |
Definition at line 108 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by combinedWorkspace(), Mantid::DataHandling::DefaultEventLoader::makeMapToEventLists(), and setNPeriods().
|
delete |
void Mantid::DataHandling::EventWorkspaceCollection::reserveEventListAt | ( | size_t | wi, |
size_t | size | ||
) |
Definition at line 102 of file EventWorkspaceCollection.cpp.
References m_WsVec.
const API::Run & Mantid::DataHandling::EventWorkspaceCollection::run | ( | ) | const |
Definition at line 127 of file EventWorkspaceCollection.cpp.
References m_WsVec.
void Mantid::DataHandling::EventWorkspaceCollection::setAllX | ( | const HistogramData::BinEdges & | x | ) |
Definition at line 180 of file EventWorkspaceCollection.cpp.
References m_WsVec, and Mantid::Geometry::x.
void Mantid::DataHandling::EventWorkspaceCollection::setDetectorIdsForAllPeriods | ( | const size_t | spectrumNumber, |
const detid_t | id | ||
) |
Definition at line 152 of file EventWorkspaceCollection.cpp.
References m_WsVec.
void Mantid::DataHandling::EventWorkspaceCollection::setGeometryFlag | ( | const int | flag | ) |
Definition at line 206 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by Mantid::DataHandling::LoadEventNexus::loadSampleDataISIScompatibility().
void Mantid::DataHandling::EventWorkspaceCollection::setHeight | ( | const float | flag | ) |
Definition at line 213 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by Mantid::DataHandling::LoadEventNexus::loadSampleDataISIScompatibility().
void Mantid::DataHandling::EventWorkspaceCollection::setIndexInfo | ( | const Indexing::IndexInfo & | indexInfo | ) |
Definition at line 189 of file EventWorkspaceCollection.cpp.
References m_WsVec.
void Mantid::DataHandling::EventWorkspaceCollection::setInstrument | ( | const Geometry::Instrument_const_sptr & | inst | ) |
Definition at line 195 of file EventWorkspaceCollection.cpp.
References m_WsVec.
void Mantid::DataHandling::EventWorkspaceCollection::setMonitorWorkspace | ( | const std::shared_ptr< API::MatrixWorkspace > & | monitorWS | ) |
Definition at line 198 of file EventWorkspaceCollection.cpp.
References m_WsVec.
void Mantid::DataHandling::EventWorkspaceCollection::setNPeriods | ( | size_t | nPeriods, |
std::unique_ptr< const Kernel::TimeSeriesProperty< int > > & | periodLog | ||
) |
Definition at line 75 of file EventWorkspaceCollection.cpp.
References createEmptyEventWorkspace(), m_WsVec, mutableRun(), and nPeriods().
void Mantid::DataHandling::EventWorkspaceCollection::setSpectrumNumberForAllPeriods | ( | const size_t | spectrumNumber, |
const specnum_t | specid | ||
) |
Definition at line 145 of file EventWorkspaceCollection.cpp.
References m_WsVec.
void Mantid::DataHandling::EventWorkspaceCollection::setSpectrumNumbersFromUniqueSpectra | ( | const std::set< int > & | uniqueSpectra | ) |
Definition at line 134 of file EventWorkspaceCollection.cpp.
References m_WsVec.
void Mantid::DataHandling::EventWorkspaceCollection::setThickness | ( | const float | flag | ) |
Definition at line 210 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by Mantid::DataHandling::LoadEventNexus::loadSampleDataISIScompatibility().
void Mantid::DataHandling::EventWorkspaceCollection::setTitle | ( | const std::string & | title | ) |
Definition at line 220 of file EventWorkspaceCollection.cpp.
References m_WsVec.
void Mantid::DataHandling::EventWorkspaceCollection::setWidth | ( | const float | flag | ) |
Definition at line 216 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by Mantid::DataHandling::LoadEventNexus::loadSampleDataISIScompatibility().
|
virtual |
Returns true if the EventWorkspace is safe for multithreaded operations.
Definition at line 236 of file EventWorkspaceCollection.cpp.
void Mantid::DataHandling::EventWorkspaceCollection::updateSpectraUsing | ( | const API::SpectrumDetectorMapping & | map | ) |
Definition at line 202 of file EventWorkspaceCollection.cpp.
References m_WsVec.
|
private |
Vector of EventWorkspaces.
Definition at line 34 of file EventWorkspaceCollection.h.
Referenced by applyFilter(), applyFilterInPlace(), combinedWorkspace(), getAxis(), getDetectorIDToWorkspaceIndexVector(), getFirstPulseTime(), getInstrument(), getNumberEvents(), getNumberHistograms(), getSingleHeldWorkspace(), getSpectrum(), getSpectrumToWorkspaceIndexVector(), mutableRun(), mutableSample(), nPeriods(), reserveEventListAt(), run(), setAllX(), setDetectorIdsForAllPeriods(), setGeometryFlag(), setHeight(), setIndexInfo(), setInstrument(), setMonitorWorkspace(), setNPeriods(), setSpectrumNumberForAllPeriods(), setSpectrumNumbersFromUniqueSpectra(), setThickness(), setTitle(), setWidth(), and updateSpectraUsing().