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

#include <PyDataStore.h>

Collaboration diagram for Py::cnv< std::pair< T, U > >:

Static Public Member Functions

static Py::Object to (const std::pair< T, U > &t)
 
static PyObjecttoPy (const std::pair< T, U > &t)
 

Detailed Description

template<typename T, typename U>
struct Py::cnv< std::pair< T, U > >

Definition at line 48 of file PyDataStore.h.

Member Function Documentation

◆ to()

template<typename T , typename U >
static Py::Object Py::cnv< std::pair< T, U > >::to ( const std::pair< T, U > &  t)
inlinestatic

Definition at line 50 of file PyDataStore.h.

51  {
52  Py::Tuple o(2);
53  o[0] = cnv<T>::to(t.first);
54  o[1] = cnv<U>::to(t.second);
55  return o;
56  }

◆ toPy()

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

Definition at line 47 of file PyStoreCnvUtils.h.

48  {
49  PyObject* o = PyTuple_New( 2 );
50  if ( !o ) {
51  Py_XDECREF( o );
52  Py_INCREF( Py_None );
53  return Py_None;
54  }
55  PyTuple_SET_ITEM( o, 0, Py::cnv<T>::toPy( t.first ) );
56  PyTuple_SET_ITEM( o, 1, Py::cnv<T>::toPy( t.second ) );
57  return o;
58  }

The documentation for this struct was generated from the following files:
Py::cnv::to
static Py::Object to(CxxType t)
Definition: PyDataStore.h:30
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
PyObject
_object PyObject
Definition: IPyComponent.h:26
Tuple
PerfMon::Tuple Tuple
Definition: PerfMonSvc.cxx:91