OPAL (Object Oriented Parallel Accelerator Library)  2024.1
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 
17 #include "PyOpal/PyCore/Globals.h"
18 
20 
21 namespace PyOpal {
22 namespace PyOutputPlane {
23 
24 const char* module_docstring =
25  "output_plane contains the OutputPlane class";
26 
27 template <>
28 std::vector<PyOpalObjectNS::AttributeDef> PyOpalObjectNS::PyOpalObject<OpalOutputPlane>::attributes = {
29  {"CENTRE", "centre", "", PyOpalObjectNS::FLOAT_LIST},
30  {"NORMAL", "normal", "", PyOpalObjectNS::FLOAT_LIST},
31  {"XSTART", "x_start", "", PyOpalObjectNS::DOUBLE},
32  {"XEND", "x_end", "", PyOpalObjectNS::DOUBLE},
33  {"YSTART", "y_start", "", PyOpalObjectNS::DOUBLE},
34  {"YEND", "y_end", "", PyOpalObjectNS::DOUBLE},
35  {"PLACEMENT_STYLE", "placement_style", "", PyOpalObjectNS::PREDEFINED_STRING},
36  {"ALGORITHM", "algorithm", "", PyOpalObjectNS::PREDEFINED_STRING},
37  {"TOLERANCE", "tolerance", "", PyOpalObjectNS::DOUBLE},
38  {"REFERENCE_ALIGNMENT_PARTICLE", "reference_alignment_particle", "", PyOpalObjectNS::INT},
39  {"OUTFN", "output_filename", "", PyOpalObjectNS::STRING}, // OUTFN comes from OpalElement (yes, all elements can have a filename!)
40  {"VERBOSE", "verbose_level", "", PyOpalObjectNS::INT},
41  {"WIDTH", "width", "", PyOpalObjectNS::DOUBLE},
42  {"HEIGHT", "height", "", PyOpalObjectNS::DOUBLE},
43  {"RADIUS", "radius", "", PyOpalObjectNS::DOUBLE}
44 };
45 
46 template <>
48 "OutputPlane is used to generate output data based on particle tracks crossing a plane.";
49 
50 BOOST_PYTHON_MODULE(output_plane) {
54  auto elementClass = element.make_element_class("OutputPlane");
55 }
56 
57 }
58 }
BOOST_PYTHON_MODULE(output_plane)
void Initialise()
Definition: Globals.cpp:50
boost::python::class_< PyC > make_element_class(const char *className)
Definition: PyOpalObject.h:752
const char * module_docstring