Mantid
Loading...
Searching...
No Matches
OrientedLatticeValidator.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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 +
9#include "MantidAPI/Sample.h"
11#include <memory>
12
14
15namespace Mantid::API {
16
21 return std::make_shared<OrientedLatticeValidator>(*this);
22}
23
30 if (!info->sample().hasOrientedLattice()) {
31 return "Workspace must have a sample with an orientation matrix defined.";
32 } else {
33 return "";
34 }
35}
36
37} // namespace Mantid::API
Kernel::IValidator_sptr clone() const override
Clone the current state.
std::string checkValidity(const ExperimentInfo_sptr &workspace) const override
Check for validity.
std::shared_ptr< ExperimentInfo > ExperimentInfo_sptr
Shared pointer to ExperimentInfo.
std::shared_ptr< IValidator > IValidator_sptr
A shared_ptr to an IValidator.
Definition: IValidator.h:26