11#include <boost/python/class.hpp>
12#include <boost/python/extract.hpp>
13#include <boost/python/list.hpp>
19using namespace
boost::python;
25bool isMaskedFromList(
const IMaskWorkspace &self,
const boost::python::list &ids) {
26 std::set<Mantid::detid_t> idSet;
27 auto length = len(ids);
28 for (
auto i = 0; i < length; ++i) {
29 idSet.insert(extract<Mantid::detid_t>(ids[i])());
36 class_<IMaskWorkspace, boost::noncopyable>(
"IMaskWorkspace", no_init)
38 "Returns the number of masked pixels in the workspace")
40 (arg(
"self"), arg(
"detector_id")),
"Returns whether the given detector ID is masked")
41 .def(
"isMasked", isMaskedFromList, (arg(
"self"), arg(
"detector_id_list")),
42 "Returns whether all of the given detector ID list are masked");
#define GET_POINTER_SPECIALIZATION(TYPE)
void export_IMaskWorkspace()
#define GNU_DIAG_OFF(x)
This is a collection of macros for turning compiler warnings off in a controlled manner.
This class provides an interface to a MaskWorkspace.
virtual bool isMasked(const detid_t detectorID) const =0
Check if a detector is masked.
virtual std::size_t getNumberMasked() const =0
Total number of masked pixels.
Helper class which provides the Collimation Length for SANS instruments.
int32_t detid_t
Typedef for a detector ID.
Encapsulates the registration required for an interface type T that sits on top of a Kernel::DataItem...