Mantid
Loading...
Searching...
No Matches
SingleCountValidator.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2017 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
10
11namespace Mantid {
12namespace API {
13
18class MANTID_API_DLL SingleCountValidator : public MatrixWorkspaceValidator {
19public:
20 explicit SingleCountValidator(const bool &mustBeSingleCounts = true);
21
23 std::string getType() const { return "single_count"; }
25 Kernel::IValidator_sptr clone() const override;
26
27private:
29 std::string checkValidity(const MatrixWorkspace_sptr &ws) const override;
30
34};
35
36} // namespace API
37} // namespace Mantid
An interface for those validators that require the MatrixWorkspace interface.
SingleCountValidator : This validator checks that there is only a single entry per spectrum,...
std::string getType() const
Gets the type of the validator.
const bool m_mustBeSingleCount
A flag indicating whether this validator requires that the workspace be contain only single counts or...
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< IValidator > IValidator_sptr
A shared_ptr to an IValidator.
Definition: IValidator.h:26
Helper class which provides the Collimation Length for SANS instruments.