12#include <unordered_map>
15#include "MantidAPI/DllConfig.h"
31 using sdmap = std::unordered_map<specnum_t, std::set<detid_t>>;
36 const std::vector<detid_t> &ignoreDetIDs = std::vector<detid_t>());
42 std::set<specnum_t> getSpectrumNumbers()
const;
43 const std::set<detid_t> &getDetectorIDsForSpectrumNo(
const specnum_t spectrumNo)
const;
44 const std::set<detid_t> &getDetectorIDsForSpectrumIndex(
const size_t spectrumIndex)
const;
45 const sdmap &getMapping()
const;
46 bool indexIsSpecNumber()
const;
49 void fillMapFromArray(
const specnum_t *
const spectrumNumbers,
const detid_t *
const detectorIDs,
50 const size_t arrayLengths);
51 void fillMapFromVector(
const std::vector<specnum_t> &spectrumNumbers,
const std::vector<detid_t> &detectorIDs,
52 const std::vector<detid_t> &ignoreDetIDs);
IPeaksWorkspace_sptr workspace
A minimal class to hold the mapping between the spectrum number and its related detector ID numbers f...
sdmap m_mapping
The mapping of a spectrum number to zero or more detector IDs.
std::unordered_map< specnum_t, std::set< detid_t > > sdmap
virtual ~SpectrumDetectorMapping()=default
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
Helper class which provides the Collimation Length for SANS instruments.
int32_t specnum_t
Typedef for a spectrum Number.