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 "MantidDataHandling/DllConfig.h"
12
13namespace Mantid {
14namespace DataHandling {
15
16using SpectrumPair = std::pair<specnum_t, specnum_t>;
17
19
26class MANTID_DATAHANDLING_DLL DataBlock {
27public:
28 DataBlock();
30 DataBlock(int numberOfperiods, size_t numberOfSpectra, size_t numberOfChannels);
31
32 virtual ~DataBlock() = default;
33
34 virtual specnum_t getMinSpectrumID() const;
35 virtual void setMinSpectrumID(specnum_t minSpecID);
36
37 virtual specnum_t getMaxSpectrumID() const;
38 virtual void setMaxSpectrumID(specnum_t minSpecID);
39
40 virtual size_t getNumberOfSpectra() const;
41 virtual int getNumberOfPeriods() const;
42 virtual size_t getNumberOfChannels() const;
43
44 bool operator==(const DataBlock &other) const;
45
46 virtual std::unique_ptr<DataBlockGenerator> getGenerator() const;
47
48protected:
50 // The number of spectra
52 // The number of time channels per spectrum (N histogram bins -1)
54
55 // minimal spectra Id (by default 1, undefined -- max_value)
57 // maximal spectra Id (by default 1, undefined -- 0)
59};
60
61} // namespace DataHandling
62} // 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:26
Templated class implementation of NXDataSet.
Definition: NexusClasses.h:203
std::pair< specnum_t, specnum_t > SpectrumPair
Definition: DataBlock.h:16
Helper class which provides the Collimation Length for SANS instruments.
int32_t specnum_t
Typedef for a spectrum Number.
Definition: IDTypes.h:16
constexpr bool operator==(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)