OPAL (Object Oriented Parallel Accelerator Library)
2022.1
OPAL
src
src
_PyOpal
PyBeam.cpp
Go to the documentation of this file.
1
#include "
PyOpal/ExceptionTranslation.h
"
2
#include "
PyOpal/PyBeam.h
"
3
4
#include "
Structure/Beam.h
"
5
6
namespace
PyOpal
{
7
namespace
PyBeamNS {
8
9
std::string
track_run_docstring
= std::string();
10
11
12
const
char
*
module_docstring
=
"build a tracking object"
;
13
14
// DOUBLE, STRING, BOOL, INT
15
template
<>
16
std::vector<PyOpalObjectNS::AttributeDef>
PyOpalObjectNS::PyOpalObject<Beam>::attributes
= {
17
{
"PARTICLE"
,
"particle"
,
""
,
PyOpalObjectNS::STRING
},
18
{
"MASS"
,
"mass"
,
""
,
PyOpalObjectNS::DOUBLE
},
19
{
"CHARGE"
,
"charge"
,
""
,
PyOpalObjectNS::DOUBLE
},
20
{
"ENERGY"
,
"energy"
,
""
,
PyOpalObjectNS::DOUBLE
},
21
{
"PC"
,
"momentum"
,
""
,
PyOpalObjectNS::DOUBLE
},
22
{
"GAMMA"
,
"gamma"
,
""
,
PyOpalObjectNS::DOUBLE
},
23
{
"BCURRENT"
,
"beam_current"
,
""
,
PyOpalObjectNS::DOUBLE
},
24
{
"EX"
,
"ex"
,
""
,
PyOpalObjectNS::DOUBLE
},
25
{
"EY"
,
"ey"
,
""
,
PyOpalObjectNS::DOUBLE
},
26
{
"ET"
,
"et"
,
""
,
PyOpalObjectNS::DOUBLE
},
27
{
"BFREQ"
,
"beam_frequency"
,
""
,
PyOpalObjectNS::DOUBLE
},
28
{
"NPART"
,
"number_of_particles"
,
""
,
PyOpalObjectNS::DOUBLE
},
29
{
"NSLICE"
,
"number_of_slices"
,
""
,
PyOpalObjectNS::DOUBLE
},
30
};
31
32
template
<>
33
std::string
PyOpalObjectNS::PyOpalObject<Beam>::classDocstring
=
""
;
34
35
BOOST_PYTHON_MODULE
(beam) {
36
ExceptionTranslation::registerExceptions
();
37
PyOpalObjectNS::PyOpalObject<Beam>
aBeam;
38
auto
beamClass = aBeam.
make_class
(
"Beam"
);
39
aBeam.
addRegister
(beamClass);
40
}
41
42
}
// PyBeamNS
43
}
// PyOpal
44
PyBeam.h
Beam.h
PyOpal
Definition:
ExceptionTranslation.cpp:5
PyOpal::ExceptionTranslation::registerExceptions
void registerExceptions()
Definition:
ExceptionTranslation.cpp:7
PyOpal::PyBeamNS::track_run_docstring
std::string track_run_docstring
Definition:
PyBeam.cpp:9
PyOpal::PyBeamNS::BOOST_PYTHON_MODULE
BOOST_PYTHON_MODULE(beam)
Definition:
PyBeam.cpp:35
PyOpal::PyBeamNS::module_docstring
const char * module_docstring
Definition:
PyBeam.cpp:12
PyOpal::PyOpalObjectNS::STRING
@ STRING
Definition:
PyOpalObject.h:61
PyOpal::PyOpalObjectNS::DOUBLE
@ DOUBLE
Definition:
PyOpalObject.h:61
PyOpal::PyOpalObjectNS::PyOpalObject
Definition:
PyOpalObject.h:119
PyOpal::PyOpalObjectNS::PyOpalObject::addRegister
void addRegister(PYCLASS &pyclass)
Definition:
PyOpalObject.h:456
PyOpal::PyOpalObjectNS::PyOpalObject::make_class
boost::python::class_< PyC > make_class(const char *className)
Definition:
PyOpalObject.h:439
ExceptionTranslation.h
Generated on Thu Oct 20 2022 17:40:11 for OPAL (Object Oriented Parallel Accelerator Library) by
1.9.3