SourceXtractorPlusPlus
0.14
Please provide a description of the project.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SEImplementation
src
lib
PythonConfig
PyAperture.cpp
Go to the documentation of this file.
1
18
#include "
SEImplementation/PythonConfig/PyAperture.h
"
19
#include <boost/python/extract.hpp>
20
21
22
namespace
SourceXtractor {
23
24
namespace
bp = boost::python;
25
26
PyAperture::PyAperture
(
const
boost::python::list &py_apertures) {
27
for
(
int
i = 0; i < bp::len(py_apertures); ++i) {
28
apertures
.
push_back
(bp::extract<float>(py_apertures[i]));
29
}
30
}
31
32
std::string
PyAperture::toString
()
const
{
33
std::stringstream
str;
34
str <<
"(ID:"
<<
id
<<
", apertures:["
;
35
for
(
unsigned
int
i = 0; i <
apertures
.
size
(); ++i) {
36
str <<
apertures
[i];
37
if
(i < apertures.size() - 1) {
38
str <<
","
;
39
}
40
}
41
str <<
"])"
;
42
return
str.
str
();
43
}
44
45
}
// end SourceXtractor
SourceXtractor::PyAperture::PyAperture
PyAperture(const boost::python::list &py_apertures)
Definition:
PyAperture.cpp:26
PyAperture.h
std::stringstream
STL class.
std::string
STL class.
std::vector::push_back
T push_back(T...args)
SourceXtractor::PyAperture::apertures
std::vector< float > apertures
Definition:
PyAperture.h:36
std::stringstream::str
T str(T...args)
std::vector::size
T size(T...args)
SourceXtractor::PyAperture::toString
std::string toString() const
Definition:
PyAperture.cpp:32
Generated by
1.8.5