Mantid
|
SingleCountValidator : This validator checks that there is only a single entry per spectrum, the counts, so no Time-of-Flight data. More...
#include <SingleCountValidator.h>
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... | |
SingleCountValidator (const bool &mustBeSingleCounts=true) | |
Constructor. More... | |
Private Member Functions | |
std::string | checkValidity (const MatrixWorkspace_sptr &ws) const override |
Check for validity. More... | |
Private Attributes | |
const bool | m_mustBeSingleCount |
A flag indicating whether this validator requires that the workspace be contain only single counts or not. More... | |
SingleCountValidator : This validator checks that there is only a single entry per spectrum, the counts, so no Time-of-Flight data.
Warning: only the first bin of the workspace is checked, for performance reasons.
Definition at line 18 of file SingleCountValidator.h.
|
explicit |
Constructor.
mustBeSingleCount | :: Flag indicating whether the check is that a workspace should contain single counts only (true, default) or should not contain single counts (false). |
Definition at line 17 of file SingleCountValidator.cpp.
|
overrideprivate |
Check for validity.
Checks if the workspace contains a single counts when it should not and vice-versa.
For perofrmance reasons this takes the first spectrum size only, instead of relying on MatrixWorkspace::blocksize().
ws | The workspace to validate |
Definition at line 30 of file SingleCountValidator.cpp.
References m_mustBeSingleCount.
|
override |
Clone the current state.
Definition at line 21 of file SingleCountValidator.cpp.
|
inline |
Gets the type of the validator.
Definition at line 23 of file SingleCountValidator.h.
|
private |
A flag indicating whether this validator requires that the workspace be contain only single counts or not.
Definition at line 33 of file SingleCountValidator.h.
Referenced by checkValidity().