Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::API::RawCountValidator Class Reference

A validator which checks that a workspace contains raw counts in its bins. More...

#include <RawCountValidator.h>

Inheritance diagram for Mantid::API::RawCountValidator:
Mantid::API::MatrixWorkspaceValidator

Public Member Functions

Kernel::IValidator_sptr clone () const override
 Clone the current state. More...
 
std::string getType () const
 Gets the type of the validator. More...
 
 RawCountValidator (const bool &mustNotBeDistribution=true)
 Constructor. More...
 

Private Member Functions

std::string checkValidity (const MatrixWorkspace_sptr &value) const override
 Check for validity. More...
 

Private Attributes

const bool m_mustNotBeDistribution
 A flag indicating whether this validator requires that the workspace must be a distribution (false) or not (true, the default) More...
 

Detailed Description

A validator which checks that a workspace contains raw counts in its bins.

Definition at line 16 of file RawCountValidator.h.

Constructor & Destructor Documentation

◆ RawCountValidator()

Mantid::API::RawCountValidator::RawCountValidator ( const bool &  mustNotBeDistribution = true)
explicit

Constructor.

Parameters
mustNotBeDistribution:: Flag indicating whether the check is that a workspace should not be a distribution (true, default) or should be (false).

Definition at line 17 of file RawCountValidator.cpp.

Member Function Documentation

◆ checkValidity()

std::string Mantid::API::RawCountValidator::checkValidity ( const MatrixWorkspace_sptr value) const
overrideprivate

Check for validity.

Checks if the workspace must be a distribution but isn't and vice-versa.

Parameters
value:: The workspace to test
Returns
A user level description of any problem that exists or "" no problem

Definition at line 28 of file RawCountValidator.cpp.

References m_mustNotBeDistribution, and value.

◆ clone()

Kernel::IValidator_sptr Mantid::API::RawCountValidator::clone ( ) const
override

Clone the current state.

Definition at line 21 of file RawCountValidator.cpp.

◆ getType()

std::string Mantid::API::RawCountValidator::getType ( ) const
inline

Gets the type of the validator.

Definition at line 21 of file RawCountValidator.h.

Member Data Documentation

◆ m_mustNotBeDistribution

const bool Mantid::API::RawCountValidator::m_mustNotBeDistribution
private

A flag indicating whether this validator requires that the workspace must be a distribution (false) or not (true, the default)

Definition at line 31 of file RawCountValidator.h.

Referenced by checkValidity().


The documentation for this class was generated from the following files: