Mantid
Loading...
Searching...
No Matches
GridDetector.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2020 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 +
12#include <boost/python/class.hpp>
13#include <boost/python/copy_const_reference.hpp>
14#include <boost/python/register_ptr_to_python.hpp>
15#include <boost/python/return_value_policy.hpp>
16
18using namespace Mantid::Geometry;
19using namespace boost::python;
20
22
23
28 register_ptr_to_python<std::shared_ptr<GridDetector>>();
29 register_ptr_to_python<GridDetector_const_sptr>();
30
31 std_vector_exporter<GridDetector_const_sptr, /*NoProxy=*/true>::wrap("std_vector_grid_detector");
32
33 class_<GridDetector, bases<CompAssembly, IObjComponent>, boost::noncopyable>("GridDetector", no_init)
34 .def("xpixels", &GridDetector::xpixels, arg("self"), return_value_policy<copy_const_reference>(),
35 "Returns the number of pixels in the X direction")
36 .def("ypixels", &GridDetector::ypixels, arg("self"), return_value_policy<copy_const_reference>(),
37 "Returns the number of pixels in the Y direction")
38 .def("zpixels", &GridDetector::zpixels, arg("self"), return_value_policy<copy_const_reference>(),
39 "Returns the number of pixels in the Z direction")
40 .def("xstep", &GridDetector::xstep, arg("self"), "Returns the step size in the X direction")
41 .def("ystep", &GridDetector::ystep, arg("self"), "Returns the step size in the Y direction")
42 .def("zstep", &GridDetector::zstep, arg("self"), "Returns the step size in the Z direction")
43 .def("xsize", &GridDetector::xsize, arg("self"), "Returns the size in the X direction")
44 .def("ysize", &GridDetector::ysize, arg("self"), "Returns the size in the Y direction")
45 .def("zsize", &GridDetector::zsize, arg("self"), "Returns the size in the Z direction")
46 .def("xstart", &GridDetector::xstart, arg("self"), "Returns the start position in the X direction")
47 .def("ystart", &GridDetector::ystart, arg("self"), "Returns the start position in the Y direction")
48 .def("zstart", &GridDetector::zstart, arg("self"), "Returns the start position in the Z direction")
49 .def("idstart", &GridDetector::idstart, arg("self"), return_value_policy<copy_const_reference>(),
50 "Returns the idstart")
51 .def("idFillOrder", &GridDetector::idFillOrder, arg("self"), return_value_policy<copy_const_reference>(),
52 "Returns the idFillOrder")
53 .def("idstepbyrow", &GridDetector::idstepbyrow, arg("self"), return_value_policy<copy_const_reference>(),
54 "Returns the idstepbyrow")
55 .def("idstep", &GridDetector::idstep, arg("self"), return_value_policy<copy_const_reference>(),
56 "Returns the idstep")
57 .def("minDetectorID", &GridDetector::minDetectorID, arg("self"), return_value_policy<copy_const_reference>(),
58 "Returns the minimum detector id")
59 .def("maxDetectorID", &GridDetector::maxDetectorID, arg("self"), return_value_policy<copy_const_reference>(),
60 "Returns the maximum detector id");
61}
62
64 class_<GridDetectorPixel, bases<Detector>, boost::noncopyable>("GridDetectorPixel", no_init);
65}
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition GetPointer.h:17
void export_GridDetector()
Enables boost.python to automatically "cast" an object up to the appropriate Detector leaf type.
void export_GridDetectorPixel()
GridDetector is a type of CompAssembly, an assembly of components.
double ystart() const
Returns the start position in the Y direction.
std::array< char, 3UL > const & idFillOrder() const
returns dimensions of filling in order
double ysize() const
Size in Y of the detector.
detid_t const & minDetectorID() const
minimum detector id
int const & ypixels() const
Returns the number of pixels in the Y direction.
double xsize() const
Size in X of the detector.
double ystep() const
Returns the step size in the Y direction.
double xstep() const
Returns the step size in the X direction.
int const & xpixels() const
Returns the number of pixels in the X direction.
int const & idstepbyrow() const
Returns the idstepbyrow.
int const & zpixels() const
Returns the number of pixels in the Z direction.
double xstart() const
Returns the start position in the X direction.
detid_t const & maxDetectorID() const
maximum detector id
double zstart() const
Returns the start position in the Z direction.
double zsize() const
Size in Z of the detector.
int const & idstart() const
Returns the idstart.
double zstep() const
Returns the step size in the Z direction.
int const & idstep() const
Returns the idstep.
std::shared_ptr< const GridDetector > GridDetector_const_sptr
A struct to help export std::vector types.