![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
11 #ifndef PERFMONEVENT_PYSTORECNVUTILS_H
12 #define PERFMONEVENT_PYSTORECNVUTILS_H
16 #ifdef _POSIX_C_SOURCE
17 # undef _POSIX_C_SOURCE
32 template<
typename CxxType>
44 template<
typename T,
typename U>
45 struct cnv< std::pair<T,U> >
63 struct cnv< std::
vector<T> >
67 const std::size_t iMax =
t.size();
74 for ( std::size_t
i = 0;
i < iMax; ++
i ){
87 const std::size_t iMax =
t.size();
94 typename std::list<T>::const_iterator itr =
t.begin();
95 for ( std::size_t
i = 0;
i < iMax; ++
i ){
104 struct cnv< std::string >
108 return Py_BuildValue(
const_cast<char*
>(
"s#"),
109 const_cast<char*
>(
t.c_str()),
118 {
return Py_BuildValue(
const_cast<char*
>(
"b"),
t ); }
125 {
return PyFloat_FromDouble(
t); }
132 {
return PyFloat_FromDouble(
t); }
139 {
return Py_BuildValue(
const_cast<char*
>(
"i"),
t ); }
146 {
return Py_BuildValue(
const_cast<char*
>(
"h"),
t ); }
153 {
return Py_BuildValue(
const_cast<char*
>(
"l"),
t ); }
160 {
return Py_BuildValue(
const_cast<char*
>(
"l"),
t ); }
167 {
return Py_BuildValue(
const_cast<char*
>(
"k"),
t ); }
173 #endif // PERFMONEVENT_PYSTORECNVUTILS_H
static PyObject * toPy(const std::pair< T, U > &t)
helper method to convert a type to a Py::Object
static PyObject * toPy(unsigned int t)
static PyObject * toPy(int t)
static PyObject * toPy(const std::string &t)
static PyObject * toPy(const std::list< T > &t)
static PyObject * toPy(short int t)
static PyObject * toPy(double t)
static PyObject * toPy(const std::vector< T > &t)
static PyObject * toPy(long int t)
static PyObject * toPy(float t)
setBGCode setTAP setLVL2ErrorBits bool
static PyObject * toPy(bool t)
static PyObject * toPy(unsigned long t)