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

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, Parallel::Communicator communicator=Parallel::Communicator())
 
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. More...
 

Private Attributes

const Parallel::Communicator m_communicator
 
const API::MatrixWorkspace_const_sptr m_instrumentWorkspace
 
int32_t m_max
 
int32_t m_min
 
std::vector< int32_t > m_range
 

Detailed Description

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 27 of file LoadEventNexusIndexSetup.h.

Constructor & Destructor Documentation

◆ LoadEventNexusIndexSetup()

Mantid::DataHandling::LoadEventNexusIndexSetup::LoadEventNexusIndexSetup ( API::MatrixWorkspace_const_sptr  instrumentWorkspace,
const int32_t  min,
const int32_t  max,
std::vector< int32_t >  range,
Parallel::Communicator  communicator = Parallel::Communicator() 
)

Definition at line 45 of file LoadEventNexusIndexSetup.cpp.

Member Function Documentation

◆ eventIDLimits()

std::pair< int32_t, int32_t > Mantid::DataHandling::LoadEventNexusIndexSetup::eventIDLimits ( ) const

◆ filterIndexInfo()

IndexInfo Mantid::DataHandling::LoadEventNexusIndexSetup::filterIndexInfo ( const Indexing::IndexInfo &  indexInfo)
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 and that the Parallel::StorageMode of indexInfo is Cloned.

Definition at line 166 of file LoadEventNexusIndexSetup.cpp.

References Mantid::EMPTY_INT(), index, m_max, m_min, and m_range.

Referenced by makeIndexInfo().

◆ makeIndexInfo() [1/3]

IndexInfo Mantid::DataHandling::LoadEventNexusIndexSetup::makeIndexInfo ( )

◆ makeIndexInfo() [2/3]

IndexInfo Mantid::DataHandling::LoadEventNexusIndexSetup::makeIndexInfo ( const std::pair< std::vector< int32_t >, std::vector< int32_t > > &  spectrumDetectorMapping,
const bool  monitorsOnly 
)

◆ makeIndexInfo() [3/3]

IndexInfo Mantid::DataHandling::LoadEventNexusIndexSetup::makeIndexInfo ( const std::vector< std::string > &  bankNames)

Member Data Documentation

◆ m_communicator

const Parallel::Communicator Mantid::DataHandling::LoadEventNexusIndexSetup::m_communicator
private

Definition at line 47 of file LoadEventNexusIndexSetup.h.

Referenced by makeIndexInfo().

◆ m_instrumentWorkspace

const API::MatrixWorkspace_const_sptr Mantid::DataHandling::LoadEventNexusIndexSetup::m_instrumentWorkspace
private

Definition at line 43 of file LoadEventNexusIndexSetup.h.

Referenced by makeIndexInfo().

◆ m_max

int32_t Mantid::DataHandling::LoadEventNexusIndexSetup::m_max
private

Definition at line 45 of file LoadEventNexusIndexSetup.h.

Referenced by eventIDLimits(), filterIndexInfo(), and makeIndexInfo().

◆ m_min

int32_t Mantid::DataHandling::LoadEventNexusIndexSetup::m_min
private

Definition at line 44 of file LoadEventNexusIndexSetup.h.

Referenced by eventIDLimits(), filterIndexInfo(), and makeIndexInfo().

◆ m_range

std::vector<int32_t> Mantid::DataHandling::LoadEventNexusIndexSetup::m_range
private

Definition at line 46 of file LoadEventNexusIndexSetup.h.

Referenced by filterIndexInfo().


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