|
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. | |
| 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. | |
| void | updateSpectraUsing (const API::SpectrumDetectorMapping &map) |
| virtual | ~EventWorkspaceCollection ()=default |
Private Member Functions | |
| DataObjects::EventWorkspace_sptr | createEmptyEventWorkspace () const |
| Create Empty EventWorkspaces. | |
Private Attributes | |
| std::vector< DataObjects::EventWorkspace_sptr > | m_WsVec |
| Vector of EventWorkspaces. | |
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 58 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 241 of file EventWorkspaceCollection.cpp.
References m_WsVec.
| void Mantid::DataHandling::EventWorkspaceCollection::applyFilterInPlace | ( | const boost::function< void(API::MatrixWorkspace_sptr)> & | func | ) |
Definition at line 237 of file EventWorkspaceCollection.cpp.
References m_WsVec.
| API::Workspace_sptr Mantid::DataHandling::EventWorkspaceCollection::combinedWorkspace | ( | ) |
Definition at line 125 of file EventWorkspaceCollection.cpp.
References getSingleHeldWorkspace(), m_WsVec, and nPeriods().
|
private |
Create Empty EventWorkspaces.
Create a blank event workspace.
Definition at line 64 of file EventWorkspaceCollection.cpp.
Referenced by setNPeriods().
| Mantid::API::Axis * Mantid::DataHandling::EventWorkspaceCollection::getAxis | ( | const size_t & | i | ) | const |
Definition at line 172 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 187 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by Mantid::DataHandling::DefaultEventLoader::DefaultEventLoader().
| Types::Core::DateAndTime Mantid::DataHandling::EventWorkspaceCollection::getFirstPulseTime | ( | ) | const |
Definition at line 192 of file EventWorkspaceCollection.cpp.
References m_WsVec.
| Geometry::Instrument_const_sptr Mantid::DataHandling::EventWorkspaceCollection::getInstrument | ( | ) | const |
Definition at line 139 of file EventWorkspaceCollection.cpp.
References m_WsVec.
| size_t Mantid::DataHandling::EventWorkspaceCollection::getNumberEvents | ( | ) | const |
Definition at line 198 of file EventWorkspaceCollection.cpp.
References Mantid::DataObjects::EventList::getNumberEvents(), and m_WsVec.
| size_t Mantid::DataHandling::EventWorkspaceCollection::getNumberHistograms | ( | ) | const |
Definition at line 173 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by Mantid::DataHandling::DefaultEventLoader::DefaultEventLoader(), Mantid::DataHandling::DefaultEventLoader::makeMapToEventLists(), Mantid::DataHandling::ProcessBankCompressed::run(), and Mantid::DataHandling::ProcessBankData::run().
| DataObjects::EventWorkspace_sptr Mantid::DataHandling::EventWorkspaceCollection::getSingleHeldWorkspace | ( | ) |
Definition at line 123 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by combinedWorkspace().
| EventList & Mantid::DataHandling::EventWorkspaceCollection::getSpectrum | ( | const size_t | index | ) |
Definition at line 143 of file EventWorkspaceCollection.cpp.
| const EventList & Mantid::DataHandling::EventWorkspaceCollection::getSpectrum | ( | const size_t | index | ) | const |
Definition at line 144 of file EventWorkspaceCollection.cpp.
| DataObjects::EventList & Mantid::DataHandling::EventWorkspaceCollection::getSpectrum | ( | const size_t | workspace_index, |
| const size_t | periodNumber | ||
| ) |
Definition at line 180 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 175 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 184 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by Mantid::DataHandling::DefaultEventLoader::DefaultEventLoader().
| API::Run & Mantid::DataHandling::EventWorkspaceCollection::mutableRun | ( | ) |
Definition at line 141 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by setNPeriods().
| API::Sample & Mantid::DataHandling::EventWorkspaceCollection::mutableSample | ( | ) |
Definition at line 142 of file EventWorkspaceCollection.cpp.
References m_WsVec.
| size_t Mantid::DataHandling::EventWorkspaceCollection::nPeriods | ( | ) | const |
Definition at line 121 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by Mantid::DataHandling::ProcessBankCompressed::addToEventLists(), Mantid::DataHandling::ProcessBankCompressed::collectEvents(), combinedWorkspace(), Mantid::DataHandling::ProcessBankCompressed::createAccumulators(), Mantid::DataHandling::DefaultEventLoader::DefaultEventLoader(), Mantid::DataHandling::DefaultEventLoader::makeMapToEventLists(), Mantid::DataHandling::LoadBankFromDiskTask::run(), and setNPeriods().
|
delete |
| void Mantid::DataHandling::EventWorkspaceCollection::reserveEventListAt | ( | size_t | wi, |
| size_t | size | ||
| ) |
Definition at line 115 of file EventWorkspaceCollection.cpp.
References m_WsVec.
| const API::Run & Mantid::DataHandling::EventWorkspaceCollection::run | ( | ) | const |
Definition at line 140 of file EventWorkspaceCollection.cpp.
References m_WsVec.
| void Mantid::DataHandling::EventWorkspaceCollection::setAllX | ( | const HistogramData::BinEdges & | x | ) |
Definition at line 193 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 165 of file EventWorkspaceCollection.cpp.
References m_WsVec.
| void Mantid::DataHandling::EventWorkspaceCollection::setGeometryFlag | ( | const int | flag | ) |
Definition at line 219 of file EventWorkspaceCollection.cpp.
References m_WsVec.
Referenced by Mantid::DataHandling::LoadEventNexus::loadSampleDataISIScompatibility().
| void Mantid::DataHandling::EventWorkspaceCollection::setHeight | ( | const float | flag | ) |
Definition at line 226 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 202 of file EventWorkspaceCollection.cpp.
References m_WsVec.
| void Mantid::DataHandling::EventWorkspaceCollection::setInstrument | ( | const Geometry::Instrument_const_sptr & | inst | ) |
Definition at line 208 of file EventWorkspaceCollection.cpp.
References m_WsVec.
| void Mantid::DataHandling::EventWorkspaceCollection::setMonitorWorkspace | ( | const std::shared_ptr< API::MatrixWorkspace > & | monitorWS | ) |
Definition at line 211 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 79 of file EventWorkspaceCollection.cpp.
References createEmptyEventWorkspace(), Mantid::API::g_log, m_WsVec, mutableRun(), nPeriods(), and Mantid::Kernel::Logger::warning().
| void Mantid::DataHandling::EventWorkspaceCollection::setSpectrumNumberForAllPeriods | ( | const size_t | spectrumNumber, |
| const specnum_t | specid | ||
| ) |
Definition at line 158 of file EventWorkspaceCollection.cpp.
References m_WsVec.
| void Mantid::DataHandling::EventWorkspaceCollection::setSpectrumNumbersFromUniqueSpectra | ( | const std::set< int > & | uniqueSpectra | ) |
Definition at line 147 of file EventWorkspaceCollection.cpp.
References m_WsVec, and Mantid::API::ISpectrum::setSpectrumNo().
| void Mantid::DataHandling::EventWorkspaceCollection::setThickness | ( | const float | flag | ) |
Definition at line 223 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 233 of file EventWorkspaceCollection.cpp.
References m_WsVec.
| void Mantid::DataHandling::EventWorkspaceCollection::setWidth | ( | const float | flag | ) |
Definition at line 229 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 249 of file EventWorkspaceCollection.cpp.
| void Mantid::DataHandling::EventWorkspaceCollection::updateSpectraUsing | ( | const API::SpectrumDetectorMapping & | map | ) |
Definition at line 215 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(), getSpectrum(), getSpectrum(), getSpectrum(), getSpectrumToWorkspaceIndexVector(), mutableRun(), mutableSample(), nPeriods(), reserveEventListAt(), run(), setAllX(), setDetectorIdsForAllPeriods(), setGeometryFlag(), setHeight(), setIndexInfo(), setInstrument(), setMonitorWorkspace(), setNPeriods(), setSpectrumNumberForAllPeriods(), setSpectrumNumbersFromUniqueSpectra(), setThickness(), setTitle(), setWidth(), and updateSpectraUsing().