Mantid
Loading...
Searching...
No Matches
DataBlock.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9#include <memory>
10
11#include "MantidDataHandling/DllConfig.h"
14
15namespace Mantid {
16namespace DataHandling {
17
18using SpectrumPair = std::pair<specnum_t, specnum_t>;
19
21
28class MANTID_DATAHANDLING_DLL DataBlock {
29public:
30 DataBlock();
32 DataBlock(size_t numberOfperiods, size_t numberOfSpectra, size_t numberOfChannels);
33
34 virtual ~DataBlock() = default;
35
36 virtual specnum_t getMinSpectrumID() const;
37 virtual void setMinSpectrumID(specnum_t minSpecID);
38
39 virtual specnum_t getMaxSpectrumID() const;
40 virtual void setMaxSpectrumID(specnum_t minSpecID);
41
42 virtual size_t getNumberOfSpectra() const;
43 virtual size_t getNumberOfPeriods() const;
44 virtual size_t getNumberOfChannels() const;
45
46 bool operator==(const DataBlock &other) const;
47
48 virtual std::unique_ptr<DataBlockGenerator> getGenerator() const;
49
50protected:
52 // The number of spectra
54 // The number of time channels per spectrum (N histogram bins -1)
56
57 // minimal spectra Id (by default 1, undefined -- max_value)
59 // maximal spectra Id (by default 1, undefined -- 0)
61};
62
63} // namespace DataHandling
64} // namespace Mantid
DataBlockGenerator: The DataBlockGenerator class provides increasing int64_t numbers from a collectio...
DataBlock: The DataBlock class holds information about a contiguous block of spectrum numbers.
Definition DataBlock.h:28
Templated class implementation of NXDataSet.
std::pair< specnum_t, specnum_t > SpectrumPair
Definition DataBlock.h:18
Helper class which provides the Collimation Length for SANS instruments.
int32_t specnum_t
Typedef for a spectrum Number.
Definition IDTypes.h:14
constexpr bool operator==(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)