OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
PyOutputPlane.cpp
Go to the documentation of this file.
1// Copyright (c) 2023, Chris Rogers
2// All rights reserved
3//
4// This file is part of OPAL.
5//
6// OPAL is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// You should have received a copy of the GNU General Public License
12// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
13//
14
18
20
21namespace PyOpal {
22 template <>
23 std::vector<PyOpalObjectNS::AttributeDef>
25 {"CENTRE", "centre", "", PyOpalObjectNS::FLOAT_LIST},
26 {"NORMAL", "normal", "", PyOpalObjectNS::FLOAT_LIST},
27 {"XSTART", "x_start", "", PyOpalObjectNS::DOUBLE},
28 {"XEND", "x_end", "", PyOpalObjectNS::DOUBLE},
29 {"YSTART", "y_start", "", PyOpalObjectNS::DOUBLE},
30 {"YEND", "y_end", "", PyOpalObjectNS::DOUBLE},
31 {"PLACEMENT_STYLE", "placement_style", "", PyOpalObjectNS::PREDEFINED_STRING},
32 {"ALGORITHM", "algorithm", "", PyOpalObjectNS::PREDEFINED_STRING},
33 {"TOLERANCE", "tolerance", "", PyOpalObjectNS::DOUBLE},
34 {"REFERENCE_ALIGNMENT_PARTICLE", "reference_alignment_particle", "",
36 {"OUTFN", "output_filename", "",
37 PyOpalObjectNS::STRING}, // OUTFN comes from OpalElement (yes, all elements can have a
38 // filename!)
39 {"VERBOSE", "verbose_level", "", PyOpalObjectNS::INT},
40 {"WIDTH", "width", "", PyOpalObjectNS::DOUBLE},
41 {"HEIGHT", "height", "", PyOpalObjectNS::DOUBLE},
42 {"RADIUS", "radius", "", PyOpalObjectNS::DOUBLE}};
43
44 template <>
46 "OutputPlane is used to generate output data based on particle tracks crossing a plane.";
47
48 namespace PyOutputPlane {
49
50 const char* module_docstring = "output_plane contains the OutputPlane class";
51
52 BOOST_PYTHON_MODULE(output_plane) {
56 auto elementClass = element.make_element_class("OutputPlane");
57 }
58
59 } // namespace PyOutputPlane
60} // namespace PyOpal
void registerExceptions()
Register exception translations with boost.
void Initialise()
Globals namespace provides routines to initialise global objects:
Definition: Globals.cpp:50
const char * module_docstring
BOOST_PYTHON_MODULE(output_plane)
PyOpalObject<C> is the basic wrapper class for Opal Objects.
Definition: PyOpalObject.h:138
boost::python::class_< PyC > make_element_class(const char *className)
This is the basic method to make a class for elements.
Definition: PyOpalObject.h:752