ATLAS Offline Software
Static Public Member Functions | List of all members
Py::cnv< std::list< T > > Struct Template Reference

#include <PyStoreCnvUtils.h>

Collaboration diagram for Py::cnv< std::list< T > >:

Static Public Member Functions

static PyObjecttoPy (const std::list< T > &t)
 

Detailed Description

template<typename T>
struct Py::cnv< std::list< T > >

Definition at line 83 of file PyStoreCnvUtils.h.

Member Function Documentation

◆ toPy()

template<typename T >
static PyObject* Py::cnv< std::list< T > >::toPy ( const std::list< T > &  t)
inlinestatic

Definition at line 85 of file PyStoreCnvUtils.h.

86  {
87  const std::size_t iMax = t.size();
88  PyObject* o = PyList_New( iMax );
89  if ( !o ) {
90  Py_XDECREF( o );
91  Py_INCREF( Py_None );
92  return Py_None;
93  }
94  typename std::list<T>::const_iterator itr = t.begin();
95  for ( std::size_t i = 0; i < iMax; ++i ){
96  PyList_SET_ITEM( o, i, Py::cnv<T>::toPy( *(itr++) ) );
97  }
98  return o;
99  }

The documentation for this struct was generated from the following file:
Py::cnv
helper method to convert a type to a Py::Object
Definition: PyDataStore.h:28
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
lumiFormat.i
int i
Definition: lumiFormat.py:92
PyObject
_object PyObject
Definition: IPyComponent.h:26