|
Mantid
|
Helper for LoadEventNexus dealing with setting up indices (spectrum numbers an detector ID mapping) for workspaces. More...
#include <LoadEventNexusIndexSetup.h>
Public Member Functions | |
| std::pair< int32_t, int32_t > | eventIDLimits () const |
| LoadEventNexusIndexSetup (API::MatrixWorkspace_const_sptr instrumentWorkspace, const int32_t min, const int32_t max, std::vector< int32_t > range) | |
| Indexing::IndexInfo | makeIndexInfo () |
| Indexing::IndexInfo | makeIndexInfo (const std::pair< std::vector< int32_t >, std::vector< int32_t > > &spectrumDetectorMapping, const bool monitorsOnly) |
| Indexing::IndexInfo | makeIndexInfo (const std::vector< std::string > &bankNames) |
Private Member Functions | |
| Indexing::IndexInfo | filterIndexInfo (const Indexing::IndexInfo &indexInfo) |
| Filter IndexInfo based on optional spectrum range/list provided. | |
Private Attributes | |
| const API::MatrixWorkspace_const_sptr | m_instrumentWorkspace |
| int32_t | m_max |
| int32_t | m_min |
| std::vector< int32_t > | m_range |
Helper for LoadEventNexus dealing with setting up indices (spectrum numbers an detector ID mapping) for workspaces.
Filters set via min, max, and range are used by LoadEventNexus for selecting from the event_id entry in Nexus files. This may either correspond to a spectrum number (ISIS) or a detector ID. Throughout this class IndexInfo is used for filtering and thus the spectrum number is set to the requested event_id ranges. The final returned IndexInfo will however have spectrum numbers that, in general, are not the event_ids (except for ISIS).
Definition at line 26 of file LoadEventNexusIndexSetup.h.
| Mantid::DataHandling::LoadEventNexusIndexSetup::LoadEventNexusIndexSetup | ( | API::MatrixWorkspace_const_sptr | instrumentWorkspace, |
| const int32_t | min, | ||
| const int32_t | max, | ||
| std::vector< int32_t > | range | ||
| ) |
Definition at line 67 of file LoadEventNexusIndexSetup.cpp.
| std::pair< int32_t, int32_t > Mantid::DataHandling::LoadEventNexusIndexSetup::eventIDLimits | ( | ) | const |
Definition at line 71 of file LoadEventNexusIndexSetup.cpp.
Referenced by Mantid::DataHandling::LoadEventNexus::createSpectraMapping().
|
private |
Filter IndexInfo based on optional spectrum range/list provided.
Checks the validity of user provided spectrum range/list. This method assumes that spectrum numbers in indexInfo argument are sorted
Definition at line 181 of file LoadEventNexusIndexSetup.cpp.
References Mantid::EMPTY_INT(), index, m_max, m_min, and m_range.
Referenced by makeIndexInfo(), and makeIndexInfo().
| IndexInfo Mantid::DataHandling::LoadEventNexusIndexSetup::makeIndexInfo | ( | ) |
Definition at line 73 of file LoadEventNexusIndexSetup.cpp.
References filterIndexInfo(), and m_instrumentWorkspace.
Referenced by Mantid::DataHandling::LoadEventNexus::createSpectraMapping(), and Mantid::DataHandling::LoadEventAsWorkspace2D::exec().
| IndexInfo Mantid::DataHandling::LoadEventNexusIndexSetup::makeIndexInfo | ( | const std::pair< std::vector< int32_t >, std::vector< int32_t > > & | spectrumDetectorMapping, |
| const bool | monitorsOnly | ||
| ) |
Definition at line 133 of file LoadEventNexusIndexSetup.cpp.
References filterIndexInfo(), Mantid::API::SpectrumDetectorMapping::getDetectorIDsForSpectrumNo(), Mantid::API::SpectrumDetectorMapping::getSpectrumNumbers(), and m_instrumentWorkspace.
| IndexInfo Mantid::DataHandling::LoadEventNexusIndexSetup::makeIndexInfo | ( | const std::vector< std::string > & | bankNames | ) |
Definition at line 99 of file LoadEventNexusIndexSetup.cpp.
References Mantid::EMPTY_INT(), m_instrumentWorkspace, m_max, and m_min.
|
private |
Definition at line 42 of file LoadEventNexusIndexSetup.h.
Referenced by makeIndexInfo(), makeIndexInfo(), and makeIndexInfo().
|
private |
Definition at line 44 of file LoadEventNexusIndexSetup.h.
Referenced by eventIDLimits(), filterIndexInfo(), and makeIndexInfo().
|
private |
Definition at line 43 of file LoadEventNexusIndexSetup.h.
Referenced by eventIDLimits(), filterIndexInfo(), and makeIndexInfo().
|
private |
Definition at line 45 of file LoadEventNexusIndexSetup.h.
Referenced by filterIndexInfo().