Mantid
Loading...
Searching...
No Matches
PolSANSWorkspaceValidator.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2025 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 "MantidAPI/DllConfig.h"
13
14namespace Mantid {
15namespace API {
16
19class MANTID_API_DLL PolSANSWorkspaceValidator : public Kernel::TypedValidator<WorkspaceGroup_sptr> {
20public:
21 explicit PolSANSWorkspaceValidator(bool expectHistogramData = true, bool allowMultiPeriodData = false,
22 const std::unordered_set<int> &allowedNumberOfPeriods = {4});
24 std::string getType() const { return "polSANS"; }
26 Kernel::IValidator_sptr clone() const override;
27
28private:
30 std::string checkValidity(const WorkspaceGroup_sptr &workspace) const override;
31 std::string validateGroupItem(API::MatrixWorkspace_sptr const &workspace) const;
32
35 const std::unordered_set<int> m_allowedNumberOfPeriods;
36};
37
38} // namespace API
39} // namespace Mantid
IPeaksWorkspace_sptr workspace
PolSANSWorkspaceValidator : Validator for SANS polarized transmission runs.
std::string getType() const
Gets the type of the validator.
const std::unordered_set< int > m_allowedNumberOfPeriods
std::shared_ptr< WorkspaceGroup > WorkspaceGroup_sptr
shared pointer to Mantid::API::WorkspaceGroup
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.