Mantid
Loading...
Searching...
No Matches
EqualBinsChecker.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 "MantidKernel/DllConfig.h"
11#include <string>
12
13namespace Mantid {
14namespace Kernel {
15
22class MANTID_KERNEL_DLL EqualBinsChecker {
23public:
25 enum class ReferenceBin { Average, First };
27 enum class ErrorType { Cumulative, Individual };
28 EqualBinsChecker(const MantidVec &xData, const double errorLevel, const double warningLevel = -1);
29 virtual ~EqualBinsChecker() = default;
30 virtual std::string validate() const;
31 virtual void setReferenceBin(const ReferenceBin &refBinType);
32 virtual void setErrorType(const ErrorType &errorType);
33
34protected:
35 virtual double getReferenceDx() const;
36 virtual double getDifference(const size_t bin, const double dx) const;
37
38private:
40 const double m_errorLevel;
41 const bool m_warn;
42 const double m_warningLevel;
45};
46
47} // namespace Kernel
48} // namespace Mantid
EqualBinsChecker : Checks for evenly spaced bins.
ErrorType
Type of errors to check.
virtual ~EqualBinsChecker()=default
ReferenceBin
Type of bin to compare others to.
Helper class which provides the Collimation Length for SANS instruments.
std::vector< double > MantidVec
typedef for the data storage used in Mantid matrix workspaces
Definition: cow_ptr.h:172