Mantid
Loading...
Searching...
No Matches
BoxController.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
10#include <boost/python/class.hpp>
11#include <boost/python/copy_const_reference.hpp>
12#include <boost/python/register_ptr_to_python.hpp>
13
15using namespace boost::python;
16
18
20 register_ptr_to_python<std::shared_ptr<BoxController>>();
21
22 class_<BoxController, boost::noncopyable>("BoxController", no_init)
23 .def("getNDims", &BoxController::getNDims, arg("self"), "Get # of dimensions")
24 .def("getSplitThreshold", &BoxController::getSplitThreshold, arg("self"),
25 "Return the splitting threshold, in # of events")
26 .def("getSplitInto", &BoxController::getSplitInto, (arg("self"), arg("dim")),
27 "Return into how many to split along a dimension")
28 .def("getMaxDepth", &BoxController::getMaxDepth, arg("self"),
29 "Return the max recursion depth allowed for grid box splitting.")
30 .def("getTotalNumMDBoxes", &BoxController::getTotalNumMDBoxes, arg("self"),
31 "Return the total number of MD Boxes, irrespective of depth")
32 .def("getTotalNumMDGridBoxes", &BoxController::getTotalNumMDGridBoxes, arg("self"),
33 "Return the total number of MDGridBox'es, irrespective of depth")
34 .def("getAverageDepth", &BoxController::getAverageDepth, arg("self"),
35 "Return the average recursion depth of gridding.")
36 .def("isFileBacked", &BoxController::isFileBacked, arg("self"),
37 "Return True if the MDEventWorkspace is backed by a file ")
38 .def("getFilename", &BoxController::getFilename, arg("self"),
39 "Return the full path to the file open as the file-based back or "
40 "empty string if no file back-end is initiated")
41 .def("useWriteBuffer", &BoxController::useWriteBuffer, arg("self"), "Return true if the MRU should be used");
42}
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition: GetPointer.h:17
void export_BoxController()
This class is used by MDBox and MDGridBox in order to intelligently determine optimal behavior.
Definition: BoxController.h:33
size_t getSplitInto(size_t dim) const
Return into how many to split along a dimension.
double getAverageDepth() const
Return the average recursion depth of gridding.
bool isFileBacked() const
Returns if current box controller is file backed.
size_t getNDims() const
Get # of dimensions.
Definition: BoxController.h:70
std::string getFilename() const
the function left for compartibility with the previous bc python interface.
size_t getTotalNumMDBoxes() const
Return the total number of MD Boxes, irrespective of depth.
size_t getTotalNumMDGridBoxes() const
Return the total number of MDGridBox'es, irrespective of depth.
size_t getSplitThreshold() const
Return the splitting threshold, in # of events.
bool useWriteBuffer() const
the compartibility function – the write buffer is always used for file based workspaces