/* Generated by Cython 0.27.3 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_27_3"
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#if PY_VERSION_HEX < 0x030700A0 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject **args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif


#define __PYX_ERR(f_index, lineno, Ln_error) \
{ \
  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
}

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__km3pipe__dataclasses
#define __PYX_HAVE_API__km3pipe__dataclasses
#include <string.h>
#include <stdio.h>
#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;

/* Header.proto */
#if !defined(CYTHON_CCOMPLEX)
  #if defined(__cplusplus)
    #define CYTHON_CCOMPLEX 1
  #elif defined(_Complex_I)
    #define CYTHON_CCOMPLEX 1
  #else
    #define CYTHON_CCOMPLEX 0
  #endif
#endif
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #include <complex>
  #else
    #include <complex.h>
  #endif
#endif
#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
  #undef _Complex_I
  #define _Complex_I 1.0fj
#endif


static const char *__pyx_f[] = {
  "km3pipe/dataclasses.pyx",
  "stringsource",
  "__init__.pxd",
  "type.pxd",
};

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":743
 * # in Cython to enable them only on the right systems.
 * 
 * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 */
typedef npy_int8 __pyx_t_5numpy_int8_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":744
 * 
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t
 */
typedef npy_int16 __pyx_t_5numpy_int16_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":745
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int64      int64_t
 * #ctypedef npy_int96      int96_t
 */
typedef npy_int32 __pyx_t_5numpy_int32_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":746
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_int96      int96_t
 * #ctypedef npy_int128     int128_t
 */
typedef npy_int64 __pyx_t_5numpy_int64_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":750
 * #ctypedef npy_int128     int128_t
 * 
 * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 */
typedef npy_uint8 __pyx_t_5numpy_uint8_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":751
 * 
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t
 */
typedef npy_uint16 __pyx_t_5numpy_uint16_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":752
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint64     uint64_t
 * #ctypedef npy_uint96     uint96_t
 */
typedef npy_uint32 __pyx_t_5numpy_uint32_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":753
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_uint96     uint96_t
 * #ctypedef npy_uint128    uint128_t
 */
typedef npy_uint64 __pyx_t_5numpy_uint64_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":757
 * #ctypedef npy_uint128    uint128_t
 * 
 * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_float64    float64_t
 * #ctypedef npy_float80    float80_t
 */
typedef npy_float32 __pyx_t_5numpy_float32_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":758
 * 
 * ctypedef npy_float32    float32_t
 * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_float80    float80_t
 * #ctypedef npy_float128   float128_t
 */
typedef npy_float64 __pyx_t_5numpy_float64_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":767
 * # The int types are mapped a bit surprising --
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t
 */
typedef npy_long __pyx_t_5numpy_int_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":768
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   longlong_t
 * 
 */
typedef npy_longlong __pyx_t_5numpy_long_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":769
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_ulong      uint_t
 */
typedef npy_longlong __pyx_t_5numpy_longlong_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":771
 * ctypedef npy_longlong   longlong_t
 * 
 * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t
 */
typedef npy_ulong __pyx_t_5numpy_uint_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":772
 * 
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 */
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":773
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_intp       intp_t
 */
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":775
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uintp      uintp_t
 * 
 */
typedef npy_intp __pyx_t_5numpy_intp_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776
 * 
 * ctypedef npy_intp       intp_t
 * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_double     float_t
 */
typedef npy_uintp __pyx_t_5numpy_uintp_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778
 * ctypedef npy_uintp      uintp_t
 * 
 * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t
 */
typedef npy_double __pyx_t_5numpy_float_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779
 * 
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longdouble longdouble_t
 * 
 */
typedef npy_double __pyx_t_5numpy_double_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":780
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cfloat      cfloat_t
 */
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
/* Declarations.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< float > __pyx_t_float_complex;
  #else
    typedef float _Complex __pyx_t_float_complex;
  #endif
#else
    typedef struct { float real, imag; } __pyx_t_float_complex;
#endif
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);

/* Declarations.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< double > __pyx_t_double_complex;
  #else
    typedef double _Complex __pyx_t_double_complex;
  #endif
#else
    typedef struct { double real, imag; } __pyx_t_double_complex;
#endif
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);


/*--- Type declarations ---*/
struct __pyx_obj_7km3pipe_11dataclasses_Hit;
struct __pyx_obj_7km3pipe_11dataclasses_RawHit;
struct __pyx_obj_7km3pipe_11dataclasses_CRawHit;
struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit;
struct __pyx_obj_7km3pipe_11dataclasses_McHit;
struct __pyx_obj_7km3pipe_11dataclasses_Track;
struct __pyx_obj_7km3pipe_11dataclasses_McTrack;
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row;
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr;
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator;
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator;
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator;
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict;
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":782
 * ctypedef npy_longdouble longdouble_t
 * 
 * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t
 */
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":783
 * 
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
 * ctypedef npy_clongdouble clongdouble_t
 * 
 */
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cdouble     complex_t
 */
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":786
 * ctypedef npy_clongdouble clongdouble_t
 * 
 * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 */
typedef npy_cdouble __pyx_t_5numpy_complex_t;
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;
struct __pyx_defaults {
  PyObject *__pyx_arg_input_array;
};

/* "km3pipe/dataclasses.pyx":511
 * 
 * 
 * cdef class Hit:             # <<<<<<<<<<<<<<
 *     """Hit on a PMT.
 * 
 */
struct __pyx_obj_7km3pipe_11dataclasses_Hit {
  PyObject_HEAD
  int id;
  int dom_id;
  int time;
  int tot;
  int channel_id;
  int pmt_id;
  unsigned short triggered;
  float pos_x;
  float pos_y;
  float pos_z;
  float dir_x;
  float dir_y;
  float dir_z;
  float t0;
};


/* "km3pipe/dataclasses.pyx":589
 * 
 * 
 * cdef class RawHit:             # <<<<<<<<<<<<<<
 *     """RawHit on a PMT.
 * 
 */
struct __pyx_obj_7km3pipe_11dataclasses_RawHit {
  PyObject_HEAD
  int dom_id;
  int tot;
  int channel_id;
  double time;
  unsigned short triggered;
};


/* "km3pipe/dataclasses.pyx":632
 * 
 * 
 * cdef class CRawHit:             # <<<<<<<<<<<<<<
 *     """RawHit on a PMT.
 * 
 */
struct __pyx_obj_7km3pipe_11dataclasses_CRawHit {
  PyObject_HEAD
  int dom_id;
  int tot;
  int channel_id;
  int du;
  int floor;
  float dir_x;
  float dir_y;
  float dir_z;
  float pos_x;
  float pos_y;
  float pos_z;
  float t0;
  double time;
  unsigned short triggered;
};


/* "km3pipe/dataclasses.pyx":697
 * 
 * 
 * cdef class TimesliceHit:             # <<<<<<<<<<<<<<
 *     """Timeslice hit on a PMT.
 * 
 */
struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit {
  PyObject_HEAD
  int dom_id;
  int time;
  int tot;
  int channel_id;
  PyArrayObject *pos;
  PyArrayObject *dir;
};


/* "km3pipe/dataclasses.pyx":736
 * 
 * 
 * cdef class McHit:             # <<<<<<<<<<<<<<
 *     """Monte Carlo Hit on a PMT.
 * 
 */
struct __pyx_obj_7km3pipe_11dataclasses_McHit {
  PyObject_HEAD
  float a;
  double time;
  int origin;
  int pmt_id;
};


/* "km3pipe/dataclasses.pyx":774
 * 
 * 
 * cdef class Track:             # <<<<<<<<<<<<<<
 *     """Particle track.
 * 
 */
struct __pyx_obj_7km3pipe_11dataclasses_Track {
  PyObject_HEAD
  int id;
  int time;
  int type;
  int interaction_channel;
  float energy;
  float length;
  float bjorkeny;
  unsigned short is_cc;
  PyArrayObject *pos;
  PyArrayObject *dir;
};


/* "km3pipe/dataclasses.pyx":1079
 * 
 * 
 * cdef class McTrack:             # <<<<<<<<<<<<<<
 *     """Monte Carlo Particle track.
 * 
 */
struct __pyx_obj_7km3pipe_11dataclasses_McTrack {
  PyObject_HEAD
  int id;
  int time;
  int type;
  int interaction_channel;
  float energy;
  float length;
  float bjorkeny;
  unsigned short is_cc;
  PyArrayObject *pos;
  PyArrayObject *dir;
};


/* "km3pipe/dataclasses.pyx":421
 * 
 *     @classmethod
 *     def from_row(cls, row, **kwargs):             # <<<<<<<<<<<<<<
 *         args = tuple((row[col] for col in cls.dtype.names))
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 */
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row {
  PyObject_HEAD
  PyObject *__pyx_v_cls;
  PyObject *__pyx_v_row;
};


/* "km3pipe/dataclasses.pyx":422
 *     @classmethod
 *     def from_row(cls, row, **kwargs):
 *         args = tuple((row[col] for col in cls.dtype.names))             # <<<<<<<<<<<<<<
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 * 
 */
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr {
  PyObject_HEAD
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *__pyx_outer_scope;
  PyObject *__pyx_v_col;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "km3pipe/dataclasses.pyx":1982
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator {
  PyObject_HEAD
  PyObject *__pyx_v_i;
  PyObject *__pyx_v_index;
  PyObject *__pyx_v_self;
  PyObject *__pyx_v_start;
  PyObject *__pyx_v_step;
  PyObject *__pyx_v_stop;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "km3pipe/dataclasses.pyx":2285
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator {
  PyObject_HEAD
  PyObject *__pyx_v_i;
  PyObject *__pyx_v_index;
  PyObject *__pyx_v_self;
  PyObject *__pyx_v_start;
  PyObject *__pyx_v_step;
  PyObject *__pyx_v_stop;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "km3pipe/dataclasses.pyx":2400
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator {
  PyObject_HEAD
  PyObject *__pyx_v_i;
  PyObject *__pyx_v_index;
  PyObject *__pyx_v_self;
  PyObject *__pyx_v_start;
  PyObject *__pyx_v_step;
  PyObject *__pyx_v_stop;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "km3pipe/dataclasses.pyx":2458
 * 
 *     @classmethod
 *     def from_dict(cls, map, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 */
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict {
  PyObject_HEAD
  PyObject *__pyx_v_dtype;
  PyObject *__pyx_v_map;
};


/* "km3pipe/dataclasses.pyx":2461
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],             # <<<<<<<<<<<<<<
 *                             dtype=dtype), **kwargs)
 * 
 */
struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr {
  PyObject_HEAD
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict *__pyx_outer_scope;
  PyObject *__pyx_v_key;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
    const char* function_name);

/* Profile.proto */
#ifndef CYTHON_PROFILE
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
  #define CYTHON_PROFILE 0
#else
  #define CYTHON_PROFILE 1
#endif
#endif
#ifndef CYTHON_TRACE_NOGIL
  #define CYTHON_TRACE_NOGIL 0
#else
  #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
    #define CYTHON_TRACE 1
  #endif
#endif
#ifndef CYTHON_TRACE
  #define CYTHON_TRACE 0
#endif
#if CYTHON_TRACE
  #undef CYTHON_PROFILE_REUSE_FRAME
#endif
#ifndef CYTHON_PROFILE_REUSE_FRAME
  #define CYTHON_PROFILE_REUSE_FRAME 0
#endif
#if CYTHON_PROFILE || CYTHON_TRACE
  #include "compile.h"
  #include "frameobject.h"
  #include "traceback.h"
  #if CYTHON_PROFILE_REUSE_FRAME
    #define CYTHON_FRAME_MODIFIER static
    #define CYTHON_FRAME_DEL(frame)
  #else
    #define CYTHON_FRAME_MODIFIER
    #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
  #endif
  #define __Pyx_TraceDeclarations\
  static PyCodeObject *__pyx_frame_code = NULL;\
  CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\
  int __Pyx_use_tracing = 0;
  #define __Pyx_TraceFrameInit(codeobj)\
  if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj;
  #ifdef WITH_THREAD
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
  if (nogil) {\
      if (CYTHON_TRACE_NOGIL) {\
          PyThreadState *tstate;\
          PyGILState_STATE state = PyGILState_Ensure();\
          tstate = __Pyx_PyThreadState_Current;\
          if (unlikely(tstate->use_tracing) && !tstate->tracing &&\
                  (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
              __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          }\
          PyGILState_Release(state);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  } else {\
      PyThreadState* tstate = PyThreadState_GET();\
      if (unlikely(tstate->use_tracing) && !tstate->tracing &&\
              (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
          __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  }
  #else
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
  {   PyThreadState* tstate = PyThreadState_GET();\
      if (unlikely(tstate->use_tracing) && !tstate->tracing &&\
              (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
          __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  }
  #endif
  #define __Pyx_TraceException()\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (tstate->use_tracing &&\
              (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
          tstate->tracing++;\
          tstate->use_tracing = 0;\
          PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\
          if (exc_info) {\
              if (CYTHON_TRACE && tstate->c_tracefunc)\
                  tstate->c_tracefunc(\
                      tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
              tstate->c_profilefunc(\
                  tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
              Py_DECREF(exc_info);\
          }\
          tstate->use_tracing = 1;\
          tstate->tracing--;\
      }\
  }
  static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) {
      PyObject *type, *value, *traceback;
      PyErr_Fetch(&type, &value, &traceback);
      tstate->tracing++;
      tstate->use_tracing = 0;
      if (CYTHON_TRACE && tstate->c_tracefunc)
          tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result);
      if (tstate->c_profilefunc)
          tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result);
      CYTHON_FRAME_DEL(frame);
      tstate->use_tracing = 1;
      tstate->tracing--;
      PyErr_Restore(type, value, traceback);
  }
  #ifdef WITH_THREAD
  #define __Pyx_TraceReturn(result, nogil)\
  if (likely(!__Pyx_use_tracing)); else {\
      if (nogil) {\
          if (CYTHON_TRACE_NOGIL) {\
              PyThreadState *tstate;\
              PyGILState_STATE state = PyGILState_Ensure();\
              tstate = __Pyx_PyThreadState_Current;\
              if (tstate->use_tracing) {\
                  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
              }\
              PyGILState_Release(state);\
          }\
      } else {\
          PyThreadState* tstate = __Pyx_PyThreadState_Current;\
          if (tstate->use_tracing) {\
              __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
          }\
      }\
  }
  #else
  #define __Pyx_TraceReturn(result, nogil)\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (tstate->use_tracing) {\
          __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
      }\
  }
  #endif
  static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno);
  static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno);
#else
  #define __Pyx_TraceDeclarations
  #define __Pyx_TraceFrameInit(codeobj)
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)   if ((1)); else goto_error;
  #define __Pyx_TraceException()
  #define __Pyx_TraceReturn(result, nogil)
#endif
#if CYTHON_TRACE
  static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) {
      int ret;
      PyObject *type, *value, *traceback;
      PyErr_Fetch(&type, &value, &traceback);
      __Pyx_PyFrame_SetLineNumber(frame, lineno);
      tstate->tracing++;
      tstate->use_tracing = 0;
      ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
      tstate->use_tracing = 1;
      tstate->tracing--;
      if (likely(!ret)) {
          PyErr_Restore(type, value, traceback);
      } else {
          Py_XDECREF(type);
          Py_XDECREF(value);
          Py_XDECREF(traceback);
      }
      return ret;
  }
  #ifdef WITH_THREAD
  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
  if (likely(!__Pyx_use_tracing)); else {\
      if (nogil) {\
          if (CYTHON_TRACE_NOGIL) {\
              int ret = 0;\
              PyThreadState *tstate;\
              PyGILState_STATE state = PyGILState_Ensure();\
              tstate = __Pyx_PyThreadState_Current;\
              if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\
                  ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
              }\
              PyGILState_Release(state);\
              if (unlikely(ret)) goto_error;\
          }\
      } else {\
          PyThreadState* tstate = __Pyx_PyThreadState_Current;\
          if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\
              int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
              if (unlikely(ret)) goto_error;\
          }\
      }\
  }
  #else
  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\
          int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
          if (unlikely(ret)) goto_error;\
      }\
  }
  #endif
#else
  #define __Pyx_TraceLine(lineno, nogil, goto_error)   if ((1)); else goto_error;
#endif

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#endif

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

/* UnpackTupleError.proto */
static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);

/* UnpackTuple2.proto */
#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
    (likely(is_tuple || PyTuple_Check(tuple)) ?\
        (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
            __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
            (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
        __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
    PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
static int __Pyx_unpack_tuple2_generic(
    PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);

/* dict_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);

/* IncludeStringH.proto */
#include <string.h>

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* StrEquals.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

/* CythonFunction.proto */
#define __Pyx_CyFunction_USED 1
#include <structmember.h>
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f)\
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj;
    void *defaults;
    int defaults_pyobjects;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(void);

/* GetModuleGlobalName.proto */
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* MergeKeywords.proto */
static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping);

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

/* SetItemInt.proto */
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* UnicodeAsUCS4.proto */
static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*);

/* object_ord.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyObject_Ord(c)\
    (likely(PyUnicode_Check(c)) ? (long)__Pyx_PyUnicode_AsPy_UCS4(c) : __Pyx__PyObject_Ord(c))
#else
#define __Pyx_PyObject_Ord(c) __Pyx__PyObject_Ord(c)
#endif
static long __Pyx__PyObject_Ord(PyObject* c);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* StringJoin.proto */
#if PY_MAJOR_VERSION < 3
#define __Pyx_PyString_Join __Pyx_PyBytes_Join
#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
#else
#define __Pyx_PyString_Join PyUnicode_Join
#define __Pyx_PyBaseString_Join PyUnicode_Join
#endif
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION < 3
    #define __Pyx_PyBytes_Join _PyString_Join
    #else
    #define __Pyx_PyBytes_Join _PyBytes_Join
    #endif
#else
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
    PyObject_RichCompare(op1, op2, Py_EQ)
    #endif

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

/* WriteUnraisableException.proto */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil);

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            PyObject* args = PyTuple_Pack(1, key);
            if (likely(args))
                PyErr_SetObject(PyExc_KeyError, args);
            Py_XDECREF(args);
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#else
    #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#endif

/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

/* Py3ClassCreate.proto */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

/* ClassMethod.proto */
#include "descrobject.h"
static PyObject* __Pyx_Method_ClassMethod(PyObject *method);

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value);

/* RealImag.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #define __Pyx_CREAL(z) ((z).real())
    #define __Pyx_CIMAG(z) ((z).imag())
  #else
    #define __Pyx_CREAL(z) (__real__(z))
    #define __Pyx_CIMAG(z) (__imag__(z))
  #endif
#else
    #define __Pyx_CREAL(z) ((z).real)
    #define __Pyx_CIMAG(z) ((z).imag)
#endif
#if defined(__cplusplus) && CYTHON_CCOMPLEX\
        && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
    #define __Pyx_SET_CREAL(z,x) ((z).real(x))
    #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
#else
    #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
    #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq_float(a, b)   ((a)==(b))
    #define __Pyx_c_sum_float(a, b)  ((a)+(b))
    #define __Pyx_c_diff_float(a, b) ((a)-(b))
    #define __Pyx_c_prod_float(a, b) ((a)*(b))
    #define __Pyx_c_quot_float(a, b) ((a)/(b))
    #define __Pyx_c_neg_float(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
    #define __Pyx_c_conj_float(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (::std::abs(z))
        #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_float(z) ((z)==0)
    #define __Pyx_c_conj_float(z)    (conjf(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (cabsf(z))
        #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
    #if 1
        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
    #endif
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq_double(a, b)   ((a)==(b))
    #define __Pyx_c_sum_double(a, b)  ((a)+(b))
    #define __Pyx_c_diff_double(a, b) ((a)-(b))
    #define __Pyx_c_prod_double(a, b) ((a)*(b))
    #define __Pyx_c_quot_double(a, b) ((a)/(b))
    #define __Pyx_c_neg_double(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
    #define __Pyx_c_conj_double(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (::std::abs(z))
        #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_double(z) ((z)==0)
    #define __Pyx_c_conj_double(z)    (conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (cabs(z))
        #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
    #endif
#endif

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE unsigned short __Pyx_PyInt_As_unsigned_short(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg);

/* CoroutineBase.proto */
typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
typedef struct {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    PyObject *gi_modulename;
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
    PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *closure,
    PyObject *name, PyObject *qualname, PyObject *module_name);
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name);
static int __Pyx_Coroutine_clear(PyObject *self);
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Coroutine_Close(PyObject *self);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#define __Pyx_Coroutine_SwapException(self) {\
    __Pyx_ExceptionSwap(&(self)->exc_type, &(self)->exc_value, &(self)->exc_traceback);\
    __Pyx_Coroutine_ResetFrameBackpointer(self);\
    }
#define __Pyx_Coroutine_ResetAndClearException(self) {\
    __Pyx_ExceptionReset((self)->exc_type, (self)->exc_value, (self)->exc_traceback);\
    (self)->exc_type = (self)->exc_value = (self)->exc_traceback = NULL;\
    }
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
#endif
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self);

/* PatchModuleWithCoroutine.proto */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);

/* PatchGeneratorABC.proto */
static int __Pyx_patch_abc(void);

/* Generator.proto */
#define __Pyx_Generator_USED
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
#define __Pyx_Generator_New(body, closure, name, qualname, module_name)\
    __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname, module_name)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(void);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* PyIdentifierFromString.proto */
#if !defined(__Pyx_PyIdentifier_FromString)
#if PY_MAJOR_VERSION < 3
  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
#else
  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
#endif
#endif

/* ModuleImport.proto */
static PyObject *__Pyx_ImportModule(const char *name);

/* TypeImport.proto */
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);


/* Module declarations from 'libcpp' */

/* Module declarations from 'cpython.buffer' */

/* Module declarations from 'libc.string' */

/* Module declarations from 'libc.stdio' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.type' */
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;

/* Module declarations from 'cpython' */

/* Module declarations from 'cpython.object' */

/* Module declarations from 'cpython.ref' */

/* Module declarations from 'cpython.mem' */

/* Module declarations from 'numpy' */

/* Module declarations from 'numpy' */
static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/

/* Module declarations from 'cython' */

/* Module declarations from 'km3pipe.dataclasses' */
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses_Hit = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses_RawHit = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses_CRawHit = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses_TimesliceHit = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses_McHit = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses_Track = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses_McTrack = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct__from_row = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict = 0;
static PyTypeObject *__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr = 0;
#define __Pyx_MODULE_NAME "km3pipe.dataclasses"
extern int __pyx_module_is_main_km3pipe__dataclasses;
int __pyx_module_is_main_km3pipe__dataclasses = 0;

/* Implementation of 'km3pipe.dataclasses' */
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_property;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_StopIteration;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_max;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_ImportError;
static const char __pyx_k_E[] = "E";
static const char __pyx_k_a[] = "a";
static const char __pyx_k_h[] = "h";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_s[] = "s";
static const char __pyx_k_t[] = "t";
static const char __pyx_k_x[] = "x";
static const char __pyx_k_y[] = "y";
static const char __pyx_k_z[] = "z";
static const char __pyx_k__2[] = "/";
static const char __pyx_k_by[] = "by";
static const char __pyx_k_cc[] = "cc";
static const char __pyx_k_du[] = "du";
static const char __pyx_k_f4[] = "<f4";
static const char __pyx_k_f8[] = "<f8";
static const char __pyx_k_i4[] = "<i4";
static const char __pyx_k_id[] = "id";
static const char __pyx_k_mc[] = "mc";
static const char __pyx_k_np[] = "np";
static const char __pyx_k_pd[] = "pd";
static const char __pyx_k_t0[] = "t0";
static const char __pyx_k_to[] = "to";
static const char __pyx_k_u1[] = "u1";
static const char __pyx_k_u4[] = "<u4";
static const char __pyx_k_u8[] = "<u8";
static const char __pyx_k_Hit[] = "Hit";
static const char __pyx_k_MIT[] = "MIT";
static const char __pyx_k__88[] = "";
static const char __pyx_k__91[] = "\n";
static const char __pyx_k_all[] = "__all__";
static const char __pyx_k_arg[] = "arg";
static const char __pyx_k_arr[] = "_arr";
static const char __pyx_k_cls[] = "cls";
static const char __pyx_k_col[] = "col";
static const char __pyx_k_dir[] = "dir";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_dus[] = "dus";
static const char __pyx_k_fmt[] = "fmt";
static const char __pyx_k_hit[] = "hit";
static const char __pyx_k_ids[] = "ids";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_len[] = "len";
static const char __pyx_k_map[] = "map";
static const char __pyx_k_max[] = "max";
static const char __pyx_k_nan[] = "nan";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_out[] = "out";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_pos[] = "pos";
static const char __pyx_k_rfn[] = "rfn";
static const char __pyx_k_row[] = "row";
static const char __pyx_k_run[] = "run";
static const char __pyx_k_six[] = "six";
static const char __pyx_k_str[] = "__str__";
static const char __pyx_k_t0s[] = "t0s";
static const char __pyx_k_tot[] = "tot";
static const char __pyx_k_usr[] = "usr";
static const char __pyx_k_val[] = "val";
static const char __pyx_k_zip[] = "zip";
static const char __pyx_k_Hits[] = "Hits";
static const char __pyx_k__300[] = "\n...\n\n";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_attr[] = "attr";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_dict[] = "dict";
static const char __pyx_k_f4_2[] = "f4";
static const char __pyx_k_f8_2[] = "f8";
static const char __pyx_k_full[] = "full";
static const char __pyx_k_hits[] = "_hits";
static const char __pyx_k_id_2[] = "_id";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_insp[] = "__insp__";
static const char __pyx_k_item[] = "item";
static const char __pyx_k_iter[] = "__iter__";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_keys[] = "keys";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_math[] = "math";
static const char __pyx_k_mc_t[] = "mc_t";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_next[] = "__next__";
static const char __pyx_k_read[] = "read";
static const char __pyx_k_repr[] = "__repr__";
static const char __pyx_k_sefl[] = "sefl";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_send[] = "send";
static const char __pyx_k_size[] = "_size";
static const char __pyx_k_sqnr[] = "sqnr";
static const char __pyx_k_step[] = "step";
static const char __pyx_k_stop[] = "stop";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_tots[] = "tots";
static const char __pyx_k_trig[] = "trig";
static const char __pyx_k_type[] = "type";
static const char __pyx_k_view[] = "view";
static const char __pyx_k_IS_CC[] = "IS_CC";
static const char __pyx_k_McHit[] = "McHit";
static const char __pyx_k_Point[] = "Point";
static const char __pyx_k_Track[] = "Track";
static const char __pyx_k_arr_2[] = "arr";
static const char __pyx_k_array[] = "__array__";
static const char __pyx_k_class[] = "__class__";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_dir_2[] = "_dir";
static const char __pyx_k_dir_x[] = "dir_x";
static const char __pyx_k_dir_y[] = "dir_y";
static const char __pyx_k_dir_z[] = "dir_z";
static const char __pyx_k_dtype[] = "dtype";
static const char __pyx_k_email[] = "__email__";
static const char __pyx_k_empty[] = "empty";
static const char __pyx_k_floor[] = "floor";
static const char __pyx_k_h5loc[] = "h5loc";
static const char __pyx_k_ichan[] = "ichan";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_is_cc[] = "is_cc";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_km3df[] = "km3df";
static const char __pyx_k_len_2[] = "__len__";
static const char __pyx_k_mc_id[] = "mc_id";
static const char __pyx_k_muons[] = "muons";
static const char __pyx_k_names[] = "names";
static const char __pyx_k_new_2[] = "new";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_pos_2[] = "_pos";
static const char __pyx_k_pos_x[] = "pos_x";
static const char __pyx_k_pos_y[] = "pos_y";
static const char __pyx_k_pos_z[] = "pos_z";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_shape[] = "shape";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_table[] = "table";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_times[] = "times";
static const char __pyx_k_track[] = "track";
static const char __pyx_k_types[] = "types";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_McHits[] = "McHits";
static const char __pyx_k_Struct[] = "Struct";
static const char __pyx_k_Tracks[] = "Tracks";
static const char __pyx_k_author[] = "__author__";
static const char __pyx_k_ctypes[] = "ctypes";
static const char __pyx_k_det_id[] = "det_id";
static const char __pyx_k_dir_xs[] = "dir_xs";
static const char __pyx_k_dir_ys[] = "dir_ys";
static const char __pyx_k_dir_zs[] = "dir_zs";
static const char __pyx_k_dom_id[] = "dom_id";
static const char __pyx_k_energy[] = "energy";
static const char __pyx_k_fields[] = "fields";
static const char __pyx_k_floors[] = "floors";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_frames[] = "_frames";
static const char __pyx_k_getusr[] = "getusr";
static const char __pyx_k_hits_2[] = "hits";
static const char __pyx_k_hits_3[] = "/hits";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_is_ccs[] = "is_ccs";
static const char __pyx_k_kwargs[] = "kwargs";
static const char __pyx_k_length[] = "length";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_n_hits[] = "n_hits";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_next_2[] = "next";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_origin[] = "origin";
static const char __pyx_k_pandas[] = "pandas";
static const char __pyx_k_plural[] = "plural";
static const char __pyx_k_pmt_id[] = "pmt_id";
static const char __pyx_k_pos_xs[] = "pos_xs";
static const char __pyx_k_pos_ys[] = "pos_ys";
static const char __pyx_k_pos_zs[] = "pos_zs";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_run_id[] = "run_id";
static const char __pyx_k_setter[] = "setter";
static const char __pyx_k_sorted[] = "sorted";
static const char __pyx_k_status[] = "__status__";
static const char __pyx_k_stream[] = "stream";
static const char __pyx_k_struct[] = "struct";
static const char __pyx_k_subset[] = "subset";
static const char __pyx_k_time_2[] = "_time";
static const char __pyx_k_tracks[] = "tracks";
static const char __pyx_k_type_2[] = "_type";
static const char __pyx_k_values[] = "values";
static const char __pyx_k_McTrack[] = "McTrack";
static const char __pyx_k_Point_x[] = "Point.x";
static const char __pyx_k_Point_y[] = "Point.y";
static const char __pyx_k_Point_z[] = "Point.z";
static const char __pyx_k_RawHits[] = "RawHits";
static const char __pyx_k_argsort[] = "argsort";
static const char __pyx_k_array_2[] = "array";
static const char __pyx_k_asarray[] = "asarray";
static const char __pyx_k_conv_to[] = "conv_to";
static const char __pyx_k_credits[] = "__credits__";
static const char __pyx_k_data_id[] = "data_id";
static const char __pyx_k_dom_ids[] = "dom_ids";
static const char __pyx_k_genexpr[] = "genexpr";
static const char __pyx_k_get_len[] = "get_len";
static const char __pyx_k_getattr[] = "__getattr__";
static const char __pyx_k_getitem[] = "__getitem__";
static const char __pyx_k_index_2[] = "_index";
static const char __pyx_k_indices[] = "indices";
static const char __pyx_k_inplace[] = "inplace";
static const char __pyx_k_is_cc_2[] = "_is_cc";
static const char __pyx_k_lengths[] = "lengths";
static const char __pyx_k_license[] = "__license__";
static const char __pyx_k_mc_hits[] = "/mc_hits";
static const char __pyx_k_new_arr[] = "new_arr";
static const char __pyx_k_pmt_ids[] = "pmt_ids";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_reshape[] = "reshape";
static const char __pyx_k_tabname[] = "tabname";
static const char __pyx_k_usemask[] = "usemask";
static const char __pyx_k_AttrVoid[] = "AttrVoid";
static const char __pyx_k_KM3Array[] = "KM3Array";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_McTracks[] = "McTracks";
static const char __pyx_k_Position[] = "Position";
static const char __pyx_k_bjorkeny[] = "bjorkeny";
static const char __pyx_k_calcsize[] = "calcsize";
static const char __pyx_k_energies[] = "energies";
static const char __pyx_k_energy_2[] = "_energy";
static const char __pyx_k_event_id[] = "event_id";
static const char __pyx_k_fields_2[] = "_fields";
static const char __pyx_k_frame__0[] = "frame_{0}";
static const char __pyx_k_frame_id[] = "frame_id";
static const char __pyx_k_frames_2[] = "frames";
static const char __pyx_k_from_evt[] = "from_evt";
static const char __pyx_k_from_row[] = "from_row";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_length_2[] = "_length";
static const char __pyx_k_metadata[] = "_metadata";
static const char __pyx_k_n_frames[] = "n_frames";
static const char __pyx_k_n_tracks[] = "n_tracks";
static const char __pyx_k_name_len[] = "name_len";
static const char __pyx_k_overlays[] = "overlays";
static const char __pyx_k_pdg2name[] = "pdg2name";
static const char __pyx_k_property[] = "property";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_raw_hits[] = "/raw_hits";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_slice_id[] = "slice_id";
static const char __pyx_k_sort_idc[] = "sort_idc";
static const char __pyx_k_tracks_2[] = "_tracks";
static const char __pyx_k_tracks_3[] = "/tracks";
static const char __pyx_k_DTypeAttr[] = "DTypeAttr";
static const char __pyx_k_DataFrame[] = "DataFrame";
static const char __pyx_k_Direction[] = "Direction";
static const char __pyx_k_EventInfo[] = "EventInfo";
static const char __pyx_k_HitSeries[] = "HitSeries";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_bjorkenys[] = "bjorkenys";
static const char __pyx_k_conv_from[] = "conv_from";
static const char __pyx_k_copyright[] = "__copyright__";
static const char __pyx_k_from_dict[] = "from_dict";
static const char __pyx_k_geant2pdg[] = "geant2pdg";
static const char __pyx_k_iteritems[] = "iteritems";
static const char __pyx_k_metaclass[] = "metaclass";
static const char __pyx_k_n_packets[] = "n_packets";
static const char __pyx_k_numpy_lib[] = "numpy.lib";
static const char __pyx_k_positions[] = "positions";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_serialise[] = "serialise";
static const char __pyx_k_structure[] = "_structure";
static const char __pyx_k_timestamp[] = "timestamp";
static const char __pyx_k_triggered[] = "triggered";
static const char __pyx_k_usr_names[] = "usr_names";
static const char __pyx_k_weight_w1[] = "weight_w1";
static const char __pyx_k_weight_w2[] = "weight_w2";
static const char __pyx_k_weight_w3[] = "weight_w3";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_bjorkeny_2[] = "_bjorkeny";
static const char __pyx_k_channel_id[] = "channel_id";
static const char __pyx_k_class_attr[] = "class_attr";
static const char __pyx_k_class_name[] = "class_name";
static const char __pyx_k_directions[] = "directions";
static const char __pyx_k_dom_status[] = "dom_status";
static const char __pyx_k_event_info[] = "/event_info";
static const char __pyx_k_first_hits[] = "first_hits";
static const char __pyx_k_from_aanet[] = "from_aanet";
static const char __pyx_k_from_km3df[] = "from_km3df";
static const char __pyx_k_from_table[] = "from_table";
static const char __pyx_k_maintainer[] = "__maintainer__";
static const char __pyx_k_namedtuple[] = "namedtuple";
static const char __pyx_k_to_records[] = "to_records";
static const char __pyx_k_track_args[] = "track_args";
static const char __pyx_k_triggereds[] = "triggereds";
static const char __pyx_k_Convertible[] = "Convertible";
static const char __pyx_k_Development[] = "Development";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_McHitSeries[] = "McHitSeries";
static const char __pyx_k_Point___new[] = "Point.__new__";
static const char __pyx_k_TrackSeries[] = "TrackSeries";
static const char __pyx_k_channel_ids[] = "channel_ids";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_constructor[] = "_constructor";
static const char __pyx_k_deserialise[] = "deserialise";
static const char __pyx_k_fifo_status[] = "fifo_status";
static const char __pyx_k_frame_index[] = "frame_index";
static const char __pyx_k_from_arrays[] = "from_arrays";
static const char __pyx_k_input_array[] = "input_array";
static const char __pyx_k_metaclass_2[] = "__metaclass__";
static const char __pyx_k_n_files_gen[] = "n_files_gen";
static const char __pyx_k_nanoseconds[] = "nanoseconds";
static const char __pyx_k_positions_x[] = "positions_x";
static const char __pyx_k_positions_y[] = "positions_y";
static const char __pyx_k_positions_z[] = "positions_z";
static const char __pyx_k_sort_values[] = "sort_values";
static const char __pyx_k_unpack_from[] = "unpack_from";
static const char __pyx_k_utc_seconds[] = "utc_seconds";
static const char __pyx_k_BinaryStruct[] = "BinaryStruct";
static const char __pyx_k_CMcHitSeries[] = "CMcHitSeries";
static const char __pyx_k_KM3DataFrame[] = "KM3DataFrame";
static const char __pyx_k_RawHitSeries[] = "RawHitSeries";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_Serialisable[] = "Serialisable";
static const char __pyx_k_column_stack[] = "column_stack";
static const char __pyx_k_directions_x[] = "directions_x";
static const char __pyx_k_directions_y[] = "directions_y";
static const char __pyx_k_directions_z[] = "directions_z";
static const char __pyx_k_get_usr_item[] = "get_usr_item";
static const char __pyx_k_get_usr_name[] = "get_usr_name";
static const char __pyx_k_livetime_sec[] = "livetime_sec";
static const char __pyx_k_n_events_gen[] = "n_events_gen";
static const char __pyx_k_recfunctions[] = "recfunctions";
static const char __pyx_k_trigger_mask[] = "trigger_mask";
static const char __pyx_k_CRawHitSeries[] = "CRawHitSeries";
static const char __pyx_k_McTrackSeries[] = "McTrackSeries";
static const char __pyx_k_No_muon_found[] = "No muon found";
static const char __pyx_k_StopIteration[] = "StopIteration";
static const char __pyx_k_TimesliceHits[] = "TimesliceHits";
static const char __pyx_k_TimesliceInfo[] = "TimesliceInfo";
static const char __pyx_k_angle_between[] = "angle_between";
static const char __pyx_k_append_fields[] = "append_fields";
static const char __pyx_k_class_parents[] = "class_parents";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_summary_slice[] = "/summary_slice";
static const char __pyx_k_AttrVoid___new[] = "AttrVoid.__new__";
static const char __pyx_k_AttributeError[] = "AttributeError";
static const char __pyx_k_Event_Metadata[] = "Event Metadata.\n    ";
static const char __pyx_k_HitSeries_next[] = "HitSeries.next";
static const char __pyx_k_KM3Array___new[] = "KM3Array.__new__";
static const char __pyx_k_TrackSeries_id[] = "TrackSeries.id";
static const char __pyx_k_array_finalize[] = "__array_finalize__";
static const char __pyx_k_high_rate_veto[] = "high_rate_veto";
static const char __pyx_k_tgal_km3net_de[] = "tgal@km3net.de";
static const char __pyx_k_triggered_hits[] = "triggered_hits";
static const char __pyx_k_with_metaclass[] = "with_metaclass";
static const char __pyx_k_BinaryComposite[] = "BinaryComposite";
static const char __pyx_k_EventInfo___len[] = "EventInfo.__len__";
static const char __pyx_k_EventInfo___str[] = "EventInfo.__str__";
static const char __pyx_k_HitSeries___len[] = "HitSeries.__len__";
static const char __pyx_k_HitSeries___str[] = "HitSeries.__str__";
static const char __pyx_k_KM3Array___init[] = "KM3Array.__init__";
static const char __pyx_k_TrackSeries_dir[] = "TrackSeries.dir";
static const char __pyx_k_TrackSeries_pos[] = "TrackSeries.pos";
static const char __pyx_k_deserialise_map[] = "deserialise_map";
static const char __pyx_k_drop_duplicates[] = "drop_duplicates";
static const char __pyx_k_has_udp_trailer[] = "has_udp_trailer";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_slice_generator[] = "_slice_generator";
static const char __pyx_k_time_slice_hits[] = "/time_slice_hits";
static const char __pyx_k_trigger_counter[] = "trigger_counter";
static const char __pyx_k_utc_nanoseconds[] = "utc_nanoseconds";
static const char __pyx_k_DTypeAttr_sorted[] = "DTypeAttr.sorted";
static const char __pyx_k_EventInfo___init[] = "EventInfo.__init__";
static const char __pyx_k_EventInfo___insp[] = "EventInfo.__insp__";
static const char __pyx_k_EventInfo___repr[] = "EventInfo.__repr__";
static const char __pyx_k_HitSeries___init[] = "HitSeries.__init__";
static const char __pyx_k_HitSeries___insp[] = "HitSeries.__insp__";
static const char __pyx_k_HitSeries___iter[] = "HitSeries.__iter__";
static const char __pyx_k_HitSeries___next[] = "HitSeries.__next__";
static const char __pyx_k_HitSeries___repr[] = "HitSeries.__repr__";
static const char __pyx_k_KM3Array_conv_to[] = "KM3Array.conv_to";
static const char __pyx_k_McHitSeries_next[] = "McHitSeries.next";
static const char __pyx_k_McTrackSeries_id[] = "McTrackSeries.id";
static const char __pyx_k_SummaryframeInfo[] = "SummaryframeInfo";
static const char __pyx_k_SummarysliceInfo[] = "SummarysliceInfo";
static const char __pyx_k_TrackSeries_next[] = "TrackSeries.next";
static const char __pyx_k_TrackSeries_time[] = "TrackSeries.time";
static const char __pyx_k_TrackSeries_type[] = "TrackSeries.type";
static const char __pyx_k_DTypeAttr___array[] = "DTypeAttr.__array__";
static const char __pyx_k_EventInfo___array[] = "EventInfo.__array__";
static const char __pyx_k_EventInfo_conv_to[] = "EventInfo.conv_to";
static const char __pyx_k_HitSeries___array[] = "HitSeries.__array__";
static const char __pyx_k_HitSeries_conv_to[] = "HitSeries.conv_to";
static const char __pyx_k_McHitSeries___len[] = "McHitSeries.__len__";
static const char __pyx_k_McHitSeries___str[] = "McHitSeries.__str__";
static const char __pyx_k_McTrackSeries_dir[] = "McTrackSeries.dir";
static const char __pyx_k_McTrackSeries_pos[] = "McTrackSeries.pos";
static const char __pyx_k_RawHitSeries_next[] = "RawHitSeries.next";
static const char __pyx_k_TrackSeries___len[] = "TrackSeries.__len__";
static const char __pyx_k_TrackSeries___str[] = "TrackSeries.__str__";
static const char __pyx_k_TrackSeries_is_cc[] = "TrackSeries.is_cc";
static const char __pyx_k_BinaryStruct__size[] = "BinaryStruct._size";
static const char __pyx_k_CMcHitSeries___len[] = "CMcHitSeries.__len__";
static const char __pyx_k_CMcHitSeries___str[] = "CMcHitSeries.__str__";
static const char __pyx_k_CRawHitSeries_next[] = "CRawHitSeries.next";
static const char __pyx_k_EventInfo_from_row[] = "EventInfo.from_row";
static const char __pyx_k_HitSeries_from_evt[] = "HitSeries.from_evt";
static const char __pyx_k_KM3Array_conv_from[] = "KM3Array.conv_from";
static const char __pyx_k_KM3Array_from_dict[] = "KM3Array.from_dict";
static const char __pyx_k_KM3Array_serialise[] = "KM3Array.serialise";
static const char __pyx_k_McHitSeries___init[] = "McHitSeries.__init__";
static const char __pyx_k_McHitSeries___insp[] = "McHitSeries.__insp__";
static const char __pyx_k_McHitSeries___iter[] = "McHitSeries.__iter__";
static const char __pyx_k_McHitSeries___next[] = "McHitSeries.__next__";
static const char __pyx_k_McHitSeries___repr[] = "McHitSeries.__repr__";
static const char __pyx_k_McTrackSeries_next[] = "McTrackSeries.next";
static const char __pyx_k_McTrackSeries_time[] = "McTrackSeries.time";
static const char __pyx_k_McTrackSeries_type[] = "McTrackSeries.type";
static const char __pyx_k_RawHitSeries___len[] = "RawHitSeries.__len__";
static const char __pyx_k_RawHitSeries___str[] = "RawHitSeries.__str__";
static const char __pyx_k_Serialisable___new[] = "Serialisable.__new__";
static const char __pyx_k_SummaryframeSeries[] = "SummaryframeSeries";
static const char __pyx_k_TimesliceFrameInfo[] = "TimesliceFrameInfo";
static const char __pyx_k_TimesliceHitSeries[] = "TimesliceHitSeries";
static const char __pyx_k_TrackSeries___init[] = "TrackSeries.__init__";
static const char __pyx_k_TrackSeries___insp[] = "TrackSeries.__insp__";
static const char __pyx_k_TrackSeries___iter[] = "TrackSeries.__iter__";
static const char __pyx_k_TrackSeries___next[] = "TrackSeries.__next__";
static const char __pyx_k_TrackSeries___repr[] = "TrackSeries.__repr__";
static const char __pyx_k_TrackSeries_energy[] = "TrackSeries.energy";
static const char __pyx_k_TrackSeries_length[] = "TrackSeries.length";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_n_received_packets[] = "n_received_packets";
static const char __pyx_k_summary_slice_info[] = "/summary_slice_info";
static const char __pyx_k_BinaryStruct___init[] = "BinaryStruct.__init__";
static const char __pyx_k_CMcHitSeries___init[] = "CMcHitSeries.__init__";
static const char __pyx_k_CMcHitSeries___repr[] = "CMcHitSeries.__repr__";
static const char __pyx_k_CRawHitSeries___len[] = "CRawHitSeries.__len__";
static const char __pyx_k_CRawHitSeries___str[] = "CRawHitSeries.__str__";
static const char __pyx_k_Convertible_conv_to[] = "Convertible.conv_to";
static const char __pyx_k_DTypeAttr___getattr[] = "DTypeAttr.__getattr__";
static const char __pyx_k_DTypeAttr___getitem[] = "DTypeAttr.__getitem__";
static const char __pyx_k_EventInfo_conv_from[] = "EventInfo.conv_from";
static const char __pyx_k_EventInfo_serialise[] = "EventInfo.serialise";
static const char __pyx_k_HitSeries___getitem[] = "HitSeries.__getitem__";
static const char __pyx_k_HitSeries_conv_from[] = "HitSeries.conv_from";
static const char __pyx_k_HitSeries_from_dict[] = "HitSeries.from_dict";
static const char __pyx_k_HitSeries_serialise[] = "HitSeries.serialise";
static const char __pyx_k_KM3DataFrame___init[] = "KM3DataFrame.__init__";
static const char __pyx_k_McHitSeries___array[] = "McHitSeries.__array__";
static const char __pyx_k_McHitSeries_conv_to[] = "McHitSeries.conv_to";
static const char __pyx_k_McTrackSeries___len[] = "McTrackSeries.__len__";
static const char __pyx_k_McTrackSeries___str[] = "McTrackSeries.__str__";
static const char __pyx_k_McTrackSeries_is_cc[] = "McTrackSeries.is_cc";
static const char __pyx_k_RawHitSeries___init[] = "RawHitSeries.__init__";
static const char __pyx_k_RawHitSeries___insp[] = "RawHitSeries.__insp__";
static const char __pyx_k_RawHitSeries___iter[] = "RawHitSeries.__iter__";
static const char __pyx_k_RawHitSeries___next[] = "RawHitSeries.__next__";
static const char __pyx_k_RawHitSeries___repr[] = "RawHitSeries.__repr__";
static const char __pyx_k_TrackSeries___array[] = "TrackSeries.__array__";
static const char __pyx_k_TrackSeries_conv_to[] = "TrackSeries.conv_to";
static const char __pyx_k_TrackSeries_get_len[] = "TrackSeries.get_len";
static const char __pyx_k_interaction_channel[] = "interaction_channel";
static const char __pyx_k_km3pipe_dataclasses[] = "km3pipe.dataclasses";
static const char __pyx_k_max_sequence_number[] = "max_sequence_number";
static const char __pyx_k_timeslices_slice__0[] = "/timeslices/slice_{0}";
static const char __pyx_k_white_rabbit_status[] = "white_rabbit_status";
static const char __pyx_k_CMcHitSeries___array[] = "CMcHitSeries.__array__";
static const char __pyx_k_CMcHitSeries_conv_to[] = "CMcHitSeries.conv_to";
static const char __pyx_k_CRawHitSeries___init[] = "CRawHitSeries.__init__";
static const char __pyx_k_CRawHitSeries___iter[] = "CRawHitSeries.__iter__";
static const char __pyx_k_CRawHitSeries___next[] = "CRawHitSeries.__next__";
static const char __pyx_k_CRawHitSeries___repr[] = "CRawHitSeries.__repr__";
static const char __pyx_k_HitSeries_first_hits[] = "HitSeries.first_hits";
static const char __pyx_k_HitSeries_from_aanet[] = "HitSeries.from_aanet";
static const char __pyx_k_HitSeries_from_table[] = "HitSeries.from_table";
static const char __pyx_k_KM3Array_deserialise[] = "KM3Array.deserialise";
static const char __pyx_k_KM3DataFrame_conv_to[] = "KM3DataFrame.conv_to";
static const char __pyx_k_McHitSeries_from_evt[] = "McHitSeries.from_evt";
static const char __pyx_k_McTrackSeries___init[] = "McTrackSeries.__init__";
static const char __pyx_k_McTrackSeries___insp[] = "McTrackSeries.__insp__";
static const char __pyx_k_McTrackSeries___iter[] = "McTrackSeries.__iter__";
static const char __pyx_k_McTrackSeries___next[] = "McTrackSeries.__next__";
static const char __pyx_k_McTrackSeries___repr[] = "McTrackSeries.__repr__";
static const char __pyx_k_McTrackSeries_energy[] = "McTrackSeries.energy";
static const char __pyx_k_McTrackSeries_length[] = "McTrackSeries.length";
static const char __pyx_k_RawHitSeries___array[] = "RawHitSeries.__array__";
static const char __pyx_k_RawHitSeries_conv_to[] = "RawHitSeries.conv_to";
static const char __pyx_k_TimesliceFrameInfo_2[] = "TimesliceFrameInfo_";
static const char __pyx_k_TrackSeries_bjorkeny[] = "TrackSeries.bjorkeny";
static const char __pyx_k_interaction_channels[] = "interaction_channels";
static const char __pyx_k_max_sequence_numbers[] = "max_sequence_numbers";
static const char __pyx_k_summary_frame_series[] = "/summary_frame_series";
static const char __pyx_k_CRawHitSeries___array[] = "CRawHitSeries.__array__";
static const char __pyx_k_CRawHitSeries_conv_to[] = "CRawHitSeries.conv_to";
static const char __pyx_k_Convertible_conv_from[] = "Convertible.conv_from";
static const char __pyx_k_Convertible_serialise[] = "Convertible.serialise";
static const char __pyx_k_EventInfo_deserialise[] = "EventInfo.deserialise";
static const char __pyx_k_HitSeries_deserialise[] = "HitSeries.deserialise";
static const char __pyx_k_HitSeries_from_arrays[] = "HitSeries.from_arrays";
static const char __pyx_k_McHitSeries___getitem[] = "McHitSeries.__getitem__";
static const char __pyx_k_McHitSeries_conv_from[] = "McHitSeries.conv_from";
static const char __pyx_k_McHitSeries_from_dict[] = "McHitSeries.from_dict";
static const char __pyx_k_McHitSeries_serialise[] = "McHitSeries.serialise";
static const char __pyx_k_McTrackSeries___array[] = "McTrackSeries.__array__";
static const char __pyx_k_McTrackSeries_conv_to[] = "McTrackSeries.conv_to";
static const char __pyx_k_McTrackSeries_get_len[] = "McTrackSeries.get_len";
static const char __pyx_k_TrackSeries___getitem[] = "TrackSeries.__getitem__";
static const char __pyx_k_TrackSeries_conv_from[] = "TrackSeries.conv_from";
static const char __pyx_k_TrackSeries_serialise[] = "TrackSeries.serialise";
static const char __pyx_k_interaction_channel_2[] = "_interaction_channel";
static const char __pyx_k_time_slice_frame_info[] = "/time_slice_frame_info";
static const char __pyx_k_BinaryComposite___init[] = "BinaryComposite.__init__";
static const char __pyx_k_CMcHitSeries_conv_from[] = "CMcHitSeries.conv_from";
static const char __pyx_k_CMcHitSeries_serialise[] = "CMcHitSeries.serialise";
static const char __pyx_k_HitSeries_with_0_hit_1[] = "HitSeries with {0} hit{1}.";
static const char __pyx_k_KM3DataFrame_conv_from[] = "KM3DataFrame.conv_from";
static const char __pyx_k_KM3DataFrame_serialise[] = "KM3DataFrame.serialise";
static const char __pyx_k_McHitSeries_from_aanet[] = "McHitSeries.from_aanet";
static const char __pyx_k_McHitSeries_from_table[] = "McHitSeries.from_table";
static const char __pyx_k_McTrackSeries_bjorkeny[] = "McTrackSeries.bjorkeny";
static const char __pyx_k_RawHitSeries___getitem[] = "RawHitSeries.__getitem__";
static const char __pyx_k_RawHitSeries_conv_from[] = "RawHitSeries.conv_from";
static const char __pyx_k_RawHitSeries_serialise[] = "RawHitSeries.serialise";
static const char __pyx_k_SummaryframeInfo___len[] = "SummaryframeInfo.__len__";
static const char __pyx_k_SummaryframeInfo___str[] = "SummaryframeInfo.__str__";
static const char __pyx_k_SummarysliceInfo___len[] = "SummarysliceInfo.__len__";
static const char __pyx_k_SummarysliceInfo___str[] = "SummarysliceInfo.__str__";
static const char __pyx_k_TrackSeries_from_aanet[] = "TrackSeries.from_aanet";
static const char __pyx_k_TrackSeries_from_km3df[] = "TrackSeries.from_km3df";
static const char __pyx_k_TrackSeries_from_table[] = "TrackSeries.from_table";
static const char __pyx_k_highest_energetic_muon[] = "_highest_energetic_muon";
static const char __pyx_k_write_separate_columns[] = "write_separate_columns";
static const char __pyx_k_CRawHitSeries___getitem[] = "CRawHitSeries.__getitem__";
static const char __pyx_k_CRawHitSeries_conv_from[] = "CRawHitSeries.conv_from";
static const char __pyx_k_CRawHitSeries_serialise[] = "CRawHitSeries.serialise";
static const char __pyx_k_Convertible_deserialise[] = "Convertible.deserialise";
static const char __pyx_k_DTypeAttr_append_fields[] = "DTypeAttr.append_fields";
static const char __pyx_k_McHitSeries_deserialise[] = "McHitSeries.deserialise";
static const char __pyx_k_McHitSeries_from_arrays[] = "McHitSeries.from_arrays";
static const char __pyx_k_McTrackSeries___getitem[] = "McTrackSeries.__getitem__";
static const char __pyx_k_McTrackSeries_conv_from[] = "McTrackSeries.conv_from";
static const char __pyx_k_McTrackSeries_serialise[] = "McTrackSeries.serialise";
static const char __pyx_k_RawHitSeries_from_aanet[] = "RawHitSeries.from_aanet";
static const char __pyx_k_SummaryframeInfo___insp[] = "SummaryframeInfo.__insp__";
static const char __pyx_k_SummaryframeSeries_next[] = "SummaryframeSeries.next";
static const char __pyx_k_SummarysliceInfo___insp[] = "SummarysliceInfo.__insp__";
static const char __pyx_k_TimesliceHitSeries_next[] = "TimesliceHitSeries.next";
static const char __pyx_k_TrackSeries_deserialise[] = "TrackSeries.deserialise";
static const char __pyx_k_TrackSeries_from_arrays[] = "TrackSeries.from_arrays";
static const char __pyx_k_km3pipe_dataclasses_pyx[] = "km3pipe/dataclasses.pyx";
static const char __pyx_k_CMcHitSeries_deserialise[] = "CMcHitSeries.deserialise";
static const char __pyx_k_CMcHitSeries_from_arrays[] = "CMcHitSeries.from_arrays";
static const char __pyx_k_HitSeries_triggered_hits[] = "HitSeries.triggered_hits";
static const char __pyx_k_KM3DataFrame_deserialise[] = "KM3DataFrame.deserialise";
static const char __pyx_k_McHitSeries_with_0_hit_1[] = "McHitSeries with {0} hit{1}.";
static const char __pyx_k_McTrackSeries_from_aanet[] = "McTrackSeries.from_aanet";
static const char __pyx_k_McTrackSeries_from_km3df[] = "McTrackSeries.from_km3df";
static const char __pyx_k_McTrackSeries_from_table[] = "McTrackSeries.from_table";
static const char __pyx_k_RawHitSeries_deserialise[] = "RawHitSeries.deserialise";
static const char __pyx_k_RawHitSeries_from_arrays[] = "RawHitSeries.from_arrays";
static const char __pyx_k_SummaryframeInfo___array[] = "SummaryframeInfo.__array__";
static const char __pyx_k_SummaryframeInfo_conv_to[] = "SummaryframeInfo.conv_to";
static const char __pyx_k_SummaryframeSeries___len[] = "SummaryframeSeries.__len__";
static const char __pyx_k_SummarysliceInfo___array[] = "SummarysliceInfo.__array__";
static const char __pyx_k_SummarysliceInfo_conv_to[] = "SummarysliceInfo.conv_to";
static const char __pyx_k_TimesliceHitSeries___len[] = "TimesliceHitSeries.__len__";
static const char __pyx_k_TimesliceHitSeries___str[] = "TimesliceHitSeries.__str__";
static const char __pyx_k_TimesliceHitSeries_h5loc[] = "TimesliceHitSeries.h5loc";
static const char __pyx_k_TrackSeries_get_usr_item[] = "TrackSeries.get_usr_item";
static const char __pyx_k_TrackSeries_get_usr_name[] = "TrackSeries.get_usr_name";
static const char __pyx_k_highest_energetic_muon_2[] = "highest_energetic_muon";
static const char __pyx_k_CMcHitSeries_with_0_hit_1[] = "CMcHitSeries with {0} hit{1}.";
static const char __pyx_k_CRawHitSeries_deserialise[] = "CRawHitSeries.deserialise";
static const char __pyx_k_CRawHitSeries_from_arrays[] = "CRawHitSeries.from_arrays";
static const char __pyx_k_JDAQSummaryslice_Metadata[] = "JDAQSummaryslice Metadata.\n    ";
static const char __pyx_k_KM3Array___array_finalize[] = "KM3Array.__array_finalize__";
static const char __pyx_k_KM3DataFrame__constructor[] = "KM3DataFrame._constructor";
static const char __pyx_k_McTrackSeries_deserialise[] = "McTrackSeries.deserialise";
static const char __pyx_k_McTrackSeries_from_arrays[] = "McTrackSeries.from_arrays";
static const char __pyx_k_RawHitSeries_with_0_hit_1[] = "RawHitSeries with {0} hit{1}.";
static const char __pyx_k_SummaryframeSeries___init[] = "SummaryframeSeries.__init__";
static const char __pyx_k_SummaryframeSeries___iter[] = "SummaryframeSeries.__iter__";
static const char __pyx_k_SummaryframeSeries___next[] = "SummaryframeSeries.__next__";
static const char __pyx_k_TimesliceFrameInfo____len[] = "TimesliceFrameInfo_.__len__";
static const char __pyx_k_TimesliceFrameInfo____str[] = "TimesliceFrameInfo_.__str__";
static const char __pyx_k_TimesliceHitSeries___init[] = "TimesliceHitSeries.__init__";
static const char __pyx_k_TimesliceHitSeries___insp[] = "TimesliceHitSeries.__insp__";
static const char __pyx_k_TimesliceHitSeries___iter[] = "TimesliceHitSeries.__iter__";
static const char __pyx_k_TimesliceHitSeries___next[] = "TimesliceHitSeries.__next__";
static const char __pyx_k_TimesliceHitSeries___repr[] = "TimesliceHitSeries.__repr__";
static const char __pyx_k_CRawHitSeries_with_0_hit_1[] = "CRawHitSeries with {0} hit{1}.";
static const char __pyx_k_McTrackSeries_get_usr_item[] = "McTrackSeries.get_usr_item";
static const char __pyx_k_McTrackSeries_get_usr_name[] = "McTrackSeries.get_usr_name";
static const char __pyx_k_SummaryframeInfo_conv_from[] = "SummaryframeInfo.conv_from";
static const char __pyx_k_SummaryframeInfo_serialise[] = "SummaryframeInfo.serialise";
static const char __pyx_k_SummaryframeSeries___array[] = "SummaryframeSeries.__array__";
static const char __pyx_k_SummaryframeSeries_conv_to[] = "SummaryframeSeries.conv_to";
static const char __pyx_k_SummaryframeSeries_dom_ids[] = "SummaryframeSeries.dom_ids";
static const char __pyx_k_SummarysliceInfo_conv_from[] = "SummarysliceInfo.conv_from";
static const char __pyx_k_SummarysliceInfo_serialise[] = "SummarysliceInfo.serialise";
static const char __pyx_k_Tamas_Gal_and_Moritz_Lotze[] = "Tamas Gal and Moritz Lotze";
static const char __pyx_k_TimesliceFrameInfo____insp[] = "TimesliceFrameInfo_.__insp__";
static const char __pyx_k_TimesliceHitSeries___array[] = "TimesliceHitSeries.__array__";
static const char __pyx_k_TimesliceHitSeries_conv_to[] = "TimesliceHitSeries.conv_to";
static const char __pyx_k_TimesliceHitSeries_tabname[] = "TimesliceHitSeries.tabname";
static const char __pyx_k_TrackSeries_with_0_track_1[] = "TrackSeries with {0} track{1}.";
static const char __pyx_k_index_must_be_int_or_slice[] = "index must be int or slice";
static const char __pyx_k_Collection_of_multiple_Hits[] = "Collection of multiple Hits.\n    ";
static const char __pyx_k_RawHitSeries_triggered_hits[] = "RawHitSeries.triggered_hits";
static const char __pyx_k_SummaryframeInfo_from_table[] = "SummaryframeInfo.from_table";
static const char __pyx_k_SummarysliceInfo_from_table[] = "SummarysliceInfo.from_table";
static const char __pyx_k_TimesliceFrameInfo____array[] = "TimesliceFrameInfo_.__array__";
static const char __pyx_k_TimesliceFrameInfo__conv_to[] = "TimesliceFrameInfo_.conv_to";
static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
static const char __pyx_k_CRawHitSeries_triggered_hits[] = "CRawHitSeries.triggered_hits";
static const char __pyx_k_Collection_of_summary_frames[] = "Collection of summary frames.\n    ";
static const char __pyx_k_JDAQTimeslice_frame_metadata[] = "JDAQTimeslice frame metadata.\n    ";
static const char __pyx_k_McTrackSeries_with_0_track_1[] = "McTrackSeries with {0} track{1}.";
static const char __pyx_k_SummaryframeInfo_deserialise[] = "SummaryframeInfo.deserialise";
static const char __pyx_k_SummaryframeSeries___getitem[] = "SummaryframeSeries.__getitem__";
static const char __pyx_k_SummaryframeSeries_conv_from[] = "SummaryframeSeries.conv_from";
static const char __pyx_k_SummaryframeSeries_serialise[] = "SummaryframeSeries.serialise";
static const char __pyx_k_SummarysliceInfo_deserialise[] = "SummarysliceInfo.deserialise";
static const char __pyx_k_TimesliceHitSeries___getitem[] = "TimesliceHitSeries.__getitem__";
static const char __pyx_k_TimesliceHitSeries_conv_from[] = "TimesliceHitSeries.conv_from";
static const char __pyx_k_TimesliceHitSeries_from_dict[] = "TimesliceHitSeries.from_dict";
static const char __pyx_k_TimesliceHitSeries_serialise[] = "TimesliceHitSeries.serialise";
static const char __pyx_k_TrackSeries__slice_generator[] = "TrackSeries._slice_generator";
static const char __pyx_k_SummaryframeSeries_from_table[] = "SummaryframeSeries.from_table";
static const char __pyx_k_TimesliceFrameInfo__conv_from[] = "TimesliceFrameInfo_.conv_from";
static const char __pyx_k_TimesliceFrameInfo__serialise[] = "TimesliceFrameInfo_.serialise";
static const char __pyx_k_TimesliceHitSeries_from_table[] = "TimesliceHitSeries.from_table";
static const char __pyx_k_A_composition_of_BinaryStructs[] = "A composition of BinaryStructs.";
static const char __pyx_k_McTrackSeries__slice_generator[] = "McTrackSeries._slice_generator";
static const char __pyx_k_SummaryframeSeries_deserialise[] = "SummaryframeSeries.deserialise";
static const char __pyx_k_SummaryframeSeries_from_arrays[] = "SummaryframeSeries.from_arrays";
static const char __pyx_k_TimesliceFrameInfo__from_table[] = "TimesliceFrameInfo_.from_table";
static const char __pyx_k_TimesliceHitSeries_deserialise[] = "TimesliceHitSeries.deserialise";
static const char __pyx_k_TimesliceHitSeries_from_arrays[] = "TimesliceHitSeries.from_arrays";
static const char __pyx_k_A_collection_of_calibrated_hits[] = "A collection of calibrated hits.";
static const char __pyx_k_Collection_of_multiple_McTracks[] = "Collection of multiple McTracks.\n\n    Attributes\n    ----------\n    dtype: datatype of array representation\n    ";
static const char __pyx_k_Event_0_run_id_10_detector_id_1[] = "Event #{0}:\n    run id:          {10}\n    detector id:     {1}\n    frame index:     {2}\n    UTC seconds:     {3}\n    UTC nanoseconds: {4}\n    MC id:           {5}\n    MC time:         {6}\n    overlays:        {7}\n    trigger counter: {8}\n    trigger mask:    {9}";
static const char __pyx_k_JDAQSummaryslice_frame_metadata[] = "JDAQSummaryslice frame metadata.\n    ";
static const char __pyx_k_McTrackSeries_highest_energetic[] = "McTrackSeries.highest_energetic_muon.<locals>.<lambda>";
static const char __pyx_k_SummaryframeSeries_max_sequence[] = "SummaryframeSeries.max_sequence_numbers";
static const char __pyx_k_Summaryslice_frame_0_slice_id_1[] = "Summaryslice frame #{0}:\n    slice id:    {1}\n    DOM id:      {2}\n    UDP packets: {3}/{4}\n";
static const char __pyx_k_TimesliceFrameInfo__deserialise[] = "TimesliceFrameInfo_.deserialise";
static const char __pyx_k_TimesliceHitSeries_with_0_hit_1[] = "TimesliceHitSeries with {0} hit{1}.";
static const char __pyx_k_TrackSeries_interaction_channel[] = "TrackSeries.interaction_channel";
static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
static const char __pyx_k_A_binary_struct_superclass_which[] = "A binary struct superclass which parses itself from a given stream.\n\n    Overwrite `_structure` and `_fields` after subclassing.\n    `_structure` should have the standard Python struct format type syntax.\n    The `_fields` are automatically translated into instance attributes\n    at init.\n\n    Parameters\n    ----------\n    _structure: struct-format as str, like '<i2f'\n    _fields: iterable of str\n\n    ";
static const char __pyx_k_A_collection_of_hits_without_any[] = "A collection of hits without any calibration parameter.";
static const char __pyx_k_A_metaclass_for_serialisable_cla[] = "A metaclass for serialisable classes.\n\n    The classes should define a `dtype` attribute in their body and are not\n    meant to define `__init__` (it will be overwritten).\n\n    The class will also inherit from `Convertible`.\n\n    Example using six.with_metaclass for py2/py3 compat\n    ---------------------------------------------------\n\n        class Foo(with_metaclass(Serialisable)):\n            dtype = np.dtype([('a', '<i4'), ('b', '>i8')])\n\n    ";
static const char __pyx_k_Allow_np_void_instances_to_acces[] = "Allow `np.void` instances to access their fields via attributes.";
static const char __pyx_k_CRawHit_channel_id_0_dom_id_1_to[] = "CRawHit: channel_id({0}), dom_id({1}), tot({2}), time({3}), triggered({4}), pos({5}, {6}, {7}), dir({8}, {9}, {10})";
static const char __pyx_k_Collection_of_calibrated_MC_Hits[] = "Collection of calibrated MC Hits.\n    ";
static const char __pyx_k_Collection_of_multiple_Tracks_At[] = "Collection of multiple Tracks.\n\n    Attributes\n    ----------\n    dtype: datatype of array representation\n    ";
static const char __pyx_k_Collection_of_multiple_timeslice[] = "Collection of multiple timeslice hits.\n    ";
static const char __pyx_k_Copyright_2016_Tamas_Gal_and_the[] = "Copyright 2016, Tamas Gal and the KM3NeT collaboration.";
static const char __pyx_k_EventInfo_from_row_locals_genexp[] = "EventInfo.from_row.<locals>.genexpr";
static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
static const char __pyx_k_Helper_class_to_make_dtype_names[] = "Helper class to make dtype names accessible using the dot-syntax\n\n    Simply subclass it and make sure your class has a ``.dtype`` attribute\n    with ``names``.\n    ";
static const char __pyx_k_Hit_channel_id_0_dom_id_1_pmt_id[] = "Hit: channel_id({0}), dom_id({1}), pmt_id({2}), tot({3}), time({4}), triggered({5})";
static const char __pyx_k_Implements_basic_conversion_meth[] = "Implements basic conversion methods.";
static const char __pyx_k_KM3Array_from_dict_locals_genexp[] = "KM3Array.from_dict.<locals>.genexpr";
static const char __pyx_k_McHit_a_0_origin_1_pmt_id_2_time[] = "McHit: a({0}), origin({1}), pmt_id({2}), time({3})";
static const char __pyx_k_McTrackSeries_interaction_channe[] = "McTrackSeries.interaction_channel";
static const char __pyx_k_McTrack_pos_0_dir_1_t_2_E_3_type[] = "McTrack: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})";
static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
static const char __pyx_k_Numpy_NDarray_metadata_This_clas[] = "Numpy NDarray + metadata.\n\n    This class adds the following to ``np.ndarray``:\n\n    Attributes\n    ----------\n    h5loc: str, default='/'\n        HDF5 group where to write into.\n\n    Methods\n    -------\n    deserialise(data, h5loc='/', fmt='pandas')\n        Factory to init from data.\n    serialise(to='numpy')\n        Convert for storage.\n    ";
static const char __pyx_k_Pandas_Dataframe_metadata_This_c[] = "Pandas Dataframe + metadata.\n\n    This class adds the following to ``pd.DataFrame``:\n\n    Attributes\n    ----------\n    h5loc: str, default='/'\n        HDF5 group where to write into.\n\n    Methods\n    -------\n    deserialise(data, h5loc='/', fmt='pandas')\n        Factory to init from data.\n    serialise(to='numpy')\n        Convert for storage.\n    ";
static const char __pyx_k_RawHit_channel_id_0_dom_id_1_tot[] = "RawHit: channel_id({0}), dom_id({1}), tot({2}), time({3}), triggered({4})";
static const char __pyx_k_Represents_a_point_in_a_3D_space[] = "Represents a point in a 3D space";
static const char __pyx_k_Serialisable___new___locals___in[] = "Serialisable.__new__.<locals>.__init__";
static const char __pyx_k_SummaryframeSeries__slice_genera[] = "SummaryframeSeries._slice_generator";
static const char __pyx_k_SummaryframeSeries_n_received_pa[] = "SummaryframeSeries.n_received_packets";
static const char __pyx_k_Summaryslice_0_detector_id_1_fra[] = "Summaryslice #{0}:\n    detector id:     {1}\n    frame index:     {2}\n    run id:          {3}\n";
static const char __pyx_k_TimesliceHit_channel_id_0_dom_id[] = "TimesliceHit: channel_id({0}), dom_id({1}), tot({2}), time({3})";
static const char __pyx_k_Timeslice_frame_slice_id_0_frame[] = "Timeslice frame:\n    slice id: {0}\n    frame id: {1}\n    DOM id:   {2}\n    UDP packets: {3}/{4}\n";
static const char __pyx_k_TrackSeries_highest_energetic_mu[] = "TrackSeries.highest_energetic_muon.<locals>.<lambda>";
static const char __pyx_k_Track_pos_0_dir_1_t_2_E_3_type_4[] = "Track: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})";
static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
static const char __pyx_k_McTrackSeries_highest_energetic_2[] = "McTrackSeries.highest_energetic_muon";
static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
static const char __pyx_k_TrackSeries_highest_energetic_mu_2[] = "TrackSeries.highest_energetic_muon";
static PyObject *__pyx_kp_s_A_binary_struct_superclass_which;
static PyObject *__pyx_kp_s_A_collection_of_calibrated_hits;
static PyObject *__pyx_kp_s_A_collection_of_hits_without_any;
static PyObject *__pyx_kp_s_A_composition_of_BinaryStructs;
static PyObject *__pyx_kp_s_A_metaclass_for_serialisable_cla;
static PyObject *__pyx_kp_s_Allow_np_void_instances_to_acces;
static PyObject *__pyx_n_s_AttrVoid;
static PyObject *__pyx_n_s_AttrVoid___new;
static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_n_s_BinaryComposite;
static PyObject *__pyx_n_s_BinaryComposite___init;
static PyObject *__pyx_n_s_BinaryStruct;
static PyObject *__pyx_n_s_BinaryStruct___init;
static PyObject *__pyx_n_s_BinaryStruct__size;
static PyObject *__pyx_n_s_CMcHitSeries;
static PyObject *__pyx_n_s_CMcHitSeries___array;
static PyObject *__pyx_n_s_CMcHitSeries___init;
static PyObject *__pyx_n_s_CMcHitSeries___len;
static PyObject *__pyx_n_s_CMcHitSeries___repr;
static PyObject *__pyx_n_s_CMcHitSeries___str;
static PyObject *__pyx_n_s_CMcHitSeries_conv_from;
static PyObject *__pyx_n_s_CMcHitSeries_conv_to;
static PyObject *__pyx_n_s_CMcHitSeries_deserialise;
static PyObject *__pyx_n_s_CMcHitSeries_from_arrays;
static PyObject *__pyx_n_s_CMcHitSeries_serialise;
static PyObject *__pyx_kp_s_CMcHitSeries_with_0_hit_1;
static PyObject *__pyx_n_s_CRawHitSeries;
static PyObject *__pyx_n_s_CRawHitSeries___array;
static PyObject *__pyx_n_s_CRawHitSeries___getitem;
static PyObject *__pyx_n_s_CRawHitSeries___init;
static PyObject *__pyx_n_s_CRawHitSeries___iter;
static PyObject *__pyx_n_s_CRawHitSeries___len;
static PyObject *__pyx_n_s_CRawHitSeries___next;
static PyObject *__pyx_n_s_CRawHitSeries___repr;
static PyObject *__pyx_n_s_CRawHitSeries___str;
static PyObject *__pyx_n_s_CRawHitSeries_conv_from;
static PyObject *__pyx_n_s_CRawHitSeries_conv_to;
static PyObject *__pyx_n_s_CRawHitSeries_deserialise;
static PyObject *__pyx_n_s_CRawHitSeries_from_arrays;
static PyObject *__pyx_n_s_CRawHitSeries_next;
static PyObject *__pyx_n_s_CRawHitSeries_serialise;
static PyObject *__pyx_n_s_CRawHitSeries_triggered_hits;
static PyObject *__pyx_kp_s_CRawHitSeries_with_0_hit_1;
static PyObject *__pyx_kp_s_CRawHit_channel_id_0_dom_id_1_to;
static PyObject *__pyx_kp_s_Collection_of_calibrated_MC_Hits;
static PyObject *__pyx_kp_s_Collection_of_multiple_Hits;
static PyObject *__pyx_kp_s_Collection_of_multiple_McTracks;
static PyObject *__pyx_kp_s_Collection_of_multiple_Tracks_At;
static PyObject *__pyx_kp_s_Collection_of_multiple_timeslice;
static PyObject *__pyx_kp_s_Collection_of_summary_frames;
static PyObject *__pyx_n_s_Convertible;
static PyObject *__pyx_n_s_Convertible_conv_from;
static PyObject *__pyx_n_s_Convertible_conv_to;
static PyObject *__pyx_n_s_Convertible_deserialise;
static PyObject *__pyx_n_s_Convertible_serialise;
static PyObject *__pyx_kp_s_Copyright_2016_Tamas_Gal_and_the;
static PyObject *__pyx_n_s_DTypeAttr;
static PyObject *__pyx_n_s_DTypeAttr___array;
static PyObject *__pyx_n_s_DTypeAttr___getattr;
static PyObject *__pyx_n_s_DTypeAttr___getitem;
static PyObject *__pyx_n_s_DTypeAttr_append_fields;
static PyObject *__pyx_n_s_DTypeAttr_sorted;
static PyObject *__pyx_n_s_DataFrame;
static PyObject *__pyx_n_s_Development;
static PyObject *__pyx_n_s_Direction;
static PyObject *__pyx_n_s_E;
static PyObject *__pyx_n_s_EventInfo;
static PyObject *__pyx_n_s_EventInfo___array;
static PyObject *__pyx_n_s_EventInfo___init;
static PyObject *__pyx_n_s_EventInfo___insp;
static PyObject *__pyx_n_s_EventInfo___len;
static PyObject *__pyx_n_s_EventInfo___repr;
static PyObject *__pyx_n_s_EventInfo___str;
static PyObject *__pyx_n_s_EventInfo_conv_from;
static PyObject *__pyx_n_s_EventInfo_conv_to;
static PyObject *__pyx_n_s_EventInfo_deserialise;
static PyObject *__pyx_n_s_EventInfo_from_row;
static PyObject *__pyx_n_s_EventInfo_from_row_locals_genexp;
static PyObject *__pyx_n_s_EventInfo_serialise;
static PyObject *__pyx_kp_s_Event_0_run_id_10_detector_id_1;
static PyObject *__pyx_kp_s_Event_Metadata;
static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
static PyObject *__pyx_kp_s_Helper_class_to_make_dtype_names;
static PyObject *__pyx_n_s_Hit;
static PyObject *__pyx_n_s_HitSeries;
static PyObject *__pyx_n_s_HitSeries___array;
static PyObject *__pyx_n_s_HitSeries___getitem;
static PyObject *__pyx_n_s_HitSeries___init;
static PyObject *__pyx_n_s_HitSeries___insp;
static PyObject *__pyx_n_s_HitSeries___iter;
static PyObject *__pyx_n_s_HitSeries___len;
static PyObject *__pyx_n_s_HitSeries___next;
static PyObject *__pyx_n_s_HitSeries___repr;
static PyObject *__pyx_n_s_HitSeries___str;
static PyObject *__pyx_n_s_HitSeries_conv_from;
static PyObject *__pyx_n_s_HitSeries_conv_to;
static PyObject *__pyx_n_s_HitSeries_deserialise;
static PyObject *__pyx_n_s_HitSeries_first_hits;
static PyObject *__pyx_n_s_HitSeries_from_aanet;
static PyObject *__pyx_n_s_HitSeries_from_arrays;
static PyObject *__pyx_n_s_HitSeries_from_dict;
static PyObject *__pyx_n_s_HitSeries_from_evt;
static PyObject *__pyx_n_s_HitSeries_from_table;
static PyObject *__pyx_n_s_HitSeries_next;
static PyObject *__pyx_n_s_HitSeries_serialise;
static PyObject *__pyx_n_s_HitSeries_triggered_hits;
static PyObject *__pyx_kp_s_HitSeries_with_0_hit_1;
static PyObject *__pyx_kp_s_Hit_channel_id_0_dom_id_1_pmt_id;
static PyObject *__pyx_n_s_Hits;
static PyObject *__pyx_n_s_IS_CC;
static PyObject *__pyx_kp_s_Implements_basic_conversion_meth;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_kp_s_JDAQSummaryslice_Metadata;
static PyObject *__pyx_kp_s_JDAQSummaryslice_frame_metadata;
static PyObject *__pyx_kp_s_JDAQTimeslice_frame_metadata;
static PyObject *__pyx_n_s_KM3Array;
static PyObject *__pyx_n_s_KM3Array___array_finalize;
static PyObject *__pyx_n_s_KM3Array___init;
static PyObject *__pyx_n_s_KM3Array___new;
static PyObject *__pyx_n_s_KM3Array_conv_from;
static PyObject *__pyx_n_s_KM3Array_conv_to;
static PyObject *__pyx_n_s_KM3Array_deserialise;
static PyObject *__pyx_n_s_KM3Array_from_dict;
static PyObject *__pyx_n_s_KM3Array_from_dict_locals_genexp;
static PyObject *__pyx_n_s_KM3Array_serialise;
static PyObject *__pyx_n_s_KM3DataFrame;
static PyObject *__pyx_n_s_KM3DataFrame___init;
static PyObject *__pyx_n_s_KM3DataFrame__constructor;
static PyObject *__pyx_n_s_KM3DataFrame_conv_from;
static PyObject *__pyx_n_s_KM3DataFrame_conv_to;
static PyObject *__pyx_n_s_KM3DataFrame_deserialise;
static PyObject *__pyx_n_s_KM3DataFrame_serialise;
static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_n_s_MIT;
static PyObject *__pyx_n_s_McHit;
static PyObject *__pyx_n_s_McHitSeries;
static PyObject *__pyx_n_s_McHitSeries___array;
static PyObject *__pyx_n_s_McHitSeries___getitem;
static PyObject *__pyx_n_s_McHitSeries___init;
static PyObject *__pyx_n_s_McHitSeries___insp;
static PyObject *__pyx_n_s_McHitSeries___iter;
static PyObject *__pyx_n_s_McHitSeries___len;
static PyObject *__pyx_n_s_McHitSeries___next;
static PyObject *__pyx_n_s_McHitSeries___repr;
static PyObject *__pyx_n_s_McHitSeries___str;
static PyObject *__pyx_n_s_McHitSeries_conv_from;
static PyObject *__pyx_n_s_McHitSeries_conv_to;
static PyObject *__pyx_n_s_McHitSeries_deserialise;
static PyObject *__pyx_n_s_McHitSeries_from_aanet;
static PyObject *__pyx_n_s_McHitSeries_from_arrays;
static PyObject *__pyx_n_s_McHitSeries_from_dict;
static PyObject *__pyx_n_s_McHitSeries_from_evt;
static PyObject *__pyx_n_s_McHitSeries_from_table;
static PyObject *__pyx_n_s_McHitSeries_next;
static PyObject *__pyx_n_s_McHitSeries_serialise;
static PyObject *__pyx_kp_s_McHitSeries_with_0_hit_1;
static PyObject *__pyx_kp_s_McHit_a_0_origin_1_pmt_id_2_time;
static PyObject *__pyx_n_s_McHits;
static PyObject *__pyx_n_s_McTrack;
static PyObject *__pyx_n_s_McTrackSeries;
static PyObject *__pyx_n_s_McTrackSeries___array;
static PyObject *__pyx_n_s_McTrackSeries___getitem;
static PyObject *__pyx_n_s_McTrackSeries___init;
static PyObject *__pyx_n_s_McTrackSeries___insp;
static PyObject *__pyx_n_s_McTrackSeries___iter;
static PyObject *__pyx_n_s_McTrackSeries___len;
static PyObject *__pyx_n_s_McTrackSeries___next;
static PyObject *__pyx_n_s_McTrackSeries___repr;
static PyObject *__pyx_n_s_McTrackSeries___str;
static PyObject *__pyx_n_s_McTrackSeries__slice_generator;
static PyObject *__pyx_n_s_McTrackSeries_bjorkeny;
static PyObject *__pyx_n_s_McTrackSeries_conv_from;
static PyObject *__pyx_n_s_McTrackSeries_conv_to;
static PyObject *__pyx_n_s_McTrackSeries_deserialise;
static PyObject *__pyx_n_s_McTrackSeries_dir;
static PyObject *__pyx_n_s_McTrackSeries_energy;
static PyObject *__pyx_n_s_McTrackSeries_from_aanet;
static PyObject *__pyx_n_s_McTrackSeries_from_arrays;
static PyObject *__pyx_n_s_McTrackSeries_from_km3df;
static PyObject *__pyx_n_s_McTrackSeries_from_table;
static PyObject *__pyx_n_s_McTrackSeries_get_len;
static PyObject *__pyx_n_s_McTrackSeries_get_usr_item;
static PyObject *__pyx_n_s_McTrackSeries_get_usr_name;
static PyObject *__pyx_n_s_McTrackSeries_highest_energetic;
static PyObject *__pyx_n_s_McTrackSeries_highest_energetic_2;
static PyObject *__pyx_n_s_McTrackSeries_id;
static PyObject *__pyx_n_s_McTrackSeries_interaction_channe;
static PyObject *__pyx_n_s_McTrackSeries_is_cc;
static PyObject *__pyx_n_s_McTrackSeries_length;
static PyObject *__pyx_n_s_McTrackSeries_next;
static PyObject *__pyx_n_s_McTrackSeries_pos;
static PyObject *__pyx_n_s_McTrackSeries_serialise;
static PyObject *__pyx_n_s_McTrackSeries_time;
static PyObject *__pyx_n_s_McTrackSeries_type;
static PyObject *__pyx_kp_s_McTrackSeries_with_0_track_1;
static PyObject *__pyx_kp_s_McTrack_pos_0_dir_1_t_2_E_3_type;
static PyObject *__pyx_n_s_McTracks;
static PyObject *__pyx_kp_s_No_muon_found;
static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
static PyObject *__pyx_kp_s_Numpy_NDarray_metadata_This_clas;
static PyObject *__pyx_kp_s_Pandas_Dataframe_metadata_This_c;
static PyObject *__pyx_n_s_Point;
static PyObject *__pyx_n_s_Point___new;
static PyObject *__pyx_n_s_Point_x;
static PyObject *__pyx_n_s_Point_y;
static PyObject *__pyx_n_s_Point_z;
static PyObject *__pyx_n_s_Position;
static PyObject *__pyx_n_s_RawHitSeries;
static PyObject *__pyx_n_s_RawHitSeries___array;
static PyObject *__pyx_n_s_RawHitSeries___getitem;
static PyObject *__pyx_n_s_RawHitSeries___init;
static PyObject *__pyx_n_s_RawHitSeries___insp;
static PyObject *__pyx_n_s_RawHitSeries___iter;
static PyObject *__pyx_n_s_RawHitSeries___len;
static PyObject *__pyx_n_s_RawHitSeries___next;
static PyObject *__pyx_n_s_RawHitSeries___repr;
static PyObject *__pyx_n_s_RawHitSeries___str;
static PyObject *__pyx_n_s_RawHitSeries_conv_from;
static PyObject *__pyx_n_s_RawHitSeries_conv_to;
static PyObject *__pyx_n_s_RawHitSeries_deserialise;
static PyObject *__pyx_n_s_RawHitSeries_from_aanet;
static PyObject *__pyx_n_s_RawHitSeries_from_arrays;
static PyObject *__pyx_n_s_RawHitSeries_next;
static PyObject *__pyx_n_s_RawHitSeries_serialise;
static PyObject *__pyx_n_s_RawHitSeries_triggered_hits;
static PyObject *__pyx_kp_s_RawHitSeries_with_0_hit_1;
static PyObject *__pyx_kp_s_RawHit_channel_id_0_dom_id_1_tot;
static PyObject *__pyx_n_s_RawHits;
static PyObject *__pyx_kp_s_Represents_a_point_in_a_3D_space;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_n_s_Serialisable;
static PyObject *__pyx_n_s_Serialisable___new;
static PyObject *__pyx_n_s_Serialisable___new___locals___in;
static PyObject *__pyx_n_s_StopIteration;
static PyObject *__pyx_n_s_Struct;
static PyObject *__pyx_n_s_SummaryframeInfo;
static PyObject *__pyx_n_s_SummaryframeInfo___array;
static PyObject *__pyx_n_s_SummaryframeInfo___insp;
static PyObject *__pyx_n_s_SummaryframeInfo___len;
static PyObject *__pyx_n_s_SummaryframeInfo___str;
static PyObject *__pyx_n_s_SummaryframeInfo_conv_from;
static PyObject *__pyx_n_s_SummaryframeInfo_conv_to;
static PyObject *__pyx_n_s_SummaryframeInfo_deserialise;
static PyObject *__pyx_n_s_SummaryframeInfo_from_table;
static PyObject *__pyx_n_s_SummaryframeInfo_serialise;
static PyObject *__pyx_n_s_SummaryframeSeries;
static PyObject *__pyx_n_s_SummaryframeSeries___array;
static PyObject *__pyx_n_s_SummaryframeSeries___getitem;
static PyObject *__pyx_n_s_SummaryframeSeries___init;
static PyObject *__pyx_n_s_SummaryframeSeries___iter;
static PyObject *__pyx_n_s_SummaryframeSeries___len;
static PyObject *__pyx_n_s_SummaryframeSeries___next;
static PyObject *__pyx_n_s_SummaryframeSeries__slice_genera;
static PyObject *__pyx_n_s_SummaryframeSeries_conv_from;
static PyObject *__pyx_n_s_SummaryframeSeries_conv_to;
static PyObject *__pyx_n_s_SummaryframeSeries_deserialise;
static PyObject *__pyx_n_s_SummaryframeSeries_dom_ids;
static PyObject *__pyx_n_s_SummaryframeSeries_from_arrays;
static PyObject *__pyx_n_s_SummaryframeSeries_from_table;
static PyObject *__pyx_n_s_SummaryframeSeries_max_sequence;
static PyObject *__pyx_n_s_SummaryframeSeries_n_received_pa;
static PyObject *__pyx_n_s_SummaryframeSeries_next;
static PyObject *__pyx_n_s_SummaryframeSeries_serialise;
static PyObject *__pyx_n_s_SummarysliceInfo;
static PyObject *__pyx_n_s_SummarysliceInfo___array;
static PyObject *__pyx_n_s_SummarysliceInfo___insp;
static PyObject *__pyx_n_s_SummarysliceInfo___len;
static PyObject *__pyx_n_s_SummarysliceInfo___str;
static PyObject *__pyx_n_s_SummarysliceInfo_conv_from;
static PyObject *__pyx_n_s_SummarysliceInfo_conv_to;
static PyObject *__pyx_n_s_SummarysliceInfo_deserialise;
static PyObject *__pyx_n_s_SummarysliceInfo_from_table;
static PyObject *__pyx_n_s_SummarysliceInfo_serialise;
static PyObject *__pyx_kp_s_Summaryslice_0_detector_id_1_fra;
static PyObject *__pyx_kp_s_Summaryslice_frame_0_slice_id_1;
static PyObject *__pyx_kp_s_Tamas_Gal_and_Moritz_Lotze;
static PyObject *__pyx_n_s_TimesliceFrameInfo;
static PyObject *__pyx_n_s_TimesliceFrameInfo_2;
static PyObject *__pyx_n_s_TimesliceFrameInfo____array;
static PyObject *__pyx_n_s_TimesliceFrameInfo____insp;
static PyObject *__pyx_n_s_TimesliceFrameInfo____len;
static PyObject *__pyx_n_s_TimesliceFrameInfo____str;
static PyObject *__pyx_n_s_TimesliceFrameInfo__conv_from;
static PyObject *__pyx_n_s_TimesliceFrameInfo__conv_to;
static PyObject *__pyx_n_s_TimesliceFrameInfo__deserialise;
static PyObject *__pyx_n_s_TimesliceFrameInfo__from_table;
static PyObject *__pyx_n_s_TimesliceFrameInfo__serialise;
static PyObject *__pyx_n_s_TimesliceHitSeries;
static PyObject *__pyx_n_s_TimesliceHitSeries___array;
static PyObject *__pyx_n_s_TimesliceHitSeries___getitem;
static PyObject *__pyx_n_s_TimesliceHitSeries___init;
static PyObject *__pyx_n_s_TimesliceHitSeries___insp;
static PyObject *__pyx_n_s_TimesliceHitSeries___iter;
static PyObject *__pyx_n_s_TimesliceHitSeries___len;
static PyObject *__pyx_n_s_TimesliceHitSeries___next;
static PyObject *__pyx_n_s_TimesliceHitSeries___repr;
static PyObject *__pyx_n_s_TimesliceHitSeries___str;
static PyObject *__pyx_n_s_TimesliceHitSeries_conv_from;
static PyObject *__pyx_n_s_TimesliceHitSeries_conv_to;
static PyObject *__pyx_n_s_TimesliceHitSeries_deserialise;
static PyObject *__pyx_n_s_TimesliceHitSeries_from_arrays;
static PyObject *__pyx_n_s_TimesliceHitSeries_from_dict;
static PyObject *__pyx_n_s_TimesliceHitSeries_from_table;
static PyObject *__pyx_n_s_TimesliceHitSeries_h5loc;
static PyObject *__pyx_n_s_TimesliceHitSeries_next;
static PyObject *__pyx_n_s_TimesliceHitSeries_serialise;
static PyObject *__pyx_n_s_TimesliceHitSeries_tabname;
static PyObject *__pyx_kp_s_TimesliceHitSeries_with_0_hit_1;
static PyObject *__pyx_kp_s_TimesliceHit_channel_id_0_dom_id;
static PyObject *__pyx_n_s_TimesliceHits;
static PyObject *__pyx_n_s_TimesliceInfo;
static PyObject *__pyx_kp_s_Timeslice_frame_slice_id_0_frame;
static PyObject *__pyx_n_s_Track;
static PyObject *__pyx_n_s_TrackSeries;
static PyObject *__pyx_n_s_TrackSeries___array;
static PyObject *__pyx_n_s_TrackSeries___getitem;
static PyObject *__pyx_n_s_TrackSeries___init;
static PyObject *__pyx_n_s_TrackSeries___insp;
static PyObject *__pyx_n_s_TrackSeries___iter;
static PyObject *__pyx_n_s_TrackSeries___len;
static PyObject *__pyx_n_s_TrackSeries___next;
static PyObject *__pyx_n_s_TrackSeries___repr;
static PyObject *__pyx_n_s_TrackSeries___str;
static PyObject *__pyx_n_s_TrackSeries__slice_generator;
static PyObject *__pyx_n_s_TrackSeries_bjorkeny;
static PyObject *__pyx_n_s_TrackSeries_conv_from;
static PyObject *__pyx_n_s_TrackSeries_conv_to;
static PyObject *__pyx_n_s_TrackSeries_deserialise;
static PyObject *__pyx_n_s_TrackSeries_dir;
static PyObject *__pyx_n_s_TrackSeries_energy;
static PyObject *__pyx_n_s_TrackSeries_from_aanet;
static PyObject *__pyx_n_s_TrackSeries_from_arrays;
static PyObject *__pyx_n_s_TrackSeries_from_km3df;
static PyObject *__pyx_n_s_TrackSeries_from_table;
static PyObject *__pyx_n_s_TrackSeries_get_len;
static PyObject *__pyx_n_s_TrackSeries_get_usr_item;
static PyObject *__pyx_n_s_TrackSeries_get_usr_name;
static PyObject *__pyx_n_s_TrackSeries_highest_energetic_mu;
static PyObject *__pyx_n_s_TrackSeries_highest_energetic_mu_2;
static PyObject *__pyx_n_s_TrackSeries_id;
static PyObject *__pyx_n_s_TrackSeries_interaction_channel;
static PyObject *__pyx_n_s_TrackSeries_is_cc;
static PyObject *__pyx_n_s_TrackSeries_length;
static PyObject *__pyx_n_s_TrackSeries_next;
static PyObject *__pyx_n_s_TrackSeries_pos;
static PyObject *__pyx_n_s_TrackSeries_serialise;
static PyObject *__pyx_n_s_TrackSeries_time;
static PyObject *__pyx_n_s_TrackSeries_type;
static PyObject *__pyx_kp_s_TrackSeries_with_0_track_1;
static PyObject *__pyx_kp_s_Track_pos_0_dir_1_t_2_E_3_type_4;
static PyObject *__pyx_n_s_Tracks;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_kp_s__2;
static PyObject *__pyx_kp_s__88;
static PyObject *__pyx_kp_s__91;
static PyObject *__pyx_n_s_a;
static PyObject *__pyx_n_s_all;
static PyObject *__pyx_n_s_angle_between;
static PyObject *__pyx_n_s_append_fields;
static PyObject *__pyx_n_s_arg;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_argsort;
static PyObject *__pyx_n_s_arr;
static PyObject *__pyx_n_s_arr_2;
static PyObject *__pyx_n_s_array;
static PyObject *__pyx_n_s_array_2;
static PyObject *__pyx_n_s_array_finalize;
static PyObject *__pyx_n_s_asarray;
static PyObject *__pyx_n_s_attr;
static PyObject *__pyx_n_s_author;
static PyObject *__pyx_n_s_bjorkeny;
static PyObject *__pyx_n_s_bjorkeny_2;
static PyObject *__pyx_n_s_bjorkenys;
static PyObject *__pyx_n_s_by;
static PyObject *__pyx_n_s_calcsize;
static PyObject *__pyx_n_s_cc;
static PyObject *__pyx_n_s_channel_id;
static PyObject *__pyx_n_s_channel_ids;
static PyObject *__pyx_n_s_class;
static PyObject *__pyx_n_s_class_attr;
static PyObject *__pyx_n_s_class_name;
static PyObject *__pyx_n_s_class_parents;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_cls;
static PyObject *__pyx_n_s_col;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_column_stack;
static PyObject *__pyx_n_s_constructor;
static PyObject *__pyx_n_s_conv_from;
static PyObject *__pyx_n_s_conv_to;
static PyObject *__pyx_n_s_copyright;
static PyObject *__pyx_n_s_credits;
static PyObject *__pyx_n_s_ctypes;
static PyObject *__pyx_n_s_data;
static PyObject *__pyx_n_s_data_id;
static PyObject *__pyx_n_s_deserialise;
static PyObject *__pyx_n_s_deserialise_map;
static PyObject *__pyx_n_s_det_id;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dir;
static PyObject *__pyx_n_s_dir_2;
static PyObject *__pyx_n_s_dir_x;
static PyObject *__pyx_n_s_dir_xs;
static PyObject *__pyx_n_s_dir_y;
static PyObject *__pyx_n_s_dir_ys;
static PyObject *__pyx_n_s_dir_z;
static PyObject *__pyx_n_s_dir_zs;
static PyObject *__pyx_n_s_directions;
static PyObject *__pyx_n_s_directions_x;
static PyObject *__pyx_n_s_directions_y;
static PyObject *__pyx_n_s_directions_z;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_dom_id;
static PyObject *__pyx_n_s_dom_ids;
static PyObject *__pyx_n_s_dom_status;
static PyObject *__pyx_n_s_drop_duplicates;
static PyObject *__pyx_n_s_dtype;
static PyObject *__pyx_n_s_du;
static PyObject *__pyx_n_s_dus;
static PyObject *__pyx_n_s_email;
static PyObject *__pyx_n_s_empty;
static PyObject *__pyx_n_s_energies;
static PyObject *__pyx_n_s_energy;
static PyObject *__pyx_n_s_energy_2;
static PyObject *__pyx_n_s_event_id;
static PyObject *__pyx_kp_s_event_info;
static PyObject *__pyx_kp_s_f4;
static PyObject *__pyx_n_s_f4_2;
static PyObject *__pyx_kp_s_f8;
static PyObject *__pyx_n_s_f8_2;
static PyObject *__pyx_n_s_fields;
static PyObject *__pyx_n_s_fields_2;
static PyObject *__pyx_n_s_fifo_status;
static PyObject *__pyx_n_s_first_hits;
static PyObject *__pyx_n_s_floor;
static PyObject *__pyx_n_s_floors;
static PyObject *__pyx_n_s_fmt;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_kp_s_frame__0;
static PyObject *__pyx_n_s_frame_id;
static PyObject *__pyx_n_s_frame_index;
static PyObject *__pyx_n_s_frames;
static PyObject *__pyx_n_s_frames_2;
static PyObject *__pyx_n_s_from_aanet;
static PyObject *__pyx_n_s_from_arrays;
static PyObject *__pyx_n_s_from_dict;
static PyObject *__pyx_n_s_from_evt;
static PyObject *__pyx_n_s_from_km3df;
static PyObject *__pyx_n_s_from_row;
static PyObject *__pyx_n_s_from_table;
static PyObject *__pyx_n_s_full;
static PyObject *__pyx_n_s_geant2pdg;
static PyObject *__pyx_n_s_genexpr;
static PyObject *__pyx_n_s_get_len;
static PyObject *__pyx_n_s_get_usr_item;
static PyObject *__pyx_n_s_get_usr_name;
static PyObject *__pyx_n_s_getattr;
static PyObject *__pyx_n_s_getitem;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_getusr;
static PyObject *__pyx_n_s_h;
static PyObject *__pyx_n_s_h5loc;
static PyObject *__pyx_n_s_has_udp_trailer;
static PyObject *__pyx_n_s_high_rate_veto;
static PyObject *__pyx_n_s_highest_energetic_muon;
static PyObject *__pyx_n_s_highest_energetic_muon_2;
static PyObject *__pyx_n_s_hit;
static PyObject *__pyx_n_s_hits;
static PyObject *__pyx_n_s_hits_2;
static PyObject *__pyx_kp_s_hits_3;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_kp_s_i4;
static PyObject *__pyx_n_s_ichan;
static PyObject *__pyx_n_s_id;
static PyObject *__pyx_n_s_id_2;
static PyObject *__pyx_n_s_ids;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_index_2;
static PyObject *__pyx_kp_s_index_must_be_int_or_slice;
static PyObject *__pyx_n_s_indices;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_inplace;
static PyObject *__pyx_n_s_input_array;
static PyObject *__pyx_n_s_insp;
static PyObject *__pyx_n_s_interaction_channel;
static PyObject *__pyx_n_s_interaction_channel_2;
static PyObject *__pyx_n_s_interaction_channels;
static PyObject *__pyx_n_s_is_cc;
static PyObject *__pyx_n_s_is_cc_2;
static PyObject *__pyx_n_s_is_ccs;
static PyObject *__pyx_n_s_item;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_iter;
static PyObject *__pyx_n_s_iteritems;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_keys;
static PyObject *__pyx_n_s_km3df;
static PyObject *__pyx_n_s_km3pipe_dataclasses;
static PyObject *__pyx_kp_s_km3pipe_dataclasses_pyx;
static PyObject *__pyx_n_s_kwargs;
static PyObject *__pyx_n_s_len;
static PyObject *__pyx_n_s_len_2;
static PyObject *__pyx_n_s_length;
static PyObject *__pyx_n_s_length_2;
static PyObject *__pyx_n_s_lengths;
static PyObject *__pyx_n_s_license;
static PyObject *__pyx_n_s_livetime_sec;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_maintainer;
static PyObject *__pyx_n_s_map;
static PyObject *__pyx_n_s_math;
static PyObject *__pyx_n_s_max;
static PyObject *__pyx_n_s_max_sequence_number;
static PyObject *__pyx_n_s_max_sequence_numbers;
static PyObject *__pyx_n_s_mc;
static PyObject *__pyx_kp_s_mc_hits;
static PyObject *__pyx_n_s_mc_id;
static PyObject *__pyx_n_s_mc_t;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_metaclass_2;
static PyObject *__pyx_n_s_metadata;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_muons;
static PyObject *__pyx_n_s_n_events_gen;
static PyObject *__pyx_n_s_n_files_gen;
static PyObject *__pyx_n_s_n_frames;
static PyObject *__pyx_n_s_n_hits;
static PyObject *__pyx_n_s_n_packets;
static PyObject *__pyx_n_s_n_received_packets;
static PyObject *__pyx_n_s_n_tracks;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_s_name_len;
static PyObject *__pyx_n_s_namedtuple;
static PyObject *__pyx_n_s_names;
static PyObject *__pyx_n_s_nan;
static PyObject *__pyx_n_s_nanoseconds;
static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_new_2;
static PyObject *__pyx_n_s_new_arr;
static PyObject *__pyx_n_s_next;
static PyObject *__pyx_n_s_next_2;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_np;
static PyObject *__pyx_n_s_numpy;
static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
static PyObject *__pyx_n_s_numpy_lib;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_s_origin;
static PyObject *__pyx_n_s_out;
static PyObject *__pyx_n_s_overlays;
static PyObject *__pyx_n_s_pandas;
static PyObject *__pyx_n_s_pd;
static PyObject *__pyx_n_s_pdg2name;
static PyObject *__pyx_n_s_plural;
static PyObject *__pyx_n_s_pmt_id;
static PyObject *__pyx_n_s_pmt_ids;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_pos;
static PyObject *__pyx_n_s_pos_2;
static PyObject *__pyx_n_s_pos_x;
static PyObject *__pyx_n_s_pos_xs;
static PyObject *__pyx_n_s_pos_y;
static PyObject *__pyx_n_s_pos_ys;
static PyObject *__pyx_n_s_pos_z;
static PyObject *__pyx_n_s_pos_zs;
static PyObject *__pyx_n_s_positions;
static PyObject *__pyx_n_s_positions_x;
static PyObject *__pyx_n_s_positions_y;
static PyObject *__pyx_n_s_positions_z;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_property;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_kp_s_raw_hits;
static PyObject *__pyx_n_s_read;
static PyObject *__pyx_n_s_recfunctions;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_repr;
static PyObject *__pyx_n_s_reshape;
static PyObject *__pyx_n_s_rfn;
static PyObject *__pyx_n_s_row;
static PyObject *__pyx_n_s_run;
static PyObject *__pyx_n_s_run_id;
static PyObject *__pyx_n_s_s;
static PyObject *__pyx_n_s_sefl;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_serialise;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_setter;
static PyObject *__pyx_n_s_shape;
static PyObject *__pyx_n_s_six;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_slice_generator;
static PyObject *__pyx_n_s_slice_id;
static PyObject *__pyx_n_s_sort_idc;
static PyObject *__pyx_n_s_sort_values;
static PyObject *__pyx_n_s_sorted;
static PyObject *__pyx_n_s_sqnr;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_s_status;
static PyObject *__pyx_n_s_step;
static PyObject *__pyx_n_s_stop;
static PyObject *__pyx_n_s_str;
static PyObject *__pyx_n_s_stream;
static PyObject *__pyx_n_s_struct;
static PyObject *__pyx_n_s_structure;
static PyObject *__pyx_n_s_subset;
static PyObject *__pyx_kp_s_summary_frame_series;
static PyObject *__pyx_kp_s_summary_slice;
static PyObject *__pyx_kp_s_summary_slice_info;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_t;
static PyObject *__pyx_n_s_t0;
static PyObject *__pyx_n_s_t0s;
static PyObject *__pyx_n_s_table;
static PyObject *__pyx_n_s_tabname;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_kp_s_tgal_km3net_de;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_time;
static PyObject *__pyx_n_s_time_2;
static PyObject *__pyx_kp_s_time_slice_frame_info;
static PyObject *__pyx_kp_s_time_slice_hits;
static PyObject *__pyx_n_s_times;
static PyObject *__pyx_kp_s_timeslices_slice__0;
static PyObject *__pyx_n_s_timestamp;
static PyObject *__pyx_n_s_to;
static PyObject *__pyx_n_s_to_records;
static PyObject *__pyx_n_s_tot;
static PyObject *__pyx_n_s_tots;
static PyObject *__pyx_n_s_track;
static PyObject *__pyx_n_s_track_args;
static PyObject *__pyx_n_s_tracks;
static PyObject *__pyx_n_s_tracks_2;
static PyObject *__pyx_kp_s_tracks_3;
static PyObject *__pyx_n_s_trig;
static PyObject *__pyx_n_s_trigger_counter;
static PyObject *__pyx_n_s_trigger_mask;
static PyObject *__pyx_n_s_triggered;
static PyObject *__pyx_n_s_triggered_hits;
static PyObject *__pyx_n_s_triggereds;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_s_type_2;
static PyObject *__pyx_n_s_types;
static PyObject *__pyx_n_s_u1;
static PyObject *__pyx_kp_s_u4;
static PyObject *__pyx_kp_s_u8;
static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
static PyObject *__pyx_n_s_unpack_from;
static PyObject *__pyx_n_s_usemask;
static PyObject *__pyx_n_s_usr;
static PyObject *__pyx_n_s_usr_names;
static PyObject *__pyx_n_s_utc_nanoseconds;
static PyObject *__pyx_n_s_utc_seconds;
static PyObject *__pyx_n_s_val;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_values;
static PyObject *__pyx_n_s_view;
static PyObject *__pyx_n_s_weight_w1;
static PyObject *__pyx_n_s_weight_w2;
static PyObject *__pyx_n_s_weight_w3;
static PyObject *__pyx_n_s_white_rabbit_status;
static PyObject *__pyx_n_s_with_metaclass;
static PyObject *__pyx_n_s_write_separate_columns;
static PyObject *__pyx_n_s_x;
static PyObject *__pyx_n_s_y;
static PyObject *__pyx_n_s_z;
static PyObject *__pyx_n_s_zip;
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12Serialisable_7__new_____init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12Serialisable___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_metaclass, PyObject *__pyx_v_class_name, PyObject *__pyx_v_class_parents, PyObject *__pyx_v_class_attr); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9DTypeAttr___getattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9DTypeAttr_2sorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_by); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9DTypeAttr_4append_fields(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_values, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9DTypeAttr_6__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9DTypeAttr_8__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8AttrVoid___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_input_array); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11Convertible_deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11Convertible_2serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11Convertible_4conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_data_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11Convertible_6conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_2deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_4serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_6conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_8conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_10__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_14__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_16__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__2deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__4serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__6conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_frame_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__8conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__10__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__14__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__16__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_2deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_4serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_6conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_frame_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_8conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_10__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_14__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_16__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_8from_row_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_2from_row(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_4deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_6serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_8conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_10conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_12__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_14__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_16__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_18__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_20__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses___defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_input_array); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_2x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_4x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_6y(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_8y(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_10z(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_12z(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, int __pyx_v_channel_id, float __pyx_v_dir_x, float __pyx_v_dir_y, float __pyx_v_dir_z, int __pyx_v_dom_id, int __pyx_v_id, int __pyx_v_pmt_id, float __pyx_v_pos_x, float __pyx_v_pos_y, float __pyx_v_pos_z, int __pyx_v_t0, int __pyx_v_time, int __pyx_v_tot, unsigned short __pyx_v_triggered, CYTHON_UNUSED int __pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_3dir___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_3pos___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_2id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_2id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_6dom_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_6dom_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_3tot___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_3tot_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_10channel_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_10channel_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_6pmt_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_6pmt_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_9triggered___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_9triggered_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_x___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_x_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_y___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_y_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_z___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_z_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_x___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_x_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_y___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_y_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_z___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_z_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_2t0___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_3Hit_2t0_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_6RawHit___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self, int __pyx_v_channel_id, int __pyx_v_dom_id, double __pyx_v_time, int __pyx_v_tot, unsigned short __pyx_v_triggered, CYTHON_UNUSED int __pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_6dom_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_6RawHit_6dom_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_3tot___get__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_6RawHit_3tot_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_10channel_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_6RawHit_10channel_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_6RawHit_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_9triggered___get__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_6RawHit_9triggered_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, int __pyx_v_channel_id, float __pyx_v_dir_x, float __pyx_v_dir_y, float __pyx_v_dir_z, int __pyx_v_dom_id, int __pyx_v_du, int __pyx_v_floor, float __pyx_v_pos_x, float __pyx_v_pos_y, float __pyx_v_pos_z, float __pyx_v_t0, double __pyx_v_time, int __pyx_v_tot, unsigned short __pyx_v_triggered, CYTHON_UNUSED int __pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_6dom_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_6dom_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_3tot___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_3tot_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_10channel_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_10channel_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_2du___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_2du_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_5floor___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5floor_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_x___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_x_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_y___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_y_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_z___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_z_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_x___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_x_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_y___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_y_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_z___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_z_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_2t0___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_2t0_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_9triggered___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_9triggered_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, int __pyx_v_channel_id, int __pyx_v_dom_id, int __pyx_v_time, int __pyx_v_tot, CYTHON_UNUSED int __pyx_v_frame_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6dom_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3tot___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3tot_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_10channel_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5McHit___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self, float __pyx_v_a, int __pyx_v_origin, int __pyx_v_pmt_id, double __pyx_v_time, CYTHON_UNUSED int __pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_1a___get__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5McHit_1a_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5McHit_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_6origin___get__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5McHit_6origin_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_6pmt_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5McHit_6pmt_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, float __pyx_v_bjorkeny, PyObject *__pyx_v_dir, float __pyx_v_energy, int __pyx_v_id, __pyx_t_5numpy_int64_t __pyx_v_interaction_channel, unsigned short __pyx_v_is_cc, float __pyx_v_length, PyObject *__pyx_v_pos, int __pyx_v_time, int __pyx_v_type); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_2id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_2id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_4type___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_4type_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_19interaction_channel___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_19interaction_channel_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_6energy___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_6energy_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_6length___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_6length_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_8bjorkeny___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_8bjorkeny_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_5is_cc___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_5is_cc_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_3pos___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_3pos_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_3pos_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_3dir___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_3dir_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_5Track_3dir_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_2from_aanet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_hits, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_4from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_channel_ids, PyObject *__pyx_v_dom_ids, PyObject *__pyx_v_times, PyObject *__pyx_v_tots, PyObject *__pyx_v_triggereds, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_6triggered_hits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_8deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_10serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_12conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_14conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_16__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_18next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_20__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_22__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_24__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_26__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_28__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_30__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_32__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_2from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_channel_ids, PyObject *__pyx_v_dir_xs, PyObject *__pyx_v_dir_ys, PyObject *__pyx_v_dir_zs, PyObject *__pyx_v_dom_ids, PyObject *__pyx_v_dus, PyObject *__pyx_v_floors, PyObject *__pyx_v_pos_xs, PyObject *__pyx_v_pos_ys, PyObject *__pyx_v_pos_zs, PyObject *__pyx_v_t0s, PyObject *__pyx_v_times, PyObject *__pyx_v_tots, PyObject *__pyx_v_triggereds, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_4triggered_hits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_6deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_8serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_10conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_12conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_14triggered_hits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_16__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_18next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_20__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_22__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_24__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_26__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_28__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_30__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7McTrack___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, float __pyx_v_bjorkeny, PyObject *__pyx_v_dir, float __pyx_v_energy, int __pyx_v_id, __pyx_t_5numpy_int64_t __pyx_v_interaction_channel, unsigned short __pyx_v_is_cc, float __pyx_v_length, PyObject *__pyx_v_pos, int __pyx_v_time, int __pyx_v_type, CYTHON_UNUSED int __pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_2id___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_2id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_4type___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_4type_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_19interaction_channel___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_19interaction_channel_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_6energy___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_6energy_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_6length___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_6length_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_8bjorkeny___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_8bjorkeny_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_5is_cc___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_5is_cc_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_3pos___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_3pos_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_3pos_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_3dir___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_3dir_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_3dir_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_2from_aanet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_hits, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_4from_evt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_hits, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_6from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_a, PyObject *__pyx_v_origin, PyObject *__pyx_v_pmt_id, PyObject *__pyx_v_time, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_8from_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_map, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_10from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_12deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_14serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_16conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_18conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_20__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_22__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_24next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_26__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_28__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_30__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_32__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_34__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_36__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_2from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_a, PyObject *__pyx_v_dir_x, PyObject *__pyx_v_dir_y, PyObject *__pyx_v_dir_z, PyObject *__pyx_v_origin, PyObject *__pyx_v_pmt_id, PyObject *__pyx_v_pos_x, PyObject *__pyx_v_pos_y, PyObject *__pyx_v_pos_z, PyObject *__pyx_v_time, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_4deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_6serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_8conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_10conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_12__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_14__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_16__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_18__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_2from_aanet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_hits, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_4from_evt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_hits, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_6from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_channel_ids, PyObject *__pyx_v_dir_xs, PyObject *__pyx_v_dir_ys, PyObject *__pyx_v_dir_zs, PyObject *__pyx_v_dom_ids, PyObject *__pyx_v_ids, PyObject *__pyx_v_pmt_ids, PyObject *__pyx_v_pos_xs, PyObject *__pyx_v_pos_ys, PyObject *__pyx_v_pos_zs, PyObject *__pyx_v_t0s, PyObject *__pyx_v_times, PyObject *__pyx_v_tots, PyObject *__pyx_v_triggereds, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_8from_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_map, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_10from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_12deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_14serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_16conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_18conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_20__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_22__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_24triggered_hits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_26first_hits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_28next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_30__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_32__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_34__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_36__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_38__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_40__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_2h5loc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_4tabname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_6from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_channel_ids, PyObject *__pyx_v_dom_ids, PyObject *__pyx_v_times, PyObject *__pyx_v_tots, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_8from_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_map, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_10from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_12deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_14serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_16conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_18conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_20__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_22__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_24next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_26__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_28__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_30__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_32__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_34__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_36__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tracks, PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_2from_aanet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_tracks, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_4from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_bjorkenys, PyObject *__pyx_v_directions_x, PyObject *__pyx_v_directions_y, PyObject *__pyx_v_directions_z, PyObject *__pyx_v_energies, PyObject *__pyx_v_ids, PyObject *__pyx_v_interaction_channels, PyObject *__pyx_v_is_ccs, PyObject *__pyx_v_lengths, PyObject *__pyx_v_positions_x, PyObject *__pyx_v_positions_y, PyObject *__pyx_v_positions_z, PyObject *__pyx_v_times, PyObject *__pyx_v_types, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_6from_km3df(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_km3df); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_8from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_10deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_12serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_14conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_16conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_18__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_20get_len(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_track); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_22get_usr_item(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_track, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_24get_usr_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_track, PyObject *__pyx_v_name, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_26highest_energetic_muon(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_28__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_30__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_32bjorkeny(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_34is_cc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_36interaction_channel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_38id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_40time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_42energy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_44length(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_46type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_48pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_50dir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_52next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_54__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_56__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_58__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_60_slice_generator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_63__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_65__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_67__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tracks, PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_2from_aanet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_tracks, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_4from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_bjorkenys, PyObject *__pyx_v_directions_x, PyObject *__pyx_v_directions_y, PyObject *__pyx_v_directions_z, PyObject *__pyx_v_energies, PyObject *__pyx_v_ids, PyObject *__pyx_v_interaction_channels, PyObject *__pyx_v_is_ccs, PyObject *__pyx_v_lengths, PyObject *__pyx_v_positions_x, PyObject *__pyx_v_positions_y, PyObject *__pyx_v_positions_z, PyObject *__pyx_v_times, PyObject *__pyx_v_types, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_6from_km3df(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_km3df); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_8from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_event_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_10deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_12serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_14conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_16conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_18__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_20get_len(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_track); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_22get_usr_item(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_track, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_24get_usr_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_track, PyObject *__pyx_v_name, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_26highest_energetic_muon(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_28__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_30__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_32bjorkeny(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_34is_cc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_36interaction_channel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_38id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_40time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_42energy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_44length(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_46type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_48pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_50dir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_52next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_54__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_56__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_58__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_60_slice_generator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_63__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_65__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_67__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_2from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_dom_ids, PyObject *__pyx_v_max_sequence_numbers, PyObject *__pyx_v_n_received_packets, PyObject *__pyx_v_slice_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_4from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_slice_id); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_6deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_8serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_10conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_slice_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_12conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_14n_received_packets(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_16dom_ids(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_18max_sequence_numbers(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_20__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_22__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_24next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_26__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_28__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_30__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_32_slice_generator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_2__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_4__array_finalize__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_6deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_8serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_10conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc, PyObject *__pyx_v_fmt, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_12conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_9from_dict_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_14from_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_map, PyObject *__pyx_v_dtype, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame__constructor(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_2__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_4deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_6serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_8conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc, PyObject *__pyx_v_fmt, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_10conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12BinaryStruct___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_12BinaryStruct_2_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7km3pipe_11dataclasses_15BinaryComposite___init__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_sefl, CYTHON_UNUSED PyObject *__pyx_v_stream); /* proto */
static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_Hit(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_RawHit(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_CRawHit(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_TimesliceHit(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_McHit(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_Track(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_McTrack(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct__from_row(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_float_0_;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_13;
static PyObject *__pyx_codeobj_;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_codeobj__4;
static PyObject *__pyx_codeobj__5;
static PyObject *__pyx_codeobj__6;
static PyObject *__pyx_codeobj__7;
static PyObject *__pyx_codeobj__8;
static PyObject *__pyx_codeobj__9;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_tuple__109;
static PyObject *__pyx_tuple__153;
static PyObject *__pyx_tuple__182;
static PyObject *__pyx_tuple__183;
static PyObject *__pyx_tuple__184;
static PyObject *__pyx_tuple__197;
static PyObject *__pyx_tuple__214;
static PyObject *__pyx_tuple__220;
static PyObject *__pyx_tuple__221;
static PyObject *__pyx_tuple__222;
static PyObject *__pyx_tuple__235;
static PyObject *__pyx_tuple__252;
static PyObject *__pyx_tuple__272;
static PyObject *__pyx_tuple__283;
static PyObject *__pyx_tuple__291;
static PyObject *__pyx_tuple__292;
static PyObject *__pyx_tuple__293;
static PyObject *__pyx_tuple__294;
static PyObject *__pyx_tuple__295;
static PyObject *__pyx_tuple__296;
static PyObject *__pyx_tuple__297;
static PyObject *__pyx_tuple__298;
static PyObject *__pyx_tuple__299;
static PyObject *__pyx_tuple__301;
static PyObject *__pyx_tuple__302;
static PyObject *__pyx_tuple__303;
static PyObject *__pyx_tuple__304;
static PyObject *__pyx_tuple__305;
static PyObject *__pyx_tuple__306;
static PyObject *__pyx_tuple__307;
static PyObject *__pyx_tuple__308;
static PyObject *__pyx_tuple__309;
static PyObject *__pyx_tuple__310;
static PyObject *__pyx_tuple__311;
static PyObject *__pyx_tuple__312;
static PyObject *__pyx_tuple__313;
static PyObject *__pyx_tuple__314;
static PyObject *__pyx_tuple__315;
static PyObject *__pyx_tuple__316;
static PyObject *__pyx_tuple__317;
static PyObject *__pyx_tuple__318;
static PyObject *__pyx_tuple__319;
static PyObject *__pyx_tuple__320;
static PyObject *__pyx_tuple__321;
static PyObject *__pyx_tuple__322;
static PyObject *__pyx_tuple__323;
static PyObject *__pyx_tuple__324;
static PyObject *__pyx_tuple__325;
static PyObject *__pyx_tuple__326;
static PyObject *__pyx_tuple__327;
static PyObject *__pyx_tuple__328;
static PyObject *__pyx_tuple__329;
static PyObject *__pyx_tuple__330;
static PyObject *__pyx_tuple__331;
static PyObject *__pyx_tuple__332;
static PyObject *__pyx_tuple__333;
static PyObject *__pyx_tuple__334;
static PyObject *__pyx_tuple__335;
static PyObject *__pyx_tuple__336;
static PyObject *__pyx_tuple__337;
static PyObject *__pyx_tuple__338;
static PyObject *__pyx_tuple__339;
static PyObject *__pyx_tuple__340;
static PyObject *__pyx_tuple__341;
static PyObject *__pyx_tuple__342;
static PyObject *__pyx_tuple__343;
static PyObject *__pyx_tuple__344;
static PyObject *__pyx_tuple__345;
static PyObject *__pyx_tuple__346;
static PyObject *__pyx_tuple__347;
static PyObject *__pyx_tuple__348;
static PyObject *__pyx_tuple__349;
static PyObject *__pyx_tuple__350;
static PyObject *__pyx_tuple__351;
static PyObject *__pyx_tuple__352;
static PyObject *__pyx_tuple__353;
static PyObject *__pyx_tuple__354;
static PyObject *__pyx_tuple__355;
static PyObject *__pyx_tuple__356;
static PyObject *__pyx_tuple__357;
static PyObject *__pyx_tuple__358;
static PyObject *__pyx_tuple__359;
static PyObject *__pyx_tuple__360;
static PyObject *__pyx_tuple__361;
static PyObject *__pyx_tuple__362;
static PyObject *__pyx_tuple__363;
static PyObject *__pyx_tuple__364;
static PyObject *__pyx_tuple__365;
static PyObject *__pyx_tuple__366;
static PyObject *__pyx_tuple__367;
static PyObject *__pyx_tuple__368;
static PyObject *__pyx_tuple__369;
static PyObject *__pyx_tuple__370;
static PyObject *__pyx_tuple__371;
static PyObject *__pyx_tuple__372;
static PyObject *__pyx_tuple__373;
static PyObject *__pyx_tuple__374;
static PyObject *__pyx_tuple__375;
static PyObject *__pyx_tuple__376;
static PyObject *__pyx_tuple__377;
static PyObject *__pyx_tuple__378;
static PyObject *__pyx_tuple__379;
static PyObject *__pyx_tuple__380;
static PyObject *__pyx_tuple__381;
static PyObject *__pyx_tuple__382;
static PyObject *__pyx_tuple__383;
static PyObject *__pyx_tuple__384;
static PyObject *__pyx_tuple__385;
static PyObject *__pyx_tuple__386;
static PyObject *__pyx_tuple__387;
static PyObject *__pyx_tuple__388;
static PyObject *__pyx_tuple__389;
static PyObject *__pyx_tuple__390;
static PyObject *__pyx_tuple__391;
static PyObject *__pyx_tuple__392;
static PyObject *__pyx_tuple__393;
static PyObject *__pyx_tuple__394;
static PyObject *__pyx_tuple__395;
static PyObject *__pyx_tuple__396;
static PyObject *__pyx_tuple__397;
static PyObject *__pyx_tuple__398;
static PyObject *__pyx_tuple__399;
static PyObject *__pyx_tuple__400;
static PyObject *__pyx_tuple__401;
static PyObject *__pyx_tuple__402;
static PyObject *__pyx_tuple__403;
static PyObject *__pyx_tuple__404;
static PyObject *__pyx_tuple__405;
static PyObject *__pyx_tuple__406;
static PyObject *__pyx_tuple__407;
static PyObject *__pyx_tuple__408;
static PyObject *__pyx_tuple__409;
static PyObject *__pyx_tuple__410;
static PyObject *__pyx_tuple__411;
static PyObject *__pyx_tuple__412;
static PyObject *__pyx_tuple__413;
static PyObject *__pyx_tuple__414;
static PyObject *__pyx_tuple__415;
static PyObject *__pyx_tuple__416;
static PyObject *__pyx_tuple__417;
static PyObject *__pyx_tuple__418;
static PyObject *__pyx_tuple__419;
static PyObject *__pyx_tuple__420;
static PyObject *__pyx_tuple__421;
static PyObject *__pyx_tuple__422;
static PyObject *__pyx_tuple__423;
static PyObject *__pyx_tuple__424;
static PyObject *__pyx_tuple__425;
static PyObject *__pyx_tuple__426;
static PyObject *__pyx_tuple__427;
static PyObject *__pyx_tuple__428;
static PyObject *__pyx_tuple__429;
static PyObject *__pyx_tuple__430;
static PyObject *__pyx_tuple__431;
static PyObject *__pyx_tuple__432;
static PyObject *__pyx_tuple__433;
static PyObject *__pyx_tuple__434;
static PyObject *__pyx_tuple__435;
static PyObject *__pyx_tuple__436;
static PyObject *__pyx_tuple__437;
static PyObject *__pyx_tuple__438;
static PyObject *__pyx_tuple__439;
static PyObject *__pyx_tuple__440;
static PyObject *__pyx_tuple__441;
static PyObject *__pyx_tuple__442;
static PyObject *__pyx_tuple__443;
static PyObject *__pyx_tuple__444;
static PyObject *__pyx_tuple__445;
static PyObject *__pyx_tuple__446;
static PyObject *__pyx_tuple__447;
static PyObject *__pyx_tuple__448;
static PyObject *__pyx_tuple__449;
static PyObject *__pyx_tuple__450;
static PyObject *__pyx_tuple__451;
static PyObject *__pyx_tuple__452;
static PyObject *__pyx_tuple__453;
static PyObject *__pyx_tuple__454;
static PyObject *__pyx_tuple__455;
static PyObject *__pyx_tuple__456;
static PyObject *__pyx_tuple__457;
static PyObject *__pyx_tuple__458;
static PyObject *__pyx_tuple__459;
static PyObject *__pyx_tuple__460;
static PyObject *__pyx_tuple__461;
static PyObject *__pyx_tuple__462;
static PyObject *__pyx_tuple__463;
static PyObject *__pyx_tuple__464;
static PyObject *__pyx_tuple__465;
static PyObject *__pyx_tuple__466;
static PyObject *__pyx_tuple__467;
static PyObject *__pyx_tuple__468;
static PyObject *__pyx_tuple__469;
static PyObject *__pyx_tuple__470;
static PyObject *__pyx_tuple__471;
static PyObject *__pyx_tuple__472;
static PyObject *__pyx_tuple__473;
static PyObject *__pyx_tuple__474;
static PyObject *__pyx_tuple__475;
static PyObject *__pyx_tuple__476;
static PyObject *__pyx_tuple__477;
static PyObject *__pyx_tuple__478;
static PyObject *__pyx_tuple__479;
static PyObject *__pyx_tuple__480;
static PyObject *__pyx_tuple__481;
static PyObject *__pyx_tuple__482;
static PyObject *__pyx_tuple__483;
static PyObject *__pyx_tuple__484;
static PyObject *__pyx_tuple__485;
static PyObject *__pyx_tuple__486;
static PyObject *__pyx_tuple__487;
static PyObject *__pyx_tuple__488;
static PyObject *__pyx_tuple__489;
static PyObject *__pyx_tuple__490;
static PyObject *__pyx_tuple__491;
static PyObject *__pyx_tuple__492;
static PyObject *__pyx_tuple__493;
static PyObject *__pyx_tuple__494;
static PyObject *__pyx_tuple__495;
static PyObject *__pyx_tuple__496;
static PyObject *__pyx_tuple__497;
static PyObject *__pyx_tuple__498;
static PyObject *__pyx_tuple__499;
static PyObject *__pyx_tuple__500;
static PyObject *__pyx_tuple__501;
static PyObject *__pyx_tuple__502;
static PyObject *__pyx_tuple__503;
static PyObject *__pyx_tuple__504;
static PyObject *__pyx_tuple__505;
static PyObject *__pyx_tuple__506;
static PyObject *__pyx_tuple__507;
static PyObject *__pyx_tuple__508;
static PyObject *__pyx_tuple__509;
static PyObject *__pyx_tuple__510;
static PyObject *__pyx_tuple__511;
static PyObject *__pyx_tuple__512;
static PyObject *__pyx_tuple__513;
static PyObject *__pyx_tuple__514;
static PyObject *__pyx_tuple__515;
static PyObject *__pyx_tuple__516;
static PyObject *__pyx_tuple__517;
static PyObject *__pyx_tuple__518;
static PyObject *__pyx_tuple__519;
static PyObject *__pyx_tuple__520;
static PyObject *__pyx_tuple__521;
static PyObject *__pyx_tuple__522;
static PyObject *__pyx_tuple__523;
static PyObject *__pyx_tuple__524;
static PyObject *__pyx_tuple__525;
static PyObject *__pyx_tuple__526;
static PyObject *__pyx_tuple__527;
static PyObject *__pyx_tuple__528;
static PyObject *__pyx_tuple__529;
static PyObject *__pyx_tuple__530;
static PyObject *__pyx_tuple__531;
static PyObject *__pyx_tuple__532;
static PyObject *__pyx_tuple__533;
static PyObject *__pyx_tuple__534;
static PyObject *__pyx_tuple__535;
static PyObject *__pyx_tuple__536;
static PyObject *__pyx_tuple__537;
static PyObject *__pyx_tuple__538;
static PyObject *__pyx_tuple__539;
static PyObject *__pyx_tuple__540;
static PyObject *__pyx_tuple__541;
static PyObject *__pyx_tuple__542;
static PyObject *__pyx_tuple__543;
static PyObject *__pyx_tuple__544;
static PyObject *__pyx_tuple__545;
static PyObject *__pyx_tuple__546;
static PyObject *__pyx_tuple__547;
static PyObject *__pyx_tuple__548;
static PyObject *__pyx_tuple__549;
static PyObject *__pyx_tuple__550;
static PyObject *__pyx_tuple__551;
static PyObject *__pyx_tuple__552;
static PyObject *__pyx_tuple__553;
static PyObject *__pyx_tuple__554;
static PyObject *__pyx_tuple__555;
static PyObject *__pyx_tuple__556;
static PyObject *__pyx_tuple__557;
static PyObject *__pyx_tuple__558;
static PyObject *__pyx_tuple__559;
static PyObject *__pyx_tuple__560;
static PyObject *__pyx_tuple__561;
static PyObject *__pyx_tuple__562;
static PyObject *__pyx_tuple__563;
static PyObject *__pyx_tuple__564;
static PyObject *__pyx_tuple__565;
static PyObject *__pyx_tuple__566;
static PyObject *__pyx_tuple__567;
static PyObject *__pyx_tuple__568;
static PyObject *__pyx_tuple__569;
static PyObject *__pyx_tuple__570;
static PyObject *__pyx_tuple__571;
static PyObject *__pyx_tuple__572;
static PyObject *__pyx_tuple__573;
static PyObject *__pyx_tuple__574;
static PyObject *__pyx_tuple__575;
static PyObject *__pyx_tuple__576;
static PyObject *__pyx_tuple__577;
static PyObject *__pyx_tuple__578;
static PyObject *__pyx_tuple__579;
static PyObject *__pyx_tuple__580;
static PyObject *__pyx_tuple__581;
static PyObject *__pyx_tuple__582;
static PyObject *__pyx_tuple__583;
static PyObject *__pyx_tuple__584;
static PyObject *__pyx_tuple__585;
static PyObject *__pyx_tuple__586;
static PyObject *__pyx_tuple__587;
static PyObject *__pyx_tuple__588;
static PyObject *__pyx_tuple__589;
static PyObject *__pyx_tuple__590;
static PyObject *__pyx_tuple__591;
static PyObject *__pyx_tuple__592;
static PyObject *__pyx_tuple__593;
static PyObject *__pyx_tuple__594;
static PyObject *__pyx_tuple__595;
static PyObject *__pyx_tuple__596;
static PyObject *__pyx_tuple__597;
static PyObject *__pyx_tuple__598;
static PyObject *__pyx_tuple__599;
static PyObject *__pyx_tuple__600;
static PyObject *__pyx_tuple__601;
static PyObject *__pyx_tuple__602;
static PyObject *__pyx_tuple__603;
static PyObject *__pyx_tuple__604;
static PyObject *__pyx_tuple__605;
static PyObject *__pyx_tuple__606;
static PyObject *__pyx_tuple__607;
static PyObject *__pyx_tuple__608;
static PyObject *__pyx_tuple__609;
static PyObject *__pyx_tuple__610;
static PyObject *__pyx_tuple__611;
static PyObject *__pyx_tuple__612;
static PyObject *__pyx_tuple__613;
static PyObject *__pyx_tuple__614;
static PyObject *__pyx_tuple__615;
static PyObject *__pyx_tuple__616;
static PyObject *__pyx_tuple__617;
static PyObject *__pyx_tuple__618;
static PyObject *__pyx_tuple__619;
static PyObject *__pyx_tuple__620;
static PyObject *__pyx_tuple__621;
static PyObject *__pyx_tuple__622;
static PyObject *__pyx_tuple__623;
static PyObject *__pyx_tuple__624;
static PyObject *__pyx_tuple__625;
static PyObject *__pyx_tuple__626;
static PyObject *__pyx_tuple__627;
static PyObject *__pyx_tuple__628;
static PyObject *__pyx_tuple__629;
static PyObject *__pyx_tuple__630;
static PyObject *__pyx_tuple__631;
static PyObject *__pyx_tuple__632;
static PyObject *__pyx_tuple__633;
static PyObject *__pyx_tuple__634;
static PyObject *__pyx_tuple__635;
static PyObject *__pyx_tuple__636;
static PyObject *__pyx_tuple__637;
static PyObject *__pyx_tuple__638;
static PyObject *__pyx_tuple__639;
static PyObject *__pyx_tuple__640;
static PyObject *__pyx_tuple__641;
static PyObject *__pyx_tuple__642;
static PyObject *__pyx_tuple__643;
static PyObject *__pyx_tuple__644;
static PyObject *__pyx_tuple__646;
static PyObject *__pyx_tuple__647;
static PyObject *__pyx_tuple__648;
static PyObject *__pyx_tuple__649;
static PyObject *__pyx_tuple__650;
static PyObject *__pyx_tuple__651;
static PyObject *__pyx_tuple__652;
static PyObject *__pyx_tuple__653;
static PyObject *__pyx_tuple__654;
static PyObject *__pyx_tuple__655;
static PyObject *__pyx_tuple__656;
static PyObject *__pyx_tuple__657;
static PyObject *__pyx_tuple__658;
static PyObject *__pyx_tuple__659;
static PyObject *__pyx_tuple__660;
static PyObject *__pyx_tuple__661;
static PyObject *__pyx_tuple__662;
static PyObject *__pyx_tuple__663;
static PyObject *__pyx_tuple__664;
static PyObject *__pyx_tuple__665;
static PyObject *__pyx_tuple__666;
static PyObject *__pyx_tuple__667;
static PyObject *__pyx_tuple__668;
static PyObject *__pyx_tuple__669;
static PyObject *__pyx_tuple__670;
static PyObject *__pyx_tuple__671;
static PyObject *__pyx_tuple__672;
static PyObject *__pyx_tuple__673;
static PyObject *__pyx_tuple__674;
static PyObject *__pyx_tuple__675;
static PyObject *__pyx_tuple__676;
static PyObject *__pyx_tuple__677;
static PyObject *__pyx_tuple__678;
static PyObject *__pyx_tuple__679;
static PyObject *__pyx_tuple__680;
static PyObject *__pyx_tuple__681;
static PyObject *__pyx_tuple__682;
static PyObject *__pyx_tuple__683;
static PyObject *__pyx_tuple__684;
static PyObject *__pyx_tuple__685;
static PyObject *__pyx_tuple__686;
static PyObject *__pyx_tuple__687;
static PyObject *__pyx_tuple__688;
static PyObject *__pyx_tuple__689;
static PyObject *__pyx_tuple__690;
static PyObject *__pyx_tuple__691;
static PyObject *__pyx_tuple__692;
static PyObject *__pyx_tuple__693;
static PyObject *__pyx_tuple__694;
static PyObject *__pyx_tuple__695;
static PyObject *__pyx_tuple__696;
static PyObject *__pyx_tuple__697;
static PyObject *__pyx_tuple__698;
static PyObject *__pyx_tuple__699;
static PyObject *__pyx_tuple__700;
static PyObject *__pyx_tuple__702;
static PyObject *__pyx_tuple__703;
static PyObject *__pyx_tuple__704;
static PyObject *__pyx_tuple__705;
static PyObject *__pyx_tuple__706;
static PyObject *__pyx_tuple__707;
static PyObject *__pyx_tuple__708;
static PyObject *__pyx_tuple__709;
static PyObject *__pyx_tuple__710;
static PyObject *__pyx_tuple__711;
static PyObject *__pyx_tuple__712;
static PyObject *__pyx_tuple__713;
static PyObject *__pyx_tuple__714;
static PyObject *__pyx_tuple__715;
static PyObject *__pyx_tuple__716;
static PyObject *__pyx_tuple__717;
static PyObject *__pyx_tuple__718;
static PyObject *__pyx_tuple__719;
static PyObject *__pyx_tuple__720;
static PyObject *__pyx_tuple__721;
static PyObject *__pyx_tuple__722;
static PyObject *__pyx_tuple__723;
static PyObject *__pyx_tuple__724;
static PyObject *__pyx_tuple__725;
static PyObject *__pyx_tuple__726;
static PyObject *__pyx_tuple__727;
static PyObject *__pyx_tuple__728;
static PyObject *__pyx_tuple__730;
static PyObject *__pyx_tuple__731;
static PyObject *__pyx_tuple__732;
static PyObject *__pyx_tuple__733;
static PyObject *__pyx_tuple__734;
static PyObject *__pyx_tuple__735;
static PyObject *__pyx_tuple__736;
static PyObject *__pyx_tuple__737;
static PyObject *__pyx_tuple__738;
static PyObject *__pyx_tuple__739;
static PyObject *__pyx_tuple__740;
static PyObject *__pyx_tuple__741;
static PyObject *__pyx_tuple__742;
static PyObject *__pyx_tuple__743;
static PyObject *__pyx_tuple__744;
static PyObject *__pyx_tuple__745;
static PyObject *__pyx_tuple__746;
static PyObject *__pyx_tuple__747;
static PyObject *__pyx_tuple__748;
static PyObject *__pyx_tuple__749;
static PyObject *__pyx_tuple__750;
static PyObject *__pyx_tuple__751;
static PyObject *__pyx_tuple__752;
static PyObject *__pyx_tuple__753;
static PyObject *__pyx_tuple__754;
static PyObject *__pyx_tuple__755;
static PyObject *__pyx_codeobj__10;
static PyObject *__pyx_codeobj__11;
static PyObject *__pyx_codeobj__12;
static PyObject *__pyx_codeobj__13;
static PyObject *__pyx_codeobj__14;
static PyObject *__pyx_codeobj__15;
static PyObject *__pyx_codeobj__16;
static PyObject *__pyx_codeobj__17;
static PyObject *__pyx_codeobj__18;
static PyObject *__pyx_codeobj__19;
static PyObject *__pyx_codeobj__20;
static PyObject *__pyx_codeobj__21;
static PyObject *__pyx_codeobj__22;
static PyObject *__pyx_codeobj__23;
static PyObject *__pyx_codeobj__24;
static PyObject *__pyx_codeobj__25;
static PyObject *__pyx_codeobj__26;
static PyObject *__pyx_codeobj__27;
static PyObject *__pyx_codeobj__28;
static PyObject *__pyx_codeobj__29;
static PyObject *__pyx_codeobj__30;
static PyObject *__pyx_codeobj__31;
static PyObject *__pyx_codeobj__32;
static PyObject *__pyx_codeobj__33;
static PyObject *__pyx_codeobj__34;
static PyObject *__pyx_codeobj__35;
static PyObject *__pyx_codeobj__36;
static PyObject *__pyx_codeobj__37;
static PyObject *__pyx_codeobj__38;
static PyObject *__pyx_codeobj__39;
static PyObject *__pyx_codeobj__40;
static PyObject *__pyx_codeobj__41;
static PyObject *__pyx_codeobj__42;
static PyObject *__pyx_codeobj__44;
static PyObject *__pyx_codeobj__45;
static PyObject *__pyx_codeobj__46;
static PyObject *__pyx_codeobj__47;
static PyObject *__pyx_codeobj__48;
static PyObject *__pyx_codeobj__49;
static PyObject *__pyx_codeobj__50;
static PyObject *__pyx_codeobj__51;
static PyObject *__pyx_codeobj__52;
static PyObject *__pyx_codeobj__53;
static PyObject *__pyx_codeobj__54;
static PyObject *__pyx_codeobj__55;
static PyObject *__pyx_codeobj__56;
static PyObject *__pyx_codeobj__57;
static PyObject *__pyx_codeobj__58;
static PyObject *__pyx_codeobj__59;
static PyObject *__pyx_codeobj__60;
static PyObject *__pyx_codeobj__73;
static PyObject *__pyx_codeobj__74;
static PyObject *__pyx_codeobj__75;
static PyObject *__pyx_codeobj__76;
static PyObject *__pyx_codeobj__77;
static PyObject *__pyx_codeobj__78;
static PyObject *__pyx_codeobj__79;
static PyObject *__pyx_codeobj__80;
static PyObject *__pyx_codeobj__81;
static PyObject *__pyx_codeobj__82;
static PyObject *__pyx_codeobj__83;
static PyObject *__pyx_codeobj__84;
static PyObject *__pyx_codeobj__85;
static PyObject *__pyx_codeobj__86;
static PyObject *__pyx_codeobj__87;
static PyObject *__pyx_codeobj__89;
static PyObject *__pyx_codeobj__90;
static PyObject *__pyx_codeobj__92;
static PyObject *__pyx_codeobj__93;
static PyObject *__pyx_codeobj__94;
static PyObject *__pyx_codeobj__95;
static PyObject *__pyx_codeobj__96;
static PyObject *__pyx_codeobj__97;
static PyObject *__pyx_codeobj__98;
static PyObject *__pyx_codeobj__99;
static PyObject *__pyx_codeobj__100;
static PyObject *__pyx_codeobj__101;
static PyObject *__pyx_codeobj__102;
static PyObject *__pyx_codeobj__103;
static PyObject *__pyx_codeobj__104;
static PyObject *__pyx_codeobj__105;
static PyObject *__pyx_codeobj__106;
static PyObject *__pyx_codeobj__107;
static PyObject *__pyx_codeobj__110;
static PyObject *__pyx_codeobj__111;
static PyObject *__pyx_codeobj__112;
static PyObject *__pyx_codeobj__113;
static PyObject *__pyx_codeobj__114;
static PyObject *__pyx_codeobj__115;
static PyObject *__pyx_codeobj__116;
static PyObject *__pyx_codeobj__117;
static PyObject *__pyx_codeobj__118;
static PyObject *__pyx_codeobj__119;
static PyObject *__pyx_codeobj__120;
static PyObject *__pyx_codeobj__121;
static PyObject *__pyx_codeobj__122;
static PyObject *__pyx_codeobj__123;
static PyObject *__pyx_codeobj__124;
static PyObject *__pyx_codeobj__125;
static PyObject *__pyx_codeobj__126;
static PyObject *__pyx_codeobj__127;
static PyObject *__pyx_codeobj__128;
static PyObject *__pyx_codeobj__129;
static PyObject *__pyx_codeobj__130;
static PyObject *__pyx_codeobj__131;
static PyObject *__pyx_codeobj__132;
static PyObject *__pyx_codeobj__133;
static PyObject *__pyx_codeobj__134;
static PyObject *__pyx_codeobj__135;
static PyObject *__pyx_codeobj__136;
static PyObject *__pyx_codeobj__137;
static PyObject *__pyx_codeobj__138;
static PyObject *__pyx_codeobj__139;
static PyObject *__pyx_codeobj__140;
static PyObject *__pyx_codeobj__141;
static PyObject *__pyx_codeobj__142;
static PyObject *__pyx_codeobj__143;
static PyObject *__pyx_codeobj__144;
static PyObject *__pyx_codeobj__145;
static PyObject *__pyx_codeobj__146;
static PyObject *__pyx_codeobj__147;
static PyObject *__pyx_codeobj__148;
static PyObject *__pyx_codeobj__149;
static PyObject *__pyx_codeobj__150;
static PyObject *__pyx_codeobj__151;
static PyObject *__pyx_codeobj__152;
static PyObject *__pyx_codeobj__154;
static PyObject *__pyx_codeobj__155;
static PyObject *__pyx_codeobj__156;
static PyObject *__pyx_codeobj__157;
static PyObject *__pyx_codeobj__158;
static PyObject *__pyx_codeobj__159;
static PyObject *__pyx_codeobj__160;
static PyObject *__pyx_codeobj__161;
static PyObject *__pyx_codeobj__162;
static PyObject *__pyx_codeobj__163;
static PyObject *__pyx_codeobj__164;
static PyObject *__pyx_codeobj__165;
static PyObject *__pyx_codeobj__166;
static PyObject *__pyx_codeobj__167;
static PyObject *__pyx_codeobj__168;
static PyObject *__pyx_codeobj__169;
static PyObject *__pyx_codeobj__170;
static PyObject *__pyx_codeobj__171;
static PyObject *__pyx_codeobj__172;
static PyObject *__pyx_codeobj__173;
static PyObject *__pyx_codeobj__174;
static PyObject *__pyx_codeobj__175;
static PyObject *__pyx_codeobj__176;
static PyObject *__pyx_codeobj__177;
static PyObject *__pyx_codeobj__178;
static PyObject *__pyx_codeobj__179;
static PyObject *__pyx_codeobj__180;
static PyObject *__pyx_codeobj__181;
static PyObject *__pyx_codeobj__185;
static PyObject *__pyx_codeobj__186;
static PyObject *__pyx_codeobj__187;
static PyObject *__pyx_codeobj__188;
static PyObject *__pyx_codeobj__189;
static PyObject *__pyx_codeobj__190;
static PyObject *__pyx_codeobj__191;
static PyObject *__pyx_codeobj__192;
static PyObject *__pyx_codeobj__193;
static PyObject *__pyx_codeobj__194;
static PyObject *__pyx_codeobj__195;
static PyObject *__pyx_codeobj__196;
static PyObject *__pyx_codeobj__198;
static PyObject *__pyx_codeobj__199;
static PyObject *__pyx_codeobj__200;
static PyObject *__pyx_codeobj__201;
static PyObject *__pyx_codeobj__202;
static PyObject *__pyx_codeobj__203;
static PyObject *__pyx_codeobj__204;
static PyObject *__pyx_codeobj__205;
static PyObject *__pyx_codeobj__206;
static PyObject *__pyx_codeobj__207;
static PyObject *__pyx_codeobj__208;
static PyObject *__pyx_codeobj__209;
static PyObject *__pyx_codeobj__210;
static PyObject *__pyx_codeobj__211;
static PyObject *__pyx_codeobj__212;
static PyObject *__pyx_codeobj__213;
static PyObject *__pyx_codeobj__215;
static PyObject *__pyx_codeobj__216;
static PyObject *__pyx_codeobj__217;
static PyObject *__pyx_codeobj__218;
static PyObject *__pyx_codeobj__219;
static PyObject *__pyx_codeobj__223;
static PyObject *__pyx_codeobj__224;
static PyObject *__pyx_codeobj__225;
static PyObject *__pyx_codeobj__226;
static PyObject *__pyx_codeobj__227;
static PyObject *__pyx_codeobj__228;
static PyObject *__pyx_codeobj__229;
static PyObject *__pyx_codeobj__230;
static PyObject *__pyx_codeobj__231;
static PyObject *__pyx_codeobj__232;
static PyObject *__pyx_codeobj__233;
static PyObject *__pyx_codeobj__234;
static PyObject *__pyx_codeobj__236;
static PyObject *__pyx_codeobj__237;
static PyObject *__pyx_codeobj__238;
static PyObject *__pyx_codeobj__239;
static PyObject *__pyx_codeobj__240;
static PyObject *__pyx_codeobj__241;
static PyObject *__pyx_codeobj__242;
static PyObject *__pyx_codeobj__243;
static PyObject *__pyx_codeobj__244;
static PyObject *__pyx_codeobj__245;
static PyObject *__pyx_codeobj__246;
static PyObject *__pyx_codeobj__247;
static PyObject *__pyx_codeobj__248;
static PyObject *__pyx_codeobj__249;
static PyObject *__pyx_codeobj__250;
static PyObject *__pyx_codeobj__251;
static PyObject *__pyx_codeobj__253;
static PyObject *__pyx_codeobj__254;
static PyObject *__pyx_codeobj__255;
static PyObject *__pyx_codeobj__256;
static PyObject *__pyx_codeobj__257;
static PyObject *__pyx_codeobj__258;
static PyObject *__pyx_codeobj__259;
static PyObject *__pyx_codeobj__260;
static PyObject *__pyx_codeobj__261;
static PyObject *__pyx_codeobj__262;
static PyObject *__pyx_codeobj__263;
static PyObject *__pyx_codeobj__264;
static PyObject *__pyx_codeobj__265;
static PyObject *__pyx_codeobj__266;
static PyObject *__pyx_codeobj__267;
static PyObject *__pyx_codeobj__268;
static PyObject *__pyx_codeobj__269;
static PyObject *__pyx_codeobj__270;
static PyObject *__pyx_codeobj__271;
static PyObject *__pyx_codeobj__273;
static PyObject *__pyx_codeobj__274;
static PyObject *__pyx_codeobj__275;
static PyObject *__pyx_codeobj__276;
static PyObject *__pyx_codeobj__277;
static PyObject *__pyx_codeobj__278;
static PyObject *__pyx_codeobj__279;
static PyObject *__pyx_codeobj__280;
static PyObject *__pyx_codeobj__281;
static PyObject *__pyx_codeobj__282;
static PyObject *__pyx_codeobj__284;
static PyObject *__pyx_codeobj__285;
static PyObject *__pyx_codeobj__286;
static PyObject *__pyx_codeobj__287;
static PyObject *__pyx_codeobj__288;
static PyObject *__pyx_codeobj__289;
static PyObject *__pyx_codeobj__290;
static PyObject *__pyx_codeobj__645;
static PyObject *__pyx_codeobj__701;
static PyObject *__pyx_codeobj__729;

/* "km3pipe/dataclasses.pyx":67
 * 
 *     """
 *     def __new__(metaclass, class_name, class_parents, class_attr):             # <<<<<<<<<<<<<<
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12Serialisable_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12Serialisable___new__[] = "Serialisable.__new__(metaclass, class_name, class_parents, class_attr)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12Serialisable_1__new__ = {"__new__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12Serialisable_1__new__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12Serialisable___new__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12Serialisable_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_metaclass = 0;
  PyObject *__pyx_v_class_name = 0;
  PyObject *__pyx_v_class_parents = 0;
  PyObject *__pyx_v_class_attr = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_metaclass,&__pyx_n_s_class_name,&__pyx_n_s_class_parents,&__pyx_n_s_class_attr,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_metaclass)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_class_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 1); __PYX_ERR(0, 67, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_class_parents)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 2); __PYX_ERR(0, 67, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_class_attr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 3); __PYX_ERR(0, 67, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) __PYX_ERR(0, 67, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_metaclass = values[0];
    __pyx_v_class_name = values[1];
    __pyx_v_class_parents = values[2];
    __pyx_v_class_attr = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 67, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Serialisable.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12Serialisable___new__(__pyx_self, __pyx_v_metaclass, __pyx_v_class_name, __pyx_v_class_parents, __pyx_v_class_attr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":75
 *                 attr[name] = val
 * 
 *         def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *             """Take care of the attribute settings."""
 *             for arg, name in zip(args, self.dtype.names):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12Serialisable_7__new___1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12Serialisable_7__new_____init__[] = "Take care of the attribute settings.";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12Serialisable_7__new___1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12Serialisable_7__new___1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12Serialisable_7__new_____init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12Serialisable_7__new___1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 75, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 75, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.Serialisable.__new__.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12Serialisable_7__new_____init__(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12Serialisable_7__new_____init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_arg = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 75, 0, __PYX_ERR(0, 75, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":77
 *         def __init__(self, *args, **kwargs):
 *             """Take care of the attribute settings."""
 *             for arg, name in zip(args, self.dtype.names):             # <<<<<<<<<<<<<<
 *                 setattr(self, name, arg)
 *             for key, value in kwargs.iteritems():
 */
  __Pyx_TraceLine(77,0,__PYX_ERR(0, 77, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_args);
  __Pyx_GIVEREF(__pyx_v_args);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_args);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 77, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 77, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 77, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 77, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      #if !CYTHON_COMPILING_IN_PYPY
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 77, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 77, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 77, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 77, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 77, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 77, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":78
 *             """Take care of the attribute settings."""
 *             for arg, name in zip(args, self.dtype.names):
 *                 setattr(self, name, arg)             # <<<<<<<<<<<<<<
 *             for key, value in kwargs.iteritems():
 *                 setattr(self, key, value)
 */
    __Pyx_TraceLine(78,0,__PYX_ERR(0, 78, __pyx_L1_error))
    __pyx_t_9 = PyObject_SetAttr(__pyx_v_self, __pyx_v_name, __pyx_v_arg); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 78, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":77
 *         def __init__(self, *args, **kwargs):
 *             """Take care of the attribute settings."""
 *             for arg, name in zip(args, self.dtype.names):             # <<<<<<<<<<<<<<
 *                 setattr(self, name, arg)
 *             for key, value in kwargs.iteritems():
 */
    __Pyx_TraceLine(77,0,__PYX_ERR(0, 77, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":79
 *             for arg, name in zip(args, self.dtype.names):
 *                 setattr(self, name, arg)
 *             for key, value in kwargs.iteritems():             # <<<<<<<<<<<<<<
 *                 setattr(self, key, value)
 * 
 */
  __Pyx_TraceLine(79,0,__PYX_ERR(0, 79, __pyx_L1_error))
  __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, __pyx_n_s_iteritems, (&__pyx_t_10), (&__pyx_t_11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_t_2 = 0;
  while (1) {
    __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_10, &__pyx_t_3, &__pyx_t_2, &__pyx_t_6, NULL, __pyx_t_11);
    if (unlikely(__pyx_t_12 == 0)) break;
    if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 79, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":80
 *                 setattr(self, name, arg)
 *             for key, value in kwargs.iteritems():
 *                 setattr(self, key, value)             # <<<<<<<<<<<<<<
 * 
 *         attr['__init__'] = __init__
 */
    __Pyx_TraceLine(80,0,__PYX_ERR(0, 80, __pyx_L1_error))
    __pyx_t_9 = PyObject_SetAttr(__pyx_v_self, __pyx_v_key, __pyx_v_value); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 80, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":75
 *                 attr[name] = val
 * 
 *         def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *             """Take care of the attribute settings."""
 *             for arg, name in zip(args, self.dtype.names):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.Serialisable.__new__.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":67
 * 
 *     """
 *     def __new__(metaclass, class_name, class_parents, class_attr):             # <<<<<<<<<<<<<<
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():
 */

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12Serialisable___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_metaclass, PyObject *__pyx_v_class_name, PyObject *__pyx_v_class_parents, PyObject *__pyx_v_class_attr) {
  PyObject *__pyx_v_attr = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v___init__ = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  __Pyx_TraceFrameInit(__pyx_codeobj_)
  __Pyx_RefNannySetupContext("__new__", 0);
  __Pyx_TraceCall("__new__", __pyx_f[0], 67, 0, __PYX_ERR(0, 67, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_class_parents);

  /* "km3pipe/dataclasses.pyx":68
 *     """
 *     def __new__(metaclass, class_name, class_parents, class_attr):
 *         attr = {'h5loc': '/'}             # <<<<<<<<<<<<<<
 *         for name, val in class_attr.items():
 *             if name == 'dtype':
 */
  __Pyx_TraceLine(68,0,__PYX_ERR(0, 68, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_h5loc, __pyx_kp_s__2) < 0) __PYX_ERR(0, 68, __pyx_L1_error)
  __pyx_v_attr = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":69
 *     def __new__(metaclass, class_name, class_parents, class_attr):
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():             # <<<<<<<<<<<<<<
 *             if name == 'dtype':
 *                 attr['dtype'] = np.dtype(val)
 */
  __Pyx_TraceLine(69,0,__PYX_ERR(0, 69, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_class_attr, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 69, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 69, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 69, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_5(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 69, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      #if !CYTHON_COMPILING_IN_PYPY
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 69, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 69, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 69, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 69, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":70
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():
 *             if name == 'dtype':             # <<<<<<<<<<<<<<
 *                 attr['dtype'] = np.dtype(val)
 *             else:
 */
    __Pyx_TraceLine(70,0,__PYX_ERR(0, 70, __pyx_L1_error))
    __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_dtype, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 70, __pyx_L1_error)
    if (__pyx_t_9) {

      /* "km3pipe/dataclasses.pyx":71
 *         for name, val in class_attr.items():
 *             if name == 'dtype':
 *                 attr['dtype'] = np.dtype(val)             # <<<<<<<<<<<<<<
 *             else:
 *                 attr[name] = val
 */
      __Pyx_TraceLine(71,0,__PYX_ERR(0, 71, __pyx_L1_error))
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val);
      __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 71, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(PyDict_SetItem(__pyx_v_attr, __pyx_n_s_dtype, __pyx_t_6) < 0)) __PYX_ERR(0, 71, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "km3pipe/dataclasses.pyx":70
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():
 *             if name == 'dtype':             # <<<<<<<<<<<<<<
 *                 attr['dtype'] = np.dtype(val)
 *             else:
 */
      goto __pyx_L7;
    }

    /* "km3pipe/dataclasses.pyx":73
 *                 attr['dtype'] = np.dtype(val)
 *             else:
 *                 attr[name] = val             # <<<<<<<<<<<<<<
 * 
 *         def __init__(self, *args, **kwargs):
 */
    __Pyx_TraceLine(73,0,__PYX_ERR(0, 73, __pyx_L1_error))
    /*else*/ {
      if (unlikely(PyDict_SetItem(__pyx_v_attr, __pyx_v_name, __pyx_v_val) < 0)) __PYX_ERR(0, 73, __pyx_L1_error)
    }
    __pyx_L7:;

    /* "km3pipe/dataclasses.pyx":69
 *     def __new__(metaclass, class_name, class_parents, class_attr):
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():             # <<<<<<<<<<<<<<
 *             if name == 'dtype':
 *                 attr['dtype'] = np.dtype(val)
 */
    __Pyx_TraceLine(69,0,__PYX_ERR(0, 69, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":75
 *                 attr[name] = val
 * 
 *         def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *             """Take care of the attribute settings."""
 *             for arg, name in zip(args, self.dtype.names):
 */
  __Pyx_TraceLine(75,0,__PYX_ERR(0, 75, __pyx_L1_error))
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12Serialisable_7__new___1__init__, 0, __pyx_n_s_Serialisable___new___locals___in, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v___init__ = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":82
 *                 setattr(self, key, value)
 * 
 *         attr['__init__'] = __init__             # <<<<<<<<<<<<<<
 * 
 *         class_parents = (Convertible,)
 */
  __Pyx_TraceLine(82,0,__PYX_ERR(0, 82, __pyx_L1_error))
  if (unlikely(PyDict_SetItem(__pyx_v_attr, __pyx_n_s_init, __pyx_v___init__) < 0)) __PYX_ERR(0, 82, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":84
 *         attr['__init__'] = __init__
 * 
 *         class_parents = (Convertible,)             # <<<<<<<<<<<<<<
 * 
 *         return type(class_name, class_parents, attr)
 */
  __Pyx_TraceLine(84,0,__PYX_ERR(0, 84, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Convertible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_class_parents, __pyx_t_6);
  __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":86
 *         class_parents = (Convertible,)
 * 
 *         return type(class_name, class_parents, attr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(86,0,__PYX_ERR(0, 86, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_class_name);
  __Pyx_GIVEREF(__pyx_v_class_name);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_class_name);
  __Pyx_INCREF(__pyx_v_class_parents);
  __Pyx_GIVEREF(__pyx_v_class_parents);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_class_parents);
  __Pyx_INCREF(__pyx_v_attr);
  __Pyx_GIVEREF(__pyx_v_attr);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_attr);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyType_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":67
 * 
 *     """
 *     def __new__(metaclass, class_name, class_parents, class_attr):             # <<<<<<<<<<<<<<
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.Serialisable.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_attr);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v___init__);
  __Pyx_XDECREF(__pyx_v_class_parents);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":95
 *     with ``names``.
 *     """
 *     def __getattr__(self, name):             # <<<<<<<<<<<<<<
 *         if not hasattr(self, "dtype"):
 *             raise AttributeError
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9DTypeAttr_1__getattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9DTypeAttr___getattr__[] = "DTypeAttr.__getattr__(self, name)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9DTypeAttr_1__getattr__ = {"__getattr__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9DTypeAttr_1__getattr__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9DTypeAttr___getattr__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9DTypeAttr_1__getattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getattr__", 1, 2, 2, 1); __PYX_ERR(0, 95, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getattr__") < 0)) __PYX_ERR(0, 95, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_name = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getattr__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 95, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.DTypeAttr.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9DTypeAttr___getattr__(__pyx_self, __pyx_v_self, __pyx_v_name);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9DTypeAttr___getattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__5)
  __Pyx_RefNannySetupContext("__getattr__", 0);
  __Pyx_TraceCall("__getattr__", __pyx_f[0], 95, 0, __PYX_ERR(0, 95, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":96
 *     """
 *     def __getattr__(self, name):
 *         if not hasattr(self, "dtype"):             # <<<<<<<<<<<<<<
 *             raise AttributeError
 *         if name in self.dtype.names:
 */
  __Pyx_TraceLine(96,0,__PYX_ERR(0, 96, __pyx_L1_error))
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 96, __pyx_L1_error)
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":97
 *     def __getattr__(self, name):
 *         if not hasattr(self, "dtype"):
 *             raise AttributeError             # <<<<<<<<<<<<<<
 *         if name in self.dtype.names:
 *             return self._arr[name]
 */
    __Pyx_TraceLine(97,0,__PYX_ERR(0, 97, __pyx_L1_error))
    __Pyx_Raise(__pyx_builtin_AttributeError, 0, 0, 0);
    __PYX_ERR(0, 97, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":96
 *     """
 *     def __getattr__(self, name):
 *         if not hasattr(self, "dtype"):             # <<<<<<<<<<<<<<
 *             raise AttributeError
 *         if name in self.dtype.names:
 */
  }

  /* "km3pipe/dataclasses.pyx":98
 *         if not hasattr(self, "dtype"):
 *             raise AttributeError
 *         if name in self.dtype.names:             # <<<<<<<<<<<<<<
 *             return self._arr[name]
 *         else:
 */
  __Pyx_TraceLine(98,0,__PYX_ERR(0, 98, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":99
 *             raise AttributeError
 *         if name in self.dtype.names:
 *             return self._arr[name]             # <<<<<<<<<<<<<<
 *         else:
 *             raise AttributeError
 */
    __Pyx_TraceLine(99,0,__PYX_ERR(0, 99, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyObject_GetItem(__pyx_t_4, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":98
 *         if not hasattr(self, "dtype"):
 *             raise AttributeError
 *         if name in self.dtype.names:             # <<<<<<<<<<<<<<
 *             return self._arr[name]
 *         else:
 */
  }

  /* "km3pipe/dataclasses.pyx":101
 *             return self._arr[name]
 *         else:
 *             raise AttributeError             # <<<<<<<<<<<<<<
 * 
 *     def sorted(self, by='time'):
 */
  __Pyx_TraceLine(101,0,__PYX_ERR(0, 101, __pyx_L1_error))
  /*else*/ {
    __Pyx_Raise(__pyx_builtin_AttributeError, 0, 0, 0);
    __PYX_ERR(0, 101, __pyx_L1_error)
  }

  /* "km3pipe/dataclasses.pyx":95
 *     with ``names``.
 *     """
 *     def __getattr__(self, name):             # <<<<<<<<<<<<<<
 *         if not hasattr(self, "dtype"):
 *             raise AttributeError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.DTypeAttr.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":103
 *             raise AttributeError
 * 
 *     def sorted(self, by='time'):             # <<<<<<<<<<<<<<
 *         sort_idc = np.argsort(self._arr[by])
 *         return self.__class__(self._arr[sort_idc], self.event_id)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9DTypeAttr_3sorted(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9DTypeAttr_2sorted[] = "DTypeAttr.sorted(self, by='time')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9DTypeAttr_3sorted = {"sorted", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9DTypeAttr_3sorted, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9DTypeAttr_2sorted};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9DTypeAttr_3sorted(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_by = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sorted (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_by,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_time));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_by);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sorted") < 0)) __PYX_ERR(0, 103, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_by = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sorted", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 103, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.DTypeAttr.sorted", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9DTypeAttr_2sorted(__pyx_self, __pyx_v_self, __pyx_v_by);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9DTypeAttr_2sorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_by) {
  PyObject *__pyx_v_sort_idc = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__6)
  __Pyx_RefNannySetupContext("sorted", 0);
  __Pyx_TraceCall("sorted", __pyx_f[0], 103, 0, __PYX_ERR(0, 103, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":104
 * 
 *     def sorted(self, by='time'):
 *         sort_idc = np.argsort(self._arr[by])             # <<<<<<<<<<<<<<
 *         return self.__class__(self._arr[sort_idc], self.event_id)
 * 
 */
  __Pyx_TraceLine(104,0,__PYX_ERR(0, 104, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_argsort); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetItem(__pyx_t_2, __pyx_v_by); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 104, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_sort_idc = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":105
 *     def sorted(self, by='time'):
 *         sort_idc = np.argsort(self._arr[by])
 *         return self.__class__(self._arr[sort_idc], self.event_id)             # <<<<<<<<<<<<<<
 * 
 *     def append_fields(self, fields, values, **kwargs):
 */
  __Pyx_TraceLine(105,0,__PYX_ERR(0, 105, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_GetItem(__pyx_t_5, __pyx_v_sort_idc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_event_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":103
 *             raise AttributeError
 * 
 *     def sorted(self, by='time'):             # <<<<<<<<<<<<<<
 *         sort_idc = np.argsort(self._arr[by])
 *         return self.__class__(self._arr[sort_idc], self.event_id)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.DTypeAttr.sorted", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sort_idc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":107
 *         return self.__class__(self._arr[sort_idc], self.event_id)
 * 
 *     def append_fields(self, fields, values, **kwargs):             # <<<<<<<<<<<<<<
 *         """Uses `numpy.lib.recfunctions.append_fields` to append new fields."""
 *         new_arr = rfn.append_fields(self._arr, fields, values,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9DTypeAttr_5append_fields(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9DTypeAttr_4append_fields[] = "DTypeAttr.append_fields(self, fields, values, **kwargs)\nUses `numpy.lib.recfunctions.append_fields` to append new fields.";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9DTypeAttr_5append_fields = {"append_fields", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9DTypeAttr_5append_fields, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9DTypeAttr_4append_fields};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9DTypeAttr_5append_fields(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_values = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append_fields (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_fields,&__pyx_n_s_values,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fields)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("append_fields", 1, 3, 3, 1); __PYX_ERR(0, 107, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("append_fields", 1, 3, 3, 2); __PYX_ERR(0, 107, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "append_fields") < 0)) __PYX_ERR(0, 107, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_fields = values[1];
    __pyx_v_values = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("append_fields", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 107, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.DTypeAttr.append_fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9DTypeAttr_4append_fields(__pyx_self, __pyx_v_self, __pyx_v_fields, __pyx_v_values, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9DTypeAttr_4append_fields(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fields, PyObject *__pyx_v_values, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_new_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__7)
  __Pyx_RefNannySetupContext("append_fields", 0);
  __Pyx_TraceCall("append_fields", __pyx_f[0], 107, 0, __PYX_ERR(0, 107, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":109
 *     def append_fields(self, fields, values, **kwargs):
 *         """Uses `numpy.lib.recfunctions.append_fields` to append new fields."""
 *         new_arr = rfn.append_fields(self._arr, fields, values,             # <<<<<<<<<<<<<<
 *                                     usemask=False, **kwargs)
 *         self._arr = new_arr
 */
  __Pyx_TraceLine(109,0,__PYX_ERR(0, 109, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_rfn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_append_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_fields);
  __Pyx_GIVEREF(__pyx_v_fields);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_fields);
  __Pyx_INCREF(__pyx_v_values);
  __Pyx_GIVEREF(__pyx_v_values);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_values);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":110
 *         """Uses `numpy.lib.recfunctions.append_fields` to append new fields."""
 *         new_arr = rfn.append_fields(self._arr, fields, values,
 *                                     usemask=False, **kwargs)             # <<<<<<<<<<<<<<
 *         self._arr = new_arr
 *         self.dtype = new_arr.dtype
 */
  __Pyx_TraceLine(110,0,__PYX_ERR(0, 110, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_usemask, Py_False) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_4;
  __pyx_t_4 = 0;
  if (__Pyx_MergeKeywords(__pyx_t_1, __pyx_v_kwargs) < 0) __PYX_ERR(0, 110, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":109
 *     def append_fields(self, fields, values, **kwargs):
 *         """Uses `numpy.lib.recfunctions.append_fields` to append new fields."""
 *         new_arr = rfn.append_fields(self._arr, fields, values,             # <<<<<<<<<<<<<<
 *                                     usemask=False, **kwargs)
 *         self._arr = new_arr
 */
  __Pyx_TraceLine(109,0,__PYX_ERR(0, 109, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_new_arr = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":111
 *         new_arr = rfn.append_fields(self._arr, fields, values,
 *                                     usemask=False, **kwargs)
 *         self._arr = new_arr             # <<<<<<<<<<<<<<
 *         self.dtype = new_arr.dtype
 * 
 */
  __Pyx_TraceLine(111,0,__PYX_ERR(0, 111, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_arr, __pyx_v_new_arr) < 0) __PYX_ERR(0, 111, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":112
 *                                     usemask=False, **kwargs)
 *         self._arr = new_arr
 *         self.dtype = new_arr.dtype             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
  __Pyx_TraceLine(112,0,__PYX_ERR(0, 112, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_arr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":107
 *         return self.__class__(self._arr[sort_idc], self.event_id)
 * 
 *     def append_fields(self, fields, values, **kwargs):             # <<<<<<<<<<<<<<
 *         """Uses `numpy.lib.recfunctions.append_fields` to append new fields."""
 *         new_arr = rfn.append_fields(self._arr, fields, values,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.DTypeAttr.append_fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_new_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":114
 *         self.dtype = new_arr.dtype
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9DTypeAttr_7__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9DTypeAttr_6__array__[] = "DTypeAttr.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9DTypeAttr_7__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9DTypeAttr_7__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9DTypeAttr_6__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9DTypeAttr_7__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9DTypeAttr_6__array__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9DTypeAttr_6__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__8)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 114, 0, __PYX_ERR(0, 114, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":115
 * 
 *     def __array__(self):
 *         return self._arr             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index):
 */
  __Pyx_TraceLine(115,0,__PYX_ERR(0, 115, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":114
 *         self.dtype = new_arr.dtype
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.DTypeAttr.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":117
 *         return self._arr
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         """Preliminary interface for accessing single elements, which
 *         otherwise return a `np.void`"""
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9DTypeAttr_9__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9DTypeAttr_8__getitem__[] = "DTypeAttr.__getitem__(self, index)\nPreliminary interface for accessing single elements, which\n        otherwise return a `np.void`";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9DTypeAttr_9__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9DTypeAttr_9__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9DTypeAttr_8__getitem__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9DTypeAttr_9__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 117, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 117, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 117, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.DTypeAttr.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9DTypeAttr_8__getitem__(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9DTypeAttr_8__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_new = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__9)
  __Pyx_RefNannySetupContext("__getitem__", 0);
  __Pyx_TraceCall("__getitem__", __pyx_f[0], 117, 0, __PYX_ERR(0, 117, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":123
 *         #     element = AttrVoid(self._arr[index])
 *         #     return element
 *         new = self.__class__(self._arr[index])             # <<<<<<<<<<<<<<
 *         new.dtype = self.dtype
 *         return new
 */
  __Pyx_TraceLine(123,0,__PYX_ERR(0, 123, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_new = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":124
 *         #     return element
 *         new = self.__class__(self._arr[index])
 *         new.dtype = self.dtype             # <<<<<<<<<<<<<<
 *         return new
 * 
 */
  __Pyx_TraceLine(124,0,__PYX_ERR(0, 124, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_new, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":125
 *         new = self.__class__(self._arr[index])
 *         new.dtype = self.dtype
 *         return new             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(125,0,__PYX_ERR(0, 125, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_new);
  __pyx_r = __pyx_v_new;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":117
 *         return self._arr
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         """Preliminary interface for accessing single elements, which
 *         otherwise return a `np.void`"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.DTypeAttr.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_new);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":130
 * class AttrVoid(np.ndarray):
 *     """Allow `np.void` instances to access their fields via attributes."""
 *     def __new__(cls, input_array):             # <<<<<<<<<<<<<<
 *         obj = np.asarray(input_array).view(cls)
 *         if obj.dtype.names is not None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8AttrVoid_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_8AttrVoid___new__[] = "AttrVoid.__new__(cls, input_array)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_8AttrVoid_1__new__ = {"__new__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_8AttrVoid_1__new__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_8AttrVoid___new__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8AttrVoid_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_input_array = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_input_array,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input_array)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, 1); __PYX_ERR(0, 130, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) __PYX_ERR(0, 130, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_cls = values[0];
    __pyx_v_input_array = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 130, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.AttrVoid.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_8AttrVoid___new__(__pyx_self, __pyx_v_cls, __pyx_v_input_array);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_8AttrVoid___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_input_array) {
  PyObject *__pyx_v_obj = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  __Pyx_TraceFrameInit(__pyx_codeobj__10)
  __Pyx_RefNannySetupContext("__new__", 0);
  __Pyx_TraceCall("__new__", __pyx_f[0], 130, 0, __PYX_ERR(0, 130, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":131
 *     """Allow `np.void` instances to access their fields via attributes."""
 *     def __new__(cls, input_array):
 *         obj = np.asarray(input_array).view(cls)             # <<<<<<<<<<<<<<
 *         if obj.dtype.names is not None:
 *             for name in obj.dtype.names:
 */
  __Pyx_TraceLine(131,0,__PYX_ERR(0, 131, __pyx_L1_error))
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_input_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_input_array};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_input_array};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_input_array);
      __Pyx_GIVEREF(__pyx_v_input_array);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_input_array);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_view); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_cls};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_cls};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_cls);
      __Pyx_GIVEREF(__pyx_v_cls);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_cls);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_obj = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":132
 *     def __new__(cls, input_array):
 *         obj = np.asarray(input_array).view(cls)
 *         if obj.dtype.names is not None:             # <<<<<<<<<<<<<<
 *             for name in obj.dtype.names:
 *                 setattr(obj, name, obj[name])
 */
  __Pyx_TraceLine(132,0,__PYX_ERR(0, 132, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (__pyx_t_4 != Py_None);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "km3pipe/dataclasses.pyx":133
 *         obj = np.asarray(input_array).view(cls)
 *         if obj.dtype.names is not None:
 *             for name in obj.dtype.names:             # <<<<<<<<<<<<<<
 *                 setattr(obj, name, obj[name])
 *         return obj
 */
    __Pyx_TraceLine(133,0,__PYX_ERR(0, 133, __pyx_L1_error))
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 133, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 133, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 133, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_9(__pyx_t_4);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 133, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "km3pipe/dataclasses.pyx":134
 *         if obj.dtype.names is not None:
 *             for name in obj.dtype.names:
 *                 setattr(obj, name, obj[name])             # <<<<<<<<<<<<<<
 *         return obj
 * 
 */
      __Pyx_TraceLine(134,0,__PYX_ERR(0, 134, __pyx_L1_error))
      __pyx_t_1 = PyObject_GetItem(__pyx_v_obj, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = PyObject_SetAttr(__pyx_v_obj, __pyx_v_name, __pyx_t_1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 134, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "km3pipe/dataclasses.pyx":133
 *         obj = np.asarray(input_array).view(cls)
 *         if obj.dtype.names is not None:
 *             for name in obj.dtype.names:             # <<<<<<<<<<<<<<
 *                 setattr(obj, name, obj[name])
 *         return obj
 */
      __Pyx_TraceLine(133,0,__PYX_ERR(0, 133, __pyx_L1_error))
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":132
 *     def __new__(cls, input_array):
 *         obj = np.asarray(input_array).view(cls)
 *         if obj.dtype.names is not None:             # <<<<<<<<<<<<<<
 *             for name in obj.dtype.names:
 *                 setattr(obj, name, obj[name])
 */
  }

  /* "km3pipe/dataclasses.pyx":135
 *             for name in obj.dtype.names:
 *                 setattr(obj, name, obj[name])
 *         return obj             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(135,0,__PYX_ERR(0, 135, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":130
 * class AttrVoid(np.ndarray):
 *     """Allow `np.void` instances to access their fields via attributes."""
 *     def __new__(cls, input_array):             # <<<<<<<<<<<<<<
 *         obj = np.asarray(input_array).view(cls)
 *         if obj.dtype.names is not None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.AttrVoid.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":141
 *     """Implements basic conversion methods."""
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11Convertible_1deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11Convertible_deserialise[] = "Convertible.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11Convertible_1deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11Convertible_1deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11Convertible_deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11Convertible_1deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 141, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 141, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.Convertible.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11Convertible_deserialise(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11Convertible_deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__11)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 141, 0, __PYX_ERR(0, 141, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":142
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(142,0,__PYX_ERR(0, 142, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":141
 *     """Implements basic conversion methods."""
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.Convertible.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":144
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11Convertible_3serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11Convertible_2serialise[] = "Convertible.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11Convertible_3serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11Convertible_3serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11Convertible_2serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11Convertible_3serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 144, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 144, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.Convertible.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11Convertible_2serialise(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11Convertible_2serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__12)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 144, 0, __PYX_ERR(0, 144, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":145
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(145,0,__PYX_ERR(0, 145, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":144
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.Convertible.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":148
 * 
 *     @classmethod
 *     def conv_from(cls, data, data_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11Convertible_5conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11Convertible_4conv_from[] = "Convertible.conv_from(cls, data, data_id, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11Convertible_5conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11Convertible_5conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11Convertible_4conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11Convertible_5conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_data_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_data_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 1); __PYX_ERR(0, 148, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 2); __PYX_ERR(0, 148, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 148, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_data_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 148, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Convertible.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11Convertible_4conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_data_id, __pyx_v_fmt, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11Convertible_4conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_data_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__13)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 148, 0, __PYX_ERR(0, 148, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":149
 *     @classmethod
 *     def conv_from(cls, data, data_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data[0])
 * 
 */
  __Pyx_TraceLine(149,0,__PYX_ERR(0, 149, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 149, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":150
 *     def conv_from(cls, data, data_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(150,0,__PYX_ERR(0, 150, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_table); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 150, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":149
 *     @classmethod
 *     def conv_from(cls, data, data_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data[0])
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":148
 * 
 *     @classmethod
 *     def conv_from(cls, data, data_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.Convertible.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":152
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11Convertible_7conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11Convertible_6conv_to[] = "Convertible.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11Convertible_7conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11Convertible_7conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11Convertible_6conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11Convertible_7conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 152, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 152, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Convertible.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11Convertible_6conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11Convertible_6conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__14)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 152, 0, __PYX_ERR(0, 152, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":153
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  __Pyx_TraceLine(153,0,__PYX_ERR(0, 153, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 153, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":154
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return self.__array__()             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(154,0,__PYX_ERR(0, 154, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":153
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":155
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(155,0,__PYX_ERR(0, 155, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 155, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":156
 *             return self.__array__()
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_TraceLine(156,0,__PYX_ERR(0, 156, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_t_3) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":155
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":152
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.Convertible.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":171
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_1from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_from_table[] = "SummarysliceInfo.from_table(cls, row)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_1from_table = {"from_table", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_1from_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_from_table};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_1from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_row = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_row,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 2, 2, 1); __PYX_ERR(0, 171, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_table") < 0)) __PYX_ERR(0, 171, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_cls = values[0];
    __pyx_v_row = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_table", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 171, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_from_table(__pyx_self, __pyx_v_cls, __pyx_v_row);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row) {
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_col = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__15)
  __Pyx_RefNannySetupContext("from_table", 0);
  __Pyx_TraceCall("from_table", __pyx_f[0], 171, 0, __PYX_ERR(0, 171, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":172
 *     @classmethod
 *     def from_table(cls, row):
 *         args = []             # <<<<<<<<<<<<<<
 *         for col in cls.dtype.names:
 *             try:
 */
  __Pyx_TraceLine(172,0,__PYX_ERR(0, 172, __pyx_L1_error))
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":173
 *     def from_table(cls, row):
 *         args = []
 *         for col in cls.dtype.names:             # <<<<<<<<<<<<<<
 *             try:
 *                 args.append(row[col])
 */
  __Pyx_TraceLine(173,0,__PYX_ERR(0, 173, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 173, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_col, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "km3pipe/dataclasses.pyx":174
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
    __Pyx_TraceLine(174,0,__PYX_ERR(0, 174, __pyx_L5_error))
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      /*try:*/ {

        /* "km3pipe/dataclasses.pyx":175
 *         for col in cls.dtype.names:
 *             try:
 *                 args.append(row[col])             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 args.append(np.nan)
 */
        __Pyx_TraceLine(175,0,__PYX_ERR(0, 175, __pyx_L5_error))
        __pyx_t_2 = PyObject_GetItem(__pyx_v_row, __pyx_v_col); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 175, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "km3pipe/dataclasses.pyx":174
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
      }
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "km3pipe/dataclasses.pyx":176
 *             try:
 *                 args.append(row[col])
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 args.append(np.nan)
 *         return cls(*args)
 */
      __Pyx_TraceLine(176,0,__PYX_ERR(0, 176, __pyx_L7_except_error))
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_9) {
        __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 176, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GOTREF(__pyx_t_11);

        /* "km3pipe/dataclasses.pyx":177
 *                 args.append(row[col])
 *             except KeyError:
 *                 args.append(np.nan)             # <<<<<<<<<<<<<<
 *         return cls(*args)
 * 
 */
        __Pyx_TraceLine(177,0,__PYX_ERR(0, 177, __pyx_L7_except_error))
        __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 177, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_nan); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 177, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_13); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 177, __pyx_L7_except_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;
      __pyx_L7_except_error:;

      /* "km3pipe/dataclasses.pyx":174
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      goto __pyx_L1_error;
      __pyx_L6_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      __pyx_L12_try_end:;
    }

    /* "km3pipe/dataclasses.pyx":173
 *     def from_table(cls, row):
 *         args = []
 *         for col in cls.dtype.names:             # <<<<<<<<<<<<<<
 *             try:
 *                 args.append(row[col])
 */
    __Pyx_TraceLine(173,0,__PYX_ERR(0, 173, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":178
 *             except KeyError:
 *                 args.append(np.nan)
 *         return cls(*args)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(178,0,__PYX_ERR(0, 178, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_11;
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":171
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_col);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":181
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_3deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_2deserialise[] = "SummarysliceInfo.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_3deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_3deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_2deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_3deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 181, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 181, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_2deserialise(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_2deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__16)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 181, 0, __PYX_ERR(0, 181, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":182
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(182,0,__PYX_ERR(0, 182, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":181
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":184
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_5serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_4serialise[] = "SummarysliceInfo.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_5serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_5serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_4serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_5serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 184, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 184, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_4serialise(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_4serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__17)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 184, 0, __PYX_ERR(0, 184, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":185
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(185,0,__PYX_ERR(0, 185, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":184
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":188
 * 
 *     @classmethod
 *     def conv_from(cls, data, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_7conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_6conv_from[] = "SummarysliceInfo.conv_from(cls, data, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_7conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_7conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_6conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_7conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[3] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 4, 1); __PYX_ERR(0, 188, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 188, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_fmt = values[2];
    __pyx_v_h5loc = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 188, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_6conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_fmt, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_6conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__18)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 188, 0, __PYX_ERR(0, 188, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":189
 *     @classmethod
 *     def conv_from(cls, data, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data[0])
 * 
 */
  __Pyx_TraceLine(189,0,__PYX_ERR(0, 189, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 189, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":190
 *     def conv_from(cls, data, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(190,0,__PYX_ERR(0, 190, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_table); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":189
 *     @classmethod
 *     def conv_from(cls, data, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data[0])
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":188
 * 
 *     @classmethod
 *     def conv_from(cls, data, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":192
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_9conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_8conv_to[] = "SummarysliceInfo.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_9conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_9conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_8conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_9conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 192, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 192, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_8conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_8conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__19)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 192, 0, __PYX_ERR(0, 192, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":193
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  __Pyx_TraceLine(193,0,__PYX_ERR(0, 193, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 193, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":194
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return self.__array__()             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(194,0,__PYX_ERR(0, 194, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":193
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":195
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(195,0,__PYX_ERR(0, 195, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 195, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":196
 *             return self.__array__()
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(196,0,__PYX_ERR(0, 196, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 196, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_t_3) < 0) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":195
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":192
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":198
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             self.det_id, self.frame_index, self.run_id, self.slice_id,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_11__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_10__array__[] = "SummarysliceInfo.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_11__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_11__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_10__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_11__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_10__array__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_10__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__20)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 198, 0, __PYX_ERR(0, 198, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":199
 * 
 *     def __array__(self):
 *         return np.array([(             # <<<<<<<<<<<<<<
 *             self.det_id, self.frame_index, self.run_id, self.slice_id,
 *         ), ], dtype=self.dtype)
 */
  __Pyx_TraceLine(199,0,__PYX_ERR(0, 199, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":200
 *     def __array__(self):
 *         return np.array([(
 *             self.det_id, self.frame_index, self.run_id, self.slice_id,             # <<<<<<<<<<<<<<
 *         ), ], dtype=self.dtype)
 * 
 */
  __Pyx_TraceLine(200,0,__PYX_ERR(0, 200, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_det_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_run_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":199
 * 
 *     def __array__(self):
 *         return np.array([(             # <<<<<<<<<<<<<<
 *             self.det_id, self.frame_index, self.run_id, self.slice_id,
 *         ), ], dtype=self.dtype)
 */
  __Pyx_TraceLine(199,0,__PYX_ERR(0, 199, __pyx_L1_error))
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":201
 *         return np.array([(
 *             self.det_id, self.frame_index, self.run_id, self.slice_id,
 *         ), ], dtype=self.dtype)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(201,0,__PYX_ERR(0, 201, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":199
 * 
 *     def __array__(self):
 *         return np.array([(             # <<<<<<<<<<<<<<
 *             self.det_id, self.frame_index, self.run_id, self.slice_id,
 *         ), ], dtype=self.dtype)
 */
  __Pyx_TraceLine(199,0,__PYX_ERR(0, 199, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":198
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             self.det_id, self.frame_index, self.run_id, self.slice_id,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":203
 *         ), ], dtype=self.dtype)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Summaryslice #{0}:\n" \
 *                "    detector id:     {1}\n" \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_13__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_12__str__[] = "SummarysliceInfo.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_13__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_13__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_12__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_13__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_12__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__21)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 203, 0, __PYX_ERR(0, 203, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":204
 * 
 *     def __str__(self):
 *         return "Summaryslice #{0}:\n" \             # <<<<<<<<<<<<<<
 *                "    detector id:     {1}\n" \
 *                "    frame index:     {2}\n" \
 */
  __Pyx_TraceLine(204,0,__PYX_ERR(0, 204, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":208
 *                "    frame index:     {2}\n" \
 *                "    run id:          {3}\n" \
 *                .format(self.slice_id,             # <<<<<<<<<<<<<<
 *                        self.det_id, self.frame_index, self.run_id,
 *                        )
 */
  __Pyx_TraceLine(208,0,__PYX_ERR(0, 208, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Summaryslice_0_detector_id_1_fra, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "km3pipe/dataclasses.pyx":209
 *                "    run id:          {3}\n" \
 *                .format(self.slice_id,
 *                        self.det_id, self.frame_index, self.run_id,             # <<<<<<<<<<<<<<
 *                        )
 * 
 */
  __Pyx_TraceLine(209,0,__PYX_ERR(0, 209, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_det_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_run_id); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_6);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":203
 *         ), ], dtype=self.dtype)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Summaryslice #{0}:\n" \
 *                "    detector id:     {1}\n" \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":212
 *                        )
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_15__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_14__insp__[] = "SummarysliceInfo.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_15__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_15__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_14__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_15__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_14__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_14__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__22)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 212, 0, __PYX_ERR(0, 212, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":213
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(213,0,__PYX_ERR(0, 213, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":212
 *                        )
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":215
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_17__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_16__len__[] = "SummarysliceInfo.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_17__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_17__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_16SummarysliceInfo_16__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummarysliceInfo_17__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_16__len__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummarysliceInfo_16__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__23)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 215, 0, __PYX_ERR(0, 215, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":216
 * 
 *     def __len__(self):
 *         return 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(216,0,__PYX_ERR(0, 216, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_1);
  __pyx_r = __pyx_int_1;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":215
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummarysliceInfo.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":266
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__1from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__from_table[] = "TimesliceFrameInfo_.from_table(cls, row)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__1from_table = {"from_table", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__1from_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__from_table};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__1from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_row = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_row,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 2, 2, 1); __PYX_ERR(0, 266, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_table") < 0)) __PYX_ERR(0, 266, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_cls = values[0];
    __pyx_v_row = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_table", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 266, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo_.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__from_table(__pyx_self, __pyx_v_cls, __pyx_v_row);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row) {
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_col = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__24)
  __Pyx_RefNannySetupContext("from_table", 0);
  __Pyx_TraceCall("from_table", __pyx_f[0], 266, 0, __PYX_ERR(0, 266, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":267
 *     @classmethod
 *     def from_table(cls, row):
 *         args = []             # <<<<<<<<<<<<<<
 *         for col in cls.dtype.names:
 *             try:
 */
  __Pyx_TraceLine(267,0,__PYX_ERR(0, 267, __pyx_L1_error))
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":268
 *     def from_table(cls, row):
 *         args = []
 *         for col in cls.dtype.names:             # <<<<<<<<<<<<<<
 *             try:
 *                 args.append(row[col])
 */
  __Pyx_TraceLine(268,0,__PYX_ERR(0, 268, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 268, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 268, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 268, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 268, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_col, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "km3pipe/dataclasses.pyx":269
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
    __Pyx_TraceLine(269,0,__PYX_ERR(0, 269, __pyx_L5_error))
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      /*try:*/ {

        /* "km3pipe/dataclasses.pyx":270
 *         for col in cls.dtype.names:
 *             try:
 *                 args.append(row[col])             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 args.append(np.nan)
 */
        __Pyx_TraceLine(270,0,__PYX_ERR(0, 270, __pyx_L5_error))
        __pyx_t_2 = PyObject_GetItem(__pyx_v_row, __pyx_v_col); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 270, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "km3pipe/dataclasses.pyx":269
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
      }
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "km3pipe/dataclasses.pyx":271
 *             try:
 *                 args.append(row[col])
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 args.append(np.nan)
 *         return cls(*args)
 */
      __Pyx_TraceLine(271,0,__PYX_ERR(0, 271, __pyx_L7_except_error))
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_9) {
        __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo_.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 271, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GOTREF(__pyx_t_11);

        /* "km3pipe/dataclasses.pyx":272
 *                 args.append(row[col])
 *             except KeyError:
 *                 args.append(np.nan)             # <<<<<<<<<<<<<<
 *         return cls(*args)
 * 
 */
        __Pyx_TraceLine(272,0,__PYX_ERR(0, 272, __pyx_L7_except_error))
        __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 272, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_nan); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 272, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_13); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 272, __pyx_L7_except_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;
      __pyx_L7_except_error:;

      /* "km3pipe/dataclasses.pyx":269
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      goto __pyx_L1_error;
      __pyx_L6_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      __pyx_L12_try_end:;
    }

    /* "km3pipe/dataclasses.pyx":268
 *     def from_table(cls, row):
 *         args = []
 *         for col in cls.dtype.names:             # <<<<<<<<<<<<<<
 *             try:
 *                 args.append(row[col])
 */
    __Pyx_TraceLine(268,0,__PYX_ERR(0, 268, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":273
 *             except KeyError:
 *                 args.append(np.nan)
 *         return cls(*args)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(273,0,__PYX_ERR(0, 273, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_11;
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":266
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo_.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_col);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":276
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__3deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__2deserialise[] = "TimesliceFrameInfo_.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__3deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__3deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__2deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__3deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 276, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 276, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo_.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__2deserialise(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__2deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__25)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 276, 0, __PYX_ERR(0, 276, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":277
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(277,0,__PYX_ERR(0, 277, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":276
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo_.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":279
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__5serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__4serialise[] = "TimesliceFrameInfo_.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__5serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__5serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__4serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__5serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 279, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 279, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo_.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__4serialise(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__4serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__26)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 279, 0, __PYX_ERR(0, 279, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":280
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(280,0,__PYX_ERR(0, 280, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":279
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo_.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":283
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__7conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__6conv_from[] = "TimesliceFrameInfo_.conv_from(cls, data, frame_id, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__7conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__7conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__6conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__7conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_frame_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_frame_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 1); __PYX_ERR(0, 283, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 2); __PYX_ERR(0, 283, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 283, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_frame_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 283, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo_.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__6conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_frame_id, __pyx_v_fmt, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__6conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_frame_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__27)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 283, 0, __PYX_ERR(0, 283, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":284
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data[0])
 * 
 */
  __Pyx_TraceLine(284,0,__PYX_ERR(0, 284, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 284, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":285
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(285,0,__PYX_ERR(0, 285, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_table); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 285, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":284
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data[0])
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":283
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo_.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":287
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__9conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__8conv_to[] = "TimesliceFrameInfo_.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__9conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__9conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__8conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__9conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 287, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 287, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo_.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__8conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__8conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__28)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 287, 0, __PYX_ERR(0, 287, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":288
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  __Pyx_TraceLine(288,0,__PYX_ERR(0, 288, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 288, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":289
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return self.__array__()             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(289,0,__PYX_ERR(0, 289, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":288
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":290
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(290,0,__PYX_ERR(0, 290, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 290, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":291
 *             return self.__array__()
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(291,0,__PYX_ERR(0, 291, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 291, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_t_3) < 0) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":290
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":287
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo_.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":293
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__11__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__10__array__[] = "TimesliceFrameInfo_.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__11__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__11__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__10__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__11__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__10__array__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__10__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__29)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 293, 0, __PYX_ERR(0, 293, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":294
 * 
 *     def __array__(self):
 *         return np.array([(             # <<<<<<<<<<<<<<
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,
 */
  __Pyx_TraceLine(294,0,__PYX_ERR(0, 294, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":295
 *     def __array__(self):
 *         return np.array([(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,             # <<<<<<<<<<<<<<
 *             self.has_udp_trailer, self.high_rate_veto,
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 */
  __Pyx_TraceLine(295,0,__PYX_ERR(0, 295, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fifo_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":296
 *         return np.array([(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,             # <<<<<<<<<<<<<<
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 *             self.utc_nanoseconds, self.utc_seconds, self.white_rabbit_status
 */
  __Pyx_TraceLine(296,0,__PYX_ERR(0, 296, __pyx_L1_error))
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_udp_trailer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_high_rate_veto); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":297
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,
 *             self.max_sequence_number, self.n_packets, self.slice_id,             # <<<<<<<<<<<<<<
 *             self.utc_nanoseconds, self.utc_seconds, self.white_rabbit_status
 *         ), ], dtype=self.dtype)
 */
  __Pyx_TraceLine(297,0,__PYX_ERR(0, 297, __pyx_L1_error))
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_sequence_number); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_n_packets); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "km3pipe/dataclasses.pyx":298
 *             self.has_udp_trailer, self.high_rate_veto,
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 *             self.utc_nanoseconds, self.utc_seconds, self.white_rabbit_status             # <<<<<<<<<<<<<<
 *         ), ], dtype=self.dtype)
 * 
 */
  __Pyx_TraceLine(298,0,__PYX_ERR(0, 298, __pyx_L1_error))
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_utc_nanoseconds); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_utc_seconds); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_white_rabbit_status); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);

  /* "km3pipe/dataclasses.pyx":295
 *     def __array__(self):
 *         return np.array([(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,             # <<<<<<<<<<<<<<
 *             self.has_udp_trailer, self.high_rate_veto,
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 */
  __Pyx_TraceLine(295,0,__PYX_ERR(0, 295, __pyx_L1_error))
  __pyx_t_14 = PyTuple_New(12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_14, 5, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_14, 6, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_14, 7, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_14, 8, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_14, 9, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_14, 10, __pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_13);
  PyTuple_SET_ITEM(__pyx_t_14, 11, __pyx_t_13);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __pyx_t_10 = 0;
  __pyx_t_11 = 0;
  __pyx_t_12 = 0;
  __pyx_t_13 = 0;

  /* "km3pipe/dataclasses.pyx":294
 * 
 *     def __array__(self):
 *         return np.array([(             # <<<<<<<<<<<<<<
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,
 */
  __Pyx_TraceLine(294,0,__PYX_ERR(0, 294, __pyx_L1_error))
  __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_GIVEREF(__pyx_t_14);
  PyList_SET_ITEM(__pyx_t_13, 0, __pyx_t_14);
  __pyx_t_14 = 0;
  __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_GIVEREF(__pyx_t_13);
  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13);
  __pyx_t_13 = 0;

  /* "km3pipe/dataclasses.pyx":299
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 *             self.utc_nanoseconds, self.utc_seconds, self.white_rabbit_status
 *         ), ], dtype=self.dtype)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(299,0,__PYX_ERR(0, 299, __pyx_L1_error))
  __pyx_t_13 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_12) < 0) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "km3pipe/dataclasses.pyx":294
 * 
 *     def __array__(self):
 *         return np.array([(             # <<<<<<<<<<<<<<
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,
 */
  __Pyx_TraceLine(294,0,__PYX_ERR(0, 294, __pyx_L1_error))
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_14, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_r = __pyx_t_12;
  __pyx_t_12 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":293
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo_.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":301
 *         ), ], dtype=self.dtype)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Timeslice frame:\n" \
 *                "    slice id: {0}\n" \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__13__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__12__str__[] = "TimesliceFrameInfo_.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__13__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__13__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__12__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__13__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__12__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__30)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 301, 0, __PYX_ERR(0, 301, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":302
 * 
 *     def __str__(self):
 *         return "Timeslice frame:\n" \             # <<<<<<<<<<<<<<
 *                "    slice id: {0}\n" \
 *                "    frame id: {1}\n" \
 */
  __Pyx_TraceLine(302,0,__PYX_ERR(0, 302, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":307
 *                "    DOM id:   {2}\n" \
 *                "    UDP packets: {3}/{4}\n" \
 *                .format(self.slice_id, self.frame_id, self.dom_id,             # <<<<<<<<<<<<<<
 *                        self.n_packets,
 *                        self.max_sequence_number)
 */
  __Pyx_TraceLine(307,0,__PYX_ERR(0, 307, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Timeslice_frame_slice_id_0_frame, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":308
 *                "    UDP packets: {3}/{4}\n" \
 *                .format(self.slice_id, self.frame_id, self.dom_id,
 *                        self.n_packets,             # <<<<<<<<<<<<<<
 *                        self.max_sequence_number)
 * 
 */
  __Pyx_TraceLine(308,0,__PYX_ERR(0, 308, __pyx_L1_error))
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_n_packets); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":309
 *                .format(self.slice_id, self.frame_id, self.dom_id,
 *                        self.n_packets,
 *                        self.max_sequence_number)             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(309,0,__PYX_ERR(0, 309, __pyx_L1_error))
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_sequence_number); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 5+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 5+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(5+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_9, __pyx_t_7);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":301
 *         ), ], dtype=self.dtype)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Timeslice frame:\n" \
 *                "    slice id: {0}\n" \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo_.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":311
 *                        self.max_sequence_number)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__15__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__14__insp__[] = "TimesliceFrameInfo_.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__15__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__15__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__14__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__15__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__14__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__14__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__31)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 311, 0, __PYX_ERR(0, 311, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":312
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(312,0,__PYX_ERR(0, 312, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":311
 *                        self.max_sequence_number)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo_.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":314
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__17__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__16__len__[] = "TimesliceFrameInfo_.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__17__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__17__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_19TimesliceFrameInfo__16__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_19TimesliceFrameInfo__17__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__16__len__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_19TimesliceFrameInfo__16__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__32)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 314, 0, __PYX_ERR(0, 314, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":315
 * 
 *     def __len__(self):
 *         return 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(315,0,__PYX_ERR(0, 315, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_1);
  __pyx_r = __pyx_int_1;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":314
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceFrameInfo_.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":338
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_1from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_from_table[] = "SummaryframeInfo.from_table(cls, row)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_1from_table = {"from_table", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_1from_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_from_table};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_1from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_row = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_row,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 2, 2, 1); __PYX_ERR(0, 338, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_table") < 0)) __PYX_ERR(0, 338, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_cls = values[0];
    __pyx_v_row = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_table", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 338, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_from_table(__pyx_self, __pyx_v_cls, __pyx_v_row);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row) {
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_col = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__33)
  __Pyx_RefNannySetupContext("from_table", 0);
  __Pyx_TraceCall("from_table", __pyx_f[0], 338, 0, __PYX_ERR(0, 338, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":339
 *     @classmethod
 *     def from_table(cls, row):
 *         args = []             # <<<<<<<<<<<<<<
 *         for col in cls.dtype.names:
 *             try:
 */
  __Pyx_TraceLine(339,0,__PYX_ERR(0, 339, __pyx_L1_error))
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":340
 *     def from_table(cls, row):
 *         args = []
 *         for col in cls.dtype.names:             # <<<<<<<<<<<<<<
 *             try:
 *                 args.append(row[col])
 */
  __Pyx_TraceLine(340,0,__PYX_ERR(0, 340, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 340, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 340, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 340, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 340, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 340, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_col, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "km3pipe/dataclasses.pyx":341
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
    __Pyx_TraceLine(341,0,__PYX_ERR(0, 341, __pyx_L5_error))
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      /*try:*/ {

        /* "km3pipe/dataclasses.pyx":342
 *         for col in cls.dtype.names:
 *             try:
 *                 args.append(row[col])             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 args.append(np.nan)
 */
        __Pyx_TraceLine(342,0,__PYX_ERR(0, 342, __pyx_L5_error))
        __pyx_t_2 = PyObject_GetItem(__pyx_v_row, __pyx_v_col); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 342, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "km3pipe/dataclasses.pyx":341
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
      }
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "km3pipe/dataclasses.pyx":343
 *             try:
 *                 args.append(row[col])
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 args.append(np.nan)
 *         return cls(*args)
 */
      __Pyx_TraceLine(343,0,__PYX_ERR(0, 343, __pyx_L7_except_error))
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_9) {
        __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 343, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GOTREF(__pyx_t_11);

        /* "km3pipe/dataclasses.pyx":344
 *                 args.append(row[col])
 *             except KeyError:
 *                 args.append(np.nan)             # <<<<<<<<<<<<<<
 *         return cls(*args)
 * 
 */
        __Pyx_TraceLine(344,0,__PYX_ERR(0, 344, __pyx_L7_except_error))
        __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 344, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_nan); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 344, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_t_13); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 344, __pyx_L7_except_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;
      __pyx_L7_except_error:;

      /* "km3pipe/dataclasses.pyx":341
 *         args = []
 *         for col in cls.dtype.names:
 *             try:             # <<<<<<<<<<<<<<
 *                 args.append(row[col])
 *             except KeyError:
 */
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      goto __pyx_L1_error;
      __pyx_L6_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      __pyx_L12_try_end:;
    }

    /* "km3pipe/dataclasses.pyx":340
 *     def from_table(cls, row):
 *         args = []
 *         for col in cls.dtype.names:             # <<<<<<<<<<<<<<
 *             try:
 *                 args.append(row[col])
 */
    __Pyx_TraceLine(340,0,__PYX_ERR(0, 340, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":345
 *             except KeyError:
 *                 args.append(np.nan)
 *         return cls(*args)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(345,0,__PYX_ERR(0, 345, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_11;
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":338
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_col);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":348
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_3deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_2deserialise[] = "SummaryframeInfo.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_3deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_3deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_2deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_3deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 348, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 348, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_2deserialise(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_2deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__34)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 348, 0, __PYX_ERR(0, 348, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":349
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(349,0,__PYX_ERR(0, 349, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":348
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":351
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_5serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_4serialise[] = "SummaryframeInfo.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_5serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_5serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_4serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_5serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 351, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 351, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_4serialise(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_4serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__35)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 351, 0, __PYX_ERR(0, 351, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":352
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(352,0,__PYX_ERR(0, 352, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":351
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":355
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_7conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_6conv_from[] = "SummaryframeInfo.conv_from(cls, data, frame_id, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_7conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_7conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_6conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_7conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_frame_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_frame_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 1); __PYX_ERR(0, 355, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 2); __PYX_ERR(0, 355, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 355, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_frame_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 355, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_6conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_frame_id, __pyx_v_fmt, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_6conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_frame_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__36)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 355, 0, __PYX_ERR(0, 355, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":356
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data[0])
 * 
 */
  __Pyx_TraceLine(356,0,__PYX_ERR(0, 356, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 356, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":357
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(357,0,__PYX_ERR(0, 357, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_table); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 357, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":356
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data[0])
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":355
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":359
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_9conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_8conv_to[] = "SummaryframeInfo.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_9conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_9conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_8conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_9conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 359, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 359, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_8conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_8conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__37)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 359, 0, __PYX_ERR(0, 359, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":360
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  __Pyx_TraceLine(360,0,__PYX_ERR(0, 360, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 360, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":361
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return self.__array__()             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(361,0,__PYX_ERR(0, 361, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":360
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":362
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(362,0,__PYX_ERR(0, 362, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 362, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":363
 *             return self.__array__()
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(363,0,__PYX_ERR(0, 363, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 363, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_t_3) < 0) __PYX_ERR(0, 363, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":362
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":359
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":365
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_11__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_10__array__[] = "SummaryframeInfo.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_11__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_11__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_10__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_11__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_10__array__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_10__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__38)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 365, 0, __PYX_ERR(0, 365, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":366
 * 
 *     def __array__(self):
 *         return np.array([(             # <<<<<<<<<<<<<<
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,
 */
  __Pyx_TraceLine(366,0,__PYX_ERR(0, 366, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":367
 *     def __array__(self):
 *         return np.array([(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,             # <<<<<<<<<<<<<<
 *             self.has_udp_trailer, self.high_rate_veto,
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 */
  __Pyx_TraceLine(367,0,__PYX_ERR(0, 367, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fifo_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":368
 *         return np.array([(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,             # <<<<<<<<<<<<<<
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 *             self.utc_nanoseconds, self.utc_seconds, self.white_rabbit_status
 */
  __Pyx_TraceLine(368,0,__PYX_ERR(0, 368, __pyx_L1_error))
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_udp_trailer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_high_rate_veto); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":369
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,
 *             self.max_sequence_number, self.n_packets, self.slice_id,             # <<<<<<<<<<<<<<
 *             self.utc_nanoseconds, self.utc_seconds, self.white_rabbit_status
 *         )], dtype=self.dtype)
 */
  __Pyx_TraceLine(369,0,__PYX_ERR(0, 369, __pyx_L1_error))
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_sequence_number); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_n_packets); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "km3pipe/dataclasses.pyx":370
 *             self.has_udp_trailer, self.high_rate_veto,
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 *             self.utc_nanoseconds, self.utc_seconds, self.white_rabbit_status             # <<<<<<<<<<<<<<
 *         )], dtype=self.dtype)
 * 
 */
  __Pyx_TraceLine(370,0,__PYX_ERR(0, 370, __pyx_L1_error))
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_utc_nanoseconds); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_utc_seconds); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_white_rabbit_status); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);

  /* "km3pipe/dataclasses.pyx":367
 *     def __array__(self):
 *         return np.array([(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,             # <<<<<<<<<<<<<<
 *             self.has_udp_trailer, self.high_rate_veto,
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 */
  __Pyx_TraceLine(367,0,__PYX_ERR(0, 367, __pyx_L1_error))
  __pyx_t_14 = PyTuple_New(12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_14, 5, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_14, 6, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_14, 7, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_14, 8, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_14, 9, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_14, 10, __pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_13);
  PyTuple_SET_ITEM(__pyx_t_14, 11, __pyx_t_13);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __pyx_t_10 = 0;
  __pyx_t_11 = 0;
  __pyx_t_12 = 0;
  __pyx_t_13 = 0;

  /* "km3pipe/dataclasses.pyx":366
 * 
 *     def __array__(self):
 *         return np.array([(             # <<<<<<<<<<<<<<
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,
 */
  __Pyx_TraceLine(366,0,__PYX_ERR(0, 366, __pyx_L1_error))
  __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_GIVEREF(__pyx_t_14);
  PyList_SET_ITEM(__pyx_t_13, 0, __pyx_t_14);
  __pyx_t_14 = 0;
  __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_GIVEREF(__pyx_t_13);
  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13);
  __pyx_t_13 = 0;

  /* "km3pipe/dataclasses.pyx":371
 *             self.max_sequence_number, self.n_packets, self.slice_id,
 *             self.utc_nanoseconds, self.utc_seconds, self.white_rabbit_status
 *         )], dtype=self.dtype)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(371,0,__PYX_ERR(0, 371, __pyx_L1_error))
  __pyx_t_13 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_12) < 0) __PYX_ERR(0, 371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "km3pipe/dataclasses.pyx":366
 * 
 *     def __array__(self):
 *         return np.array([(             # <<<<<<<<<<<<<<
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 *             self.has_udp_trailer, self.high_rate_veto,
 */
  __Pyx_TraceLine(366,0,__PYX_ERR(0, 366, __pyx_L1_error))
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_14, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_r = __pyx_t_12;
  __pyx_t_12 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":365
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":373
 *         )], dtype=self.dtype)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Summaryslice frame #{0}:\n" \
 *                "    slice id:    {1}\n" \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_13__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_12__str__[] = "SummaryframeInfo.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_13__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_13__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_12__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_13__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_12__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__39)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 373, 0, __PYX_ERR(0, 373, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":374
 * 
 *     def __str__(self):
 *         return "Summaryslice frame #{0}:\n" \             # <<<<<<<<<<<<<<
 *                "    slice id:    {1}\n" \
 *                "    DOM id:      {2}\n" \
 */
  __Pyx_TraceLine(374,0,__PYX_ERR(0, 374, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":378
 *                "    DOM id:      {2}\n" \
 *                "    UDP packets: {3}/{4}\n" \
 *                .format(self, self.frame_id, self.slice_id, self.dom_id,             # <<<<<<<<<<<<<<
 *                        self.n_packets,
 *                        self.max_sequence_number)
 */
  __Pyx_TraceLine(378,0,__PYX_ERR(0, 378, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Summaryslice_frame_0_slice_id_1, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":379
 *                "    UDP packets: {3}/{4}\n" \
 *                .format(self, self.frame_id, self.slice_id, self.dom_id,
 *                        self.n_packets,             # <<<<<<<<<<<<<<
 *                        self.max_sequence_number)
 * 
 */
  __Pyx_TraceLine(379,0,__PYX_ERR(0, 379, __pyx_L1_error))
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_n_packets); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":380
 *                .format(self, self.frame_id, self.slice_id, self.dom_id,
 *                        self.n_packets,
 *                        self.max_sequence_number)             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(380,0,__PYX_ERR(0, 380, __pyx_L1_error))
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_sequence_number); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_8, __pyx_v_self, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 6+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_8, __pyx_v_self, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 6+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(6+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 5+__pyx_t_9, __pyx_t_7);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":373
 *         )], dtype=self.dtype)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Summaryslice frame #{0}:\n" \
 *                "    slice id:    {1}\n" \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":382
 *                        self.max_sequence_number)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_15__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_14__insp__[] = "SummaryframeInfo.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_15__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_15__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_14__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_15__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_14__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_14__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__40)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 382, 0, __PYX_ERR(0, 382, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":383
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(383,0,__PYX_ERR(0, 383, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":382
 *                        self.max_sequence_number)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":385
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_17__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_16__len__[] = "SummaryframeInfo.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_17__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_17__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_16SummaryframeInfo_16__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_16SummaryframeInfo_17__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_16__len__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_16SummaryframeInfo_16__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__41)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 385, 0, __PYX_ERR(0, 385, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":386
 * 
 *     def __len__(self):
 *         return 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(386,0,__PYX_ERR(0, 386, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_1);
  __pyx_r = __pyx_int_1;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":385
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeInfo.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":413
 *     ])
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         assert 'run_id' in arr.dtype.fields
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo___init__[] = "EventInfo.__init__(self, arr, h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9EventInfo___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_arr_2,&__pyx_n_s_h5loc,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 413, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 413, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_arr = values[1];
    __pyx_v_h5loc = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 413, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo___init__(__pyx_self, __pyx_v_self, __pyx_v_arr, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_v_col = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  __Pyx_TraceFrameInit(__pyx_codeobj__42)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 413, 0, __PYX_ERR(0, 413, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":414
 * 
 *     def __init__(self, arr, h5loc='/'):
 *         assert 'run_id' in arr.dtype.fields             # <<<<<<<<<<<<<<
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)
 *         for col in self.dtype.names:
 */
  __Pyx_TraceLine(414,0,__PYX_ERR(0, 414, __pyx_L1_error))
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_run_id, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 414, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!(__pyx_t_3 != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 414, __pyx_L1_error)
    }
  }
  #endif

  /* "km3pipe/dataclasses.pyx":415
 *     def __init__(self, arr, h5loc='/'):
 *         assert 'run_id' in arr.dtype.fields
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)             # <<<<<<<<<<<<<<
 *         for col in self.dtype.names:
 *             setattr(self, col, self._arr[col])
 */
  __Pyx_TraceLine(415,0,__PYX_ERR(0, 415, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_arr);
  __Pyx_GIVEREF(__pyx_v_arr);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_arr);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_arr, __pyx_t_5) < 0) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":416
 *         assert 'run_id' in arr.dtype.fields
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)
 *         for col in self.dtype.names:             # <<<<<<<<<<<<<<
 *             setattr(self, col, self._arr[col])
 *         self.h5loc = h5loc
 */
  __Pyx_TraceLine(416,0,__PYX_ERR(0, 416, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 416, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 416, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 416, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_7(__pyx_t_5);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 416, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_col, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":417
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)
 *         for col in self.dtype.names:
 *             setattr(self, col, self._arr[col])             # <<<<<<<<<<<<<<
 *         self.h5loc = h5loc
 * 
 */
    __Pyx_TraceLine(417,0,__PYX_ERR(0, 417, __pyx_L1_error))
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_GetItem(__pyx_t_4, __pyx_v_col); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = PyObject_SetAttr(__pyx_v_self, __pyx_v_col, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "km3pipe/dataclasses.pyx":416
 *         assert 'run_id' in arr.dtype.fields
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)
 *         for col in self.dtype.names:             # <<<<<<<<<<<<<<
 *             setattr(self, col, self._arr[col])
 *         self.h5loc = h5loc
 */
    __Pyx_TraceLine(416,0,__PYX_ERR(0, 416, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":418
 *         for col in self.dtype.names:
 *             setattr(self, col, self._arr[col])
 *         self.h5loc = h5loc             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(418,0,__PYX_ERR(0, 418, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 418, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":413
 *     ])
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         assert 'run_id' in arr.dtype.fields
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_col);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":421
 * 
 *     @classmethod
 *     def from_row(cls, row, **kwargs):             # <<<<<<<<<<<<<<
 *         args = tuple((row[col] for col in cls.dtype.names))
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_3from_row(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_2from_row[] = "EventInfo.from_row(cls, row, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_3from_row = {"from_row", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_3from_row, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_2from_row};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_3from_row(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_row = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_row (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_row,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_row", 1, 2, 2, 1); __PYX_ERR(0, 421, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "from_row") < 0)) __PYX_ERR(0, 421, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_cls = values[0];
    __pyx_v_row = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_row", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 421, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.from_row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_2from_row(__pyx_self, __pyx_v_cls, __pyx_v_row, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7km3pipe_11dataclasses_9EventInfo_8from_row_2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "km3pipe/dataclasses.pyx":422
 *     @classmethod
 *     def from_row(cls, row, **kwargs):
 *         args = tuple((row[col] for col in cls.dtype.names))             # <<<<<<<<<<<<<<
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 * 
 */

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_8from_row_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *)__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr(__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 422, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7km3pipe_11dataclasses_9EventInfo_8from_row_2generator3, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_EventInfo_from_row_locals_genexp, __pyx_n_s_km3pipe_dataclasses); if (unlikely(!gen)) __PYX_ERR(0, 422, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.from_row.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7km3pipe_11dataclasses_9EventInfo_8from_row_2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 422, 0, __PYX_ERR(0, 422, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 422, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_cls)) { __Pyx_RaiseClosureNameError("cls"); __PYX_ERR(0, 422, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 422, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 422, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_col);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_col, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_row)) { __Pyx_RaiseClosureNameError("row"); __PYX_ERR(0, 422, __pyx_L1_error) }
    __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_row, __pyx_cur_scope->__pyx_v_col); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_TraceReturn(__pyx_r, 0);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 422, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":421
 * 
 *     @classmethod
 *     def from_row(cls, row, **kwargs):             # <<<<<<<<<<<<<<
 *         args = tuple((row[col] for col in cls.dtype.names))
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 */

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_2from_row(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_row, PyObject *__pyx_v_kwargs) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *__pyx_cur_scope;
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__44)
  __Pyx_RefNannySetupContext("from_row", 0);
  __pyx_cur_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *)__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct__from_row(__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct__from_row, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 421, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("from_row", __pyx_f[0], 421, 0, __PYX_ERR(0, 421, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_cls = __pyx_v_cls;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cls);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_cls);
  __pyx_cur_scope->__pyx_v_row = __pyx_v_row;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_row);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_row);

  /* "km3pipe/dataclasses.pyx":422
 *     @classmethod
 *     def from_row(cls, row, **kwargs):
 *         args = tuple((row[col] for col in cls.dtype.names))             # <<<<<<<<<<<<<<
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 * 
 */
  __Pyx_TraceLine(422,0,__PYX_ERR(0, 422, __pyx_L1_error))
  __pyx_t_1 = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_8from_row_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_args = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":423
 *     def from_row(cls, row, **kwargs):
 *         args = tuple((row[col] for col in cls.dtype.names))
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(423,0,__PYX_ERR(0, 423, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_args);
  __Pyx_GIVEREF(__pyx_v_args);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_args);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_cls, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":421
 * 
 *     @classmethod
 *     def from_row(cls, row, **kwargs):             # <<<<<<<<<<<<<<
 *         args = tuple((row[col] for col in cls.dtype.names))
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.from_row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":426
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_5deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_4deserialise[] = "EventInfo.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_5deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_5deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_4deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_5deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 426, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 426, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_4deserialise(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_4deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__45)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 426, 0, __PYX_ERR(0, 426, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":427
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(427,0,__PYX_ERR(0, 427, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":426
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":429
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_7serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_6serialise[] = "EventInfo.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_7serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_7serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_6serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_7serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 429, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 429, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_6serialise(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_6serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__46)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 429, 0, __PYX_ERR(0, 429, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":430
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(430,0,__PYX_ERR(0, 430, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":429
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":433
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_row(data, **kwargs)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_9conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_8conv_from[] = "EventInfo.conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_9conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_9conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_8conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_9conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_event_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 1); __PYX_ERR(0, 433, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 2); __PYX_ERR(0, 433, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 433, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 433, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_8conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_event_id, __pyx_v_fmt, __pyx_v_h5loc, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_8conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__47)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 433, 0, __PYX_ERR(0, 433, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":434
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_row(data, **kwargs)
 * 
 */
  __Pyx_TraceLine(434,0,__PYX_ERR(0, 434, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 434, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":435
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs):
 *         if fmt == 'numpy':
 *             return cls.from_row(data, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 */
    __Pyx_TraceLine(435,0,__PYX_ERR(0, 435, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_row); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":434
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_row(data, **kwargs)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":433
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_row(data, **kwargs)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":437
 *             return cls.from_row(data, **kwargs)
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_11conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_10conv_to[] = "EventInfo.conv_to(self, to='numpy', **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_11conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_11conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_10conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_11conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 437, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 437, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_10conv_to(__pyx_self, __pyx_v_self, __pyx_v_to, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_10conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__48)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 437, 0, __PYX_ERR(0, 437, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":438
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  __Pyx_TraceLine(438,0,__PYX_ERR(0, 438, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 438, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":439
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':
 *             return self.__array__()             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc,
 */
    __Pyx_TraceLine(439,0,__PYX_ERR(0, 439, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 439, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 439, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":438
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":440
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc,
 *                                 **kwargs)
 */
  __Pyx_TraceLine(440,0,__PYX_ERR(0, 440, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 440, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":441
 *             return self.__array__()
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc,             # <<<<<<<<<<<<<<
 *                                 **kwargs)
 * 
 */
    __Pyx_TraceLine(441,0,__PYX_ERR(0, 441, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_h5loc, __pyx_t_6) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "km3pipe/dataclasses.pyx":442
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc,
 *                                 **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(442,0,__PYX_ERR(0, 442, __pyx_L1_error))
    if (__Pyx_MergeKeywords(__pyx_t_5, __pyx_v_kwargs) < 0) __PYX_ERR(0, 442, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":441
 *             return self.__array__()
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc,             # <<<<<<<<<<<<<<
 *                                 **kwargs)
 * 
 */
    __Pyx_TraceLine(441,0,__PYX_ERR(0, 441, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":440
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc,
 *                                 **kwargs)
 */
  }

  /* "km3pipe/dataclasses.pyx":437
 *             return cls.from_row(data, **kwargs)
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":444
 *                                 **kwargs)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_13__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_12__array__[] = "EventInfo.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_13__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_13__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_12__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_13__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_12__array__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_12__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__49)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 444, 0, __PYX_ERR(0, 444, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":445
 * 
 *     def __array__(self):
 *         return self._arr             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(445,0,__PYX_ERR(0, 445, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":444
 *                                 **kwargs)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":447
 *         return self._arr
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Event #{0}:\n" \
 *                "    run id:          {10}\n" \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_15__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_14__str__[] = "EventInfo.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_15__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_15__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_14__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_15__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_14__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_14__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__50)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 447, 0, __PYX_ERR(0, 447, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":448
 * 
 *     def __str__(self):
 *         return "Event #{0}:\n" \             # <<<<<<<<<<<<<<
 *                "    run id:          {10}\n" \
 *                "    detector id:     {1}\n" \
 */
  __Pyx_TraceLine(448,0,__PYX_ERR(0, 448, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":459
 *                "    trigger counter: {8}\n" \
 *                "    trigger mask:    {9}" \
 *                .format(self.event_id, self.det_id,             # <<<<<<<<<<<<<<
 *                        self.frame_index, self.utc_seconds,
 *                        self.utc_nanoseconds, self.mc_id, self.mc_t,
 */
  __Pyx_TraceLine(459,0,__PYX_ERR(0, 459, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Event_0_run_id_10_detector_id_1, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_event_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_det_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":460
 *                "    trigger mask:    {9}" \
 *                .format(self.event_id, self.det_id,
 *                        self.frame_index, self.utc_seconds,             # <<<<<<<<<<<<<<
 *                        self.utc_nanoseconds, self.mc_id, self.mc_t,
 *                        self.overlays, self.trigger_counter, self.trigger_mask,
 */
  __Pyx_TraceLine(460,0,__PYX_ERR(0, 460, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_utc_seconds); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":461
 *                .format(self.event_id, self.det_id,
 *                        self.frame_index, self.utc_seconds,
 *                        self.utc_nanoseconds, self.mc_id, self.mc_t,             # <<<<<<<<<<<<<<
 *                        self.overlays, self.trigger_counter, self.trigger_mask,
 *                        self.run_id,
 */
  __Pyx_TraceLine(461,0,__PYX_ERR(0, 461, __pyx_L1_error))
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_utc_nanoseconds); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mc_id); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mc_t); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "km3pipe/dataclasses.pyx":462
 *                        self.frame_index, self.utc_seconds,
 *                        self.utc_nanoseconds, self.mc_id, self.mc_t,
 *                        self.overlays, self.trigger_counter, self.trigger_mask,             # <<<<<<<<<<<<<<
 *                        self.run_id,
 *                        )
 */
  __Pyx_TraceLine(462,0,__PYX_ERR(0, 462, __pyx_L1_error))
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_overlays); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trigger_counter); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trigger_mask); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "km3pipe/dataclasses.pyx":463
 *                        self.utc_nanoseconds, self.mc_id, self.mc_t,
 *                        self.overlays, self.trigger_counter, self.trigger_mask,
 *                        self.run_id,             # <<<<<<<<<<<<<<
 *                        )
 * 
 */
  __Pyx_TraceLine(463,0,__PYX_ERR(0, 463, __pyx_L1_error))
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_run_id); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_14 = NULL;
  __pyx_t_15 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_14)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_15 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[12] = {__pyx_t_14, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_15, 11+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[12] = {__pyx_t_14, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_15, 11+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  {
    __pyx_t_16 = PyTuple_New(11+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    if (__pyx_t_14) {
      __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_14); __pyx_t_14 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_15, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_16, 3+__pyx_t_15, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_16, 4+__pyx_t_15, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_16, 5+__pyx_t_15, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_16, 6+__pyx_t_15, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_16, 7+__pyx_t_15, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_16, 8+__pyx_t_15, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_16, 9+__pyx_t_15, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_16, 10+__pyx_t_15, __pyx_t_13);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    __pyx_t_12 = 0;
    __pyx_t_13 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":447
 *         return self._arr
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Event #{0}:\n" \
 *                "    run id:          {10}\n" \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":466
 *                        )
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_17__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_16__repr__[] = "EventInfo.__repr__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_17__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_17__repr__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_16__repr__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_17__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_16__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_16__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__51)
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 466, 0, __PYX_ERR(0, 466, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":467
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(467,0,__PYX_ERR(0, 467, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":466
 *                        )
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":469
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_19__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_18__insp__[] = "EventInfo.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_19__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_19__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_18__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_19__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_18__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_18__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__52)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 469, 0, __PYX_ERR(0, 469, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":470
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(470,0,__PYX_ERR(0, 470, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":469
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":472
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_21__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9EventInfo_20__len__[] = "EventInfo.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9EventInfo_21__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9EventInfo_21__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9EventInfo_20__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9EventInfo_21__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9EventInfo_20__len__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9EventInfo_20__len__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__53)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 472, 0, __PYX_ERR(0, 472, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":473
 * 
 *     def __len__(self):
 *         return 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(473,0,__PYX_ERR(0, 473, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_1);
  __pyx_r = __pyx_int_1;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":472
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.EventInfo.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":478
 * class Point(np.ndarray):
 *     """Represents a point in a 3D space"""
 *     def __new__(cls, input_array=(np.nan, np.nan, np.nan)):             # <<<<<<<<<<<<<<
 *         """Add x, y and z to the ndarray"""
 *         obj = np.asarray(input_array).view(cls)
 */

static PyObject *__pyx_pf_7km3pipe_11dataclasses___defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_TraceCall("__defaults__", __pyx_f[0], 478, 0, __PYX_ERR(0, 478, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_input_array);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_input_array);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_input_array);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Point___new__[] = "Point.__new__(cls, input_array=(np.nan, np.nan, np.nan))\nAdd x, y and z to the ndarray";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_5Point_1__new__ = {"__new__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Point_1__new__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_5Point___new__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_input_array = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_input_array,0};
    PyObject* values[2] = {0,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_input_array;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_input_array);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) __PYX_ERR(0, 478, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_input_array = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 478, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Point___new__(__pyx_self, __pyx_v_cls, __pyx_v_input_array);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_input_array) {
  PyObject *__pyx_v_obj = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__54)
  __Pyx_RefNannySetupContext("__new__", 0);
  __Pyx_TraceCall("__new__", __pyx_f[0], 478, 0, __PYX_ERR(0, 478, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":480
 *     def __new__(cls, input_array=(np.nan, np.nan, np.nan)):
 *         """Add x, y and z to the ndarray"""
 *         obj = np.asarray(input_array).view(cls)             # <<<<<<<<<<<<<<
 *         return obj
 * 
 */
  __Pyx_TraceLine(480,0,__PYX_ERR(0, 480, __pyx_L1_error))
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_input_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_input_array};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_input_array};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 480, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_input_array);
      __Pyx_GIVEREF(__pyx_v_input_array);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_input_array);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_view); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_cls};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_cls};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 480, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_cls);
      __Pyx_GIVEREF(__pyx_v_cls);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_cls);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_obj = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":481
 *         """Add x, y and z to the ndarray"""
 *         obj = np.asarray(input_array).view(cls)
 *         return obj             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(481,0,__PYX_ERR(0, 481, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":478
 * class Point(np.ndarray):
 *     """Represents a point in a 3D space"""
 *     def __new__(cls, input_array=(np.nan, np.nan, np.nan)):             # <<<<<<<<<<<<<<
 *         """Add x, y and z to the ndarray"""
 *         obj = np.asarray(input_array).view(cls)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":484
 * 
 *     @property
 *     def x(self):             # <<<<<<<<<<<<<<
 *         return self[0]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_3x(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Point_2x[] = "Point.x(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_5Point_3x = {"x", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Point_3x, METH_O, __pyx_doc_7km3pipe_11dataclasses_5Point_2x};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_3x(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("x (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Point_2x(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_2x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__55)
  __Pyx_RefNannySetupContext("x", 0);
  __Pyx_TraceCall("x", __pyx_f[0], 484, 0, __PYX_ERR(0, 484, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":485
 *     @property
 *     def x(self):
 *         return self[0]             # <<<<<<<<<<<<<<
 * 
 *     @x.setter
 */
  __Pyx_TraceLine(485,0,__PYX_ERR(0, 485, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":484
 * 
 *     @property
 *     def x(self):             # <<<<<<<<<<<<<<
 *         return self[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.x", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":488
 * 
 *     @x.setter
 *     def x(self, value):             # <<<<<<<<<<<<<<
 *         self[0] = value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_5x(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Point_4x[] = "Point.x(self, value)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_5Point_5x = {"x", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Point_5x, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_5Point_4x};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_5x(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("x (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("x", 1, 2, 2, 1); __PYX_ERR(0, 488, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "x") < 0)) __PYX_ERR(0, 488, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("x", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 488, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.x", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Point_4x(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_4x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__56)
  __Pyx_RefNannySetupContext("x", 0);
  __Pyx_TraceCall("x", __pyx_f[0], 488, 0, __PYX_ERR(0, 488, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":489
 *     @x.setter
 *     def x(self, value):
 *         self[0] = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(489,0,__PYX_ERR(0, 489, __pyx_L1_error))
  if (unlikely(__Pyx_SetItemInt(__pyx_v_self, 0, __pyx_v_value, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 489, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":488
 * 
 *     @x.setter
 *     def x(self, value):             # <<<<<<<<<<<<<<
 *         self[0] = value
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.x", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":492
 * 
 *     @property
 *     def y(self):             # <<<<<<<<<<<<<<
 *         return self[1]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_7y(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Point_6y[] = "Point.y(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_5Point_7y = {"y", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Point_7y, METH_O, __pyx_doc_7km3pipe_11dataclasses_5Point_6y};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_7y(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("y (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Point_6y(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_6y(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__57)
  __Pyx_RefNannySetupContext("y", 0);
  __Pyx_TraceCall("y", __pyx_f[0], 492, 0, __PYX_ERR(0, 492, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":493
 *     @property
 *     def y(self):
 *         return self[1]             # <<<<<<<<<<<<<<
 * 
 *     @y.setter
 */
  __Pyx_TraceLine(493,0,__PYX_ERR(0, 493, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":492
 * 
 *     @property
 *     def y(self):             # <<<<<<<<<<<<<<
 *         return self[1]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.y", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":496
 * 
 *     @y.setter
 *     def y(self, value):             # <<<<<<<<<<<<<<
 *         self[1] = value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_9y(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Point_8y[] = "Point.y(self, value)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_5Point_9y = {"y", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Point_9y, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_5Point_8y};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_9y(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("y (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("y", 1, 2, 2, 1); __PYX_ERR(0, 496, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "y") < 0)) __PYX_ERR(0, 496, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("y", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 496, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.y", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Point_8y(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_8y(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__58)
  __Pyx_RefNannySetupContext("y", 0);
  __Pyx_TraceCall("y", __pyx_f[0], 496, 0, __PYX_ERR(0, 496, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":497
 *     @y.setter
 *     def y(self, value):
 *         self[1] = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(497,0,__PYX_ERR(0, 497, __pyx_L1_error))
  if (unlikely(__Pyx_SetItemInt(__pyx_v_self, 1, __pyx_v_value, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 497, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":496
 * 
 *     @y.setter
 *     def y(self, value):             # <<<<<<<<<<<<<<
 *         self[1] = value
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.y", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":500
 * 
 *     @property
 *     def z(self):             # <<<<<<<<<<<<<<
 *         return self[2]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_11z(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Point_10z[] = "Point.z(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_5Point_11z = {"z", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Point_11z, METH_O, __pyx_doc_7km3pipe_11dataclasses_5Point_10z};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_11z(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("z (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Point_10z(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_10z(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__59)
  __Pyx_RefNannySetupContext("z", 0);
  __Pyx_TraceCall("z", __pyx_f[0], 500, 0, __PYX_ERR(0, 500, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":501
 *     @property
 *     def z(self):
 *         return self[2]             # <<<<<<<<<<<<<<
 * 
 *     @z.setter
 */
  __Pyx_TraceLine(501,0,__PYX_ERR(0, 501, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":500
 * 
 *     @property
 *     def z(self):             # <<<<<<<<<<<<<<
 *         return self[2]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.z", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":504
 * 
 *     @z.setter
 *     def z(self, value):             # <<<<<<<<<<<<<<
 *         self[2] = value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_13z(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Point_12z[] = "Point.z(self, value)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_5Point_13z = {"z", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Point_13z, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_5Point_12z};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Point_13z(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("z (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("z", 1, 2, 2, 1); __PYX_ERR(0, 504, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "z") < 0)) __PYX_ERR(0, 504, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("z", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 504, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.z", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Point_12z(__pyx_self, __pyx_v_self, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Point_12z(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__60)
  __Pyx_RefNannySetupContext("z", 0);
  __Pyx_TraceCall("z", __pyx_f[0], 504, 0, __PYX_ERR(0, 504, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":505
 *     @z.setter
 *     def z(self, value):
 *         self[2] = value             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(505,0,__PYX_ERR(0, 505, __pyx_L1_error))
  if (unlikely(__Pyx_SetItemInt(__pyx_v_self, 2, __pyx_v_value, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 505, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":504
 * 
 *     @z.setter
 *     def z(self, value):             # <<<<<<<<<<<<<<
 *         self[2] = value
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Point.z", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":536
 *     cdef public float pos_x, pos_y, pos_z, dir_x, dir_y, dir_z, t0
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   int channel_id,
 *                   float dir_x,
 */

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_channel_id;
  float __pyx_v_dir_x;
  float __pyx_v_dir_y;
  float __pyx_v_dir_z;
  int __pyx_v_dom_id;
  int __pyx_v_id;
  int __pyx_v_pmt_id;
  float __pyx_v_pos_x;
  float __pyx_v_pos_y;
  float __pyx_v_pos_z;
  int __pyx_v_t0;
  int __pyx_v_time;
  int __pyx_v_tot;
  unsigned short __pyx_v_triggered;
  CYTHON_UNUSED int __pyx_v_event_id;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_channel_id,&__pyx_n_s_dir_x,&__pyx_n_s_dir_y,&__pyx_n_s_dir_z,&__pyx_n_s_dom_id,&__pyx_n_s_id,&__pyx_n_s_pmt_id,&__pyx_n_s_pos_x,&__pyx_n_s_pos_y,&__pyx_n_s_pos_z,&__pyx_n_s_t0,&__pyx_n_s_time,&__pyx_n_s_tot,&__pyx_n_s_triggered,&__pyx_n_s_event_id,0};
    PyObject* values[15] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_channel_id)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 1); __PYX_ERR(0, 536, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 2); __PYX_ERR(0, 536, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 3); __PYX_ERR(0, 536, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dom_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 4); __PYX_ERR(0, 536, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 5); __PYX_ERR(0, 536, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pmt_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 6); __PYX_ERR(0, 536, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 7); __PYX_ERR(0, 536, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 8); __PYX_ERR(0, 536, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 9); __PYX_ERR(0, 536, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (likely((values[10] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t0)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 10); __PYX_ERR(0, 536, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 11:
        if (likely((values[11] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 11); __PYX_ERR(0, 536, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 12:
        if (likely((values[12] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tot)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 12); __PYX_ERR(0, 536, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 13:
        if (likely((values[13] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_triggered)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 13); __PYX_ERR(0, 536, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 14:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id);
          if (value) { values[14] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 536, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_channel_id = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_channel_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 537, __pyx_L3_error)
    __pyx_v_dir_x = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_dir_x == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 538, __pyx_L3_error)
    __pyx_v_dir_y = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_dir_y == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 539, __pyx_L3_error)
    __pyx_v_dir_z = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_dir_z == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 540, __pyx_L3_error)
    __pyx_v_dom_id = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_dom_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 541, __pyx_L3_error)
    __pyx_v_id = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 542, __pyx_L3_error)
    __pyx_v_pmt_id = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_pmt_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 543, __pyx_L3_error)
    __pyx_v_pos_x = __pyx_PyFloat_AsFloat(values[7]); if (unlikely((__pyx_v_pos_x == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 544, __pyx_L3_error)
    __pyx_v_pos_y = __pyx_PyFloat_AsFloat(values[8]); if (unlikely((__pyx_v_pos_y == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 545, __pyx_L3_error)
    __pyx_v_pos_z = __pyx_PyFloat_AsFloat(values[9]); if (unlikely((__pyx_v_pos_z == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 546, __pyx_L3_error)
    __pyx_v_t0 = __Pyx_PyInt_As_int(values[10]); if (unlikely((__pyx_v_t0 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 547, __pyx_L3_error)
    __pyx_v_time = __Pyx_PyInt_As_int(values[11]); if (unlikely((__pyx_v_time == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 548, __pyx_L3_error)
    __pyx_v_tot = __Pyx_PyInt_As_int(values[12]); if (unlikely((__pyx_v_tot == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 549, __pyx_L3_error)
    __pyx_v_triggered = __Pyx_PyInt_As_unsigned_short(values[13]); if (unlikely((__pyx_v_triggered == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 550, __pyx_L3_error)
    if (values[14]) {
      __pyx_v_event_id = __Pyx_PyInt_As_int(values[14]); if (unlikely((__pyx_v_event_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L3_error)
    } else {
      __pyx_v_event_id = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 536, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit___cinit__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), __pyx_v_channel_id, __pyx_v_dir_x, __pyx_v_dir_y, __pyx_v_dir_z, __pyx_v_dom_id, __pyx_v_id, __pyx_v_pmt_id, __pyx_v_pos_x, __pyx_v_pos_y, __pyx_v_pos_z, __pyx_v_t0, __pyx_v_time, __pyx_v_tot, __pyx_v_triggered, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_3Hit___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, int __pyx_v_channel_id, float __pyx_v_dir_x, float __pyx_v_dir_y, float __pyx_v_dir_z, int __pyx_v_dom_id, int __pyx_v_id, int __pyx_v_pmt_id, float __pyx_v_pos_x, float __pyx_v_pos_y, float __pyx_v_pos_z, int __pyx_v_t0, int __pyx_v_time, int __pyx_v_tot, unsigned short __pyx_v_triggered, CYTHON_UNUSED int __pyx_v_event_id) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 536, 0, __PYX_ERR(0, 536, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":553
 *                   int event_id=0        # ignore this!
 *                   ):
 *         self.channel_id = channel_id             # <<<<<<<<<<<<<<
 *         self.dir_x = dir_x
 *         self.dir_y = dir_y
 */
  __Pyx_TraceLine(553,0,__PYX_ERR(0, 553, __pyx_L1_error))
  __pyx_v_self->channel_id = __pyx_v_channel_id;

  /* "km3pipe/dataclasses.pyx":554
 *                   ):
 *         self.channel_id = channel_id
 *         self.dir_x = dir_x             # <<<<<<<<<<<<<<
 *         self.dir_y = dir_y
 *         self.dir_z = dir_z
 */
  __Pyx_TraceLine(554,0,__PYX_ERR(0, 554, __pyx_L1_error))
  __pyx_v_self->dir_x = __pyx_v_dir_x;

  /* "km3pipe/dataclasses.pyx":555
 *         self.channel_id = channel_id
 *         self.dir_x = dir_x
 *         self.dir_y = dir_y             # <<<<<<<<<<<<<<
 *         self.dir_z = dir_z
 *         self.dom_id = dom_id
 */
  __Pyx_TraceLine(555,0,__PYX_ERR(0, 555, __pyx_L1_error))
  __pyx_v_self->dir_y = __pyx_v_dir_y;

  /* "km3pipe/dataclasses.pyx":556
 *         self.dir_x = dir_x
 *         self.dir_y = dir_y
 *         self.dir_z = dir_z             # <<<<<<<<<<<<<<
 *         self.dom_id = dom_id
 *         self.id = id
 */
  __Pyx_TraceLine(556,0,__PYX_ERR(0, 556, __pyx_L1_error))
  __pyx_v_self->dir_z = __pyx_v_dir_z;

  /* "km3pipe/dataclasses.pyx":557
 *         self.dir_y = dir_y
 *         self.dir_z = dir_z
 *         self.dom_id = dom_id             # <<<<<<<<<<<<<<
 *         self.id = id
 *         self.pmt_id = pmt_id
 */
  __Pyx_TraceLine(557,0,__PYX_ERR(0, 557, __pyx_L1_error))
  __pyx_v_self->dom_id = __pyx_v_dom_id;

  /* "km3pipe/dataclasses.pyx":558
 *         self.dir_z = dir_z
 *         self.dom_id = dom_id
 *         self.id = id             # <<<<<<<<<<<<<<
 *         self.pmt_id = pmt_id
 *         self.pos_x = pos_x
 */
  __Pyx_TraceLine(558,0,__PYX_ERR(0, 558, __pyx_L1_error))
  __pyx_v_self->id = __pyx_v_id;

  /* "km3pipe/dataclasses.pyx":559
 *         self.dom_id = dom_id
 *         self.id = id
 *         self.pmt_id = pmt_id             # <<<<<<<<<<<<<<
 *         self.pos_x = pos_x
 *         self.pos_y = pos_y
 */
  __Pyx_TraceLine(559,0,__PYX_ERR(0, 559, __pyx_L1_error))
  __pyx_v_self->pmt_id = __pyx_v_pmt_id;

  /* "km3pipe/dataclasses.pyx":560
 *         self.id = id
 *         self.pmt_id = pmt_id
 *         self.pos_x = pos_x             # <<<<<<<<<<<<<<
 *         self.pos_y = pos_y
 *         self.pos_z = pos_z
 */
  __Pyx_TraceLine(560,0,__PYX_ERR(0, 560, __pyx_L1_error))
  __pyx_v_self->pos_x = __pyx_v_pos_x;

  /* "km3pipe/dataclasses.pyx":561
 *         self.pmt_id = pmt_id
 *         self.pos_x = pos_x
 *         self.pos_y = pos_y             # <<<<<<<<<<<<<<
 *         self.pos_z = pos_z
 *         self.t0 = t0
 */
  __Pyx_TraceLine(561,0,__PYX_ERR(0, 561, __pyx_L1_error))
  __pyx_v_self->pos_y = __pyx_v_pos_y;

  /* "km3pipe/dataclasses.pyx":562
 *         self.pos_x = pos_x
 *         self.pos_y = pos_y
 *         self.pos_z = pos_z             # <<<<<<<<<<<<<<
 *         self.t0 = t0
 *         self.time = time
 */
  __Pyx_TraceLine(562,0,__PYX_ERR(0, 562, __pyx_L1_error))
  __pyx_v_self->pos_z = __pyx_v_pos_z;

  /* "km3pipe/dataclasses.pyx":563
 *         self.pos_y = pos_y
 *         self.pos_z = pos_z
 *         self.t0 = t0             # <<<<<<<<<<<<<<
 *         self.time = time
 *         self.tot = tot
 */
  __Pyx_TraceLine(563,0,__PYX_ERR(0, 563, __pyx_L1_error))
  __pyx_v_self->t0 = __pyx_v_t0;

  /* "km3pipe/dataclasses.pyx":564
 *         self.pos_z = pos_z
 *         self.t0 = t0
 *         self.time = time             # <<<<<<<<<<<<<<
 *         self.tot = tot
 *         self.triggered = triggered
 */
  __Pyx_TraceLine(564,0,__PYX_ERR(0, 564, __pyx_L1_error))
  __pyx_v_self->time = __pyx_v_time;

  /* "km3pipe/dataclasses.pyx":565
 *         self.t0 = t0
 *         self.time = time
 *         self.tot = tot             # <<<<<<<<<<<<<<
 *         self.triggered = triggered
 * 
 */
  __Pyx_TraceLine(565,0,__PYX_ERR(0, 565, __pyx_L1_error))
  __pyx_v_self->tot = __pyx_v_tot;

  /* "km3pipe/dataclasses.pyx":566
 *         self.time = time
 *         self.tot = tot
 *         self.triggered = triggered             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(566,0,__PYX_ERR(0, 566, __pyx_L1_error))
  __pyx_v_self->triggered = __pyx_v_triggered;

  /* "km3pipe/dataclasses.pyx":536
 *     cdef public float pos_x, pos_y, pos_z, dir_x, dir_y, dir_z, t0
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   int channel_id,
 *                   float dir_x,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":569
 * 
 *     @property
 *     def dir(self):             # <<<<<<<<<<<<<<
 *         return np.array((self.dir_x, self.dir_y, self.dir_z))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_3dir_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_3dir_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_3dir___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_3dir___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 569, 0, __PYX_ERR(0, 569, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":570
 *     @property
 *     def dir(self):
 *         return np.array((self.dir_x, self.dir_y, self.dir_z))             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(570,0,__PYX_ERR(0, 570, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->dir_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->dir_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->dir_z); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":569
 * 
 *     @property
 *     def dir(self):             # <<<<<<<<<<<<<<
 *         return np.array((self.dir_x, self.dir_y, self.dir_z))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dir.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":573
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         return np.array((self.pos_x, self.pos_y, self.pos_z))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_3pos_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_3pos___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_3pos___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 573, 0, __PYX_ERR(0, 573, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":574
 *     @property
 *     def pos(self):
 *         return np.array((self.pos_x, self.pos_y, self.pos_z))             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(574,0,__PYX_ERR(0, 574, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->pos_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->pos_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->pos_z); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":573
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         return np.array((self.pos_x, self.pos_y, self.pos_z))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":576
 *         return np.array((self.pos_x, self.pos_y, self.pos_z))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Hit: channel_id({0}), dom_id({1}), pmt_id({2}), tot({3}), " \
 *                "time({4}), triggered({5})" \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_2__str__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 576, 0, __PYX_ERR(0, 576, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":577
 * 
 *     def __str__(self):
 *         return "Hit: channel_id({0}), dom_id({1}), pmt_id({2}), tot({3}), " \             # <<<<<<<<<<<<<<
 *                "time({4}), triggered({5})" \
 *                .format(self.channel_id, self.dom_id, self.pmt_id, self.tot,
 */
  __Pyx_TraceLine(577,0,__PYX_ERR(0, 577, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":579
 *         return "Hit: channel_id({0}), dom_id({1}), pmt_id({2}), tot({3}), " \
 *                "time({4}), triggered({5})" \
 *                .format(self.channel_id, self.dom_id, self.pmt_id, self.tot,             # <<<<<<<<<<<<<<
 *                        self.time, self.triggered)
 * 
 */
  __Pyx_TraceLine(579,0,__PYX_ERR(0, 579, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Hit_channel_id_0_dom_id_1_pmt_id, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->channel_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->dom_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->pmt_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->tot); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":580
 *                "time({4}), triggered({5})" \
 *                .format(self.channel_id, self.dom_id, self.pmt_id, self.tot,
 *                        self.time, self.triggered)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(580,0,__PYX_ERR(0, 580, __pyx_L1_error))
  __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->time); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->triggered); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_10 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_9, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 6+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_9, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 6+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(6+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_10, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_11, 4+__pyx_t_10, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_11, 5+__pyx_t_10, __pyx_t_8);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":576
 *         return np.array((self.pos_x, self.pos_y, self.pos_z))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Hit: channel_id({0}), dom_id({1}), pmt_id({2}), tot({3}), " \
 *                "time({4}), triggered({5})" \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":582
 *                        self.time, self.triggered)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_4__repr__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 582, 0, __PYX_ERR(0, 582, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":583
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(583,0,__PYX_ERR(0, 583, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":582
 *                        self.time, self.triggered)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":585
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_3Hit_6__insp__[] = "Hit.__insp__(self)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_6__insp__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 585, 0, __PYX_ERR(0, 585, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":586
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(586,0,__PYX_ERR(0, 586, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":585
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":532
 * 
 *     """
 *     cdef public int id, dom_id, time, tot, channel_id, pmt_id             # <<<<<<<<<<<<<<
 *     cdef public unsigned short int triggered
 *     cdef public float pos_x, pos_y, pos_z, dir_x, dir_y, dir_z, t0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_2id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_2id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_2id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 532, 0, __PYX_ERR(0, 532, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_2id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_2id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 532, 0, __PYX_ERR(0, 532, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 532, __pyx_L1_error)
  __pyx_v_self->id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_6dom_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_6dom_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_6dom_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_6dom_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 532, 0, __PYX_ERR(0, 532, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dom_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dom_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_6dom_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_6dom_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_6dom_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_6dom_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 532, 0, __PYX_ERR(0, 532, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 532, __pyx_L1_error)
  __pyx_v_self->dom_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dom_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_4time_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_4time___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 532, 0, __PYX_ERR(0, 532, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_4time_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 532, 0, __PYX_ERR(0, 532, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 532, __pyx_L1_error)
  __pyx_v_self->time = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.time.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_3tot_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_3tot_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_3tot___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_3tot___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 532, 0, __PYX_ERR(0, 532, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->tot); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.tot.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_3tot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_3tot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_3tot_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_3tot_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 532, 0, __PYX_ERR(0, 532, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 532, __pyx_L1_error)
  __pyx_v_self->tot = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.tot.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_10channel_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_10channel_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_10channel_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_10channel_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 532, 0, __PYX_ERR(0, 532, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->channel_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.channel_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_10channel_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_10channel_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_10channel_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_10channel_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 532, 0, __PYX_ERR(0, 532, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 532, __pyx_L1_error)
  __pyx_v_self->channel_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.channel_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_6pmt_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_6pmt_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_6pmt_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_6pmt_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 532, 0, __PYX_ERR(0, 532, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->pmt_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pmt_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_6pmt_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_6pmt_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_6pmt_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_6pmt_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 532, 0, __PYX_ERR(0, 532, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 532, __pyx_L1_error)
  __pyx_v_self->pmt_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pmt_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":533
 *     """
 *     cdef public int id, dom_id, time, tot, channel_id, pmt_id
 *     cdef public unsigned short int triggered             # <<<<<<<<<<<<<<
 *     cdef public float pos_x, pos_y, pos_z, dir_x, dir_y, dir_z, t0
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_9triggered_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_9triggered_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_9triggered___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_9triggered___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 533, 0, __PYX_ERR(0, 533, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->triggered); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.triggered.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_9triggered_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_9triggered_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_9triggered_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_9triggered_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned short __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 533, 0, __PYX_ERR(0, 533, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_unsigned_short(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 533, __pyx_L1_error)
  __pyx_v_self->triggered = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.triggered.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":534
 *     cdef public int id, dom_id, time, tot, channel_id, pmt_id
 *     cdef public unsigned short int triggered
 *     cdef public float pos_x, pos_y, pos_z, dir_x, dir_y, dir_z, t0             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_x_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_x_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_x___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_x___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 534, 0, __PYX_ERR(0, 534, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->pos_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pos_x.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_x_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_x_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 534, 0, __PYX_ERR(0, 534, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 534, __pyx_L1_error)
  __pyx_v_self->pos_x = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pos_x.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_y_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_y_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_y___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_y___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 534, 0, __PYX_ERR(0, 534, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->pos_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pos_y.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_y_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_y_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 534, 0, __PYX_ERR(0, 534, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 534, __pyx_L1_error)
  __pyx_v_self->pos_y = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pos_y.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_z_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_z_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_z___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_z___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 534, 0, __PYX_ERR(0, 534, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->pos_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pos_z.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_z_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_z_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_z_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5pos_z_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 534, 0, __PYX_ERR(0, 534, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 534, __pyx_L1_error)
  __pyx_v_self->pos_z = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.pos_z.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_x_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_x_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_x___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_x___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 534, 0, __PYX_ERR(0, 534, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dir_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dir_x.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_x_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_x_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 534, 0, __PYX_ERR(0, 534, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 534, __pyx_L1_error)
  __pyx_v_self->dir_x = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dir_x.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_y_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_y_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_y___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_y___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 534, 0, __PYX_ERR(0, 534, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dir_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dir_y.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_y_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_y_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 534, 0, __PYX_ERR(0, 534, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 534, __pyx_L1_error)
  __pyx_v_self->dir_y = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dir_y.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_z_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_z_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_z___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_z___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 534, 0, __PYX_ERR(0, 534, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dir_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dir_z.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_z_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_z_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_z_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_5dir_z_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 534, 0, __PYX_ERR(0, 534, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 534, __pyx_L1_error)
  __pyx_v_self->dir_z = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.dir_z.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_2t0_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_2t0_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_2t0___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_2t0___get__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 534, 0, __PYX_ERR(0, 534, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->t0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.t0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_2t0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_3Hit_2t0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_2t0_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_3Hit_2t0_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 534, 0, __PYX_ERR(0, 534, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 534, __pyx_L1_error)
  __pyx_v_self->t0 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.t0.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_3Hit_8__reduce_cython__[] = "Hit.__reduce_cython__(self)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_8__reduce_cython__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __Pyx_TraceLine(2,0,__PYX_ERR(1, 2, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_3Hit_10__setstate_cython__[] = "Hit.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_3Hit_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_3Hit_10__setstate_cython__(((struct __pyx_obj_7km3pipe_11dataclasses_Hit *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_3Hit_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_Hit *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Hit.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":605
 *     cdef public unsigned short int triggered
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   int channel_id,
 *                   int dom_id,
 */

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_6RawHit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_6RawHit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_channel_id;
  int __pyx_v_dom_id;
  double __pyx_v_time;
  int __pyx_v_tot;
  unsigned short __pyx_v_triggered;
  CYTHON_UNUSED int __pyx_v_event_id;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_channel_id,&__pyx_n_s_dom_id,&__pyx_n_s_time,&__pyx_n_s_tot,&__pyx_n_s_triggered,&__pyx_n_s_event_id,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_channel_id)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dom_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 5, 6, 1); __PYX_ERR(0, 605, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 5, 6, 2); __PYX_ERR(0, 605, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tot)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 5, 6, 3); __PYX_ERR(0, 605, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_triggered)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 5, 6, 4); __PYX_ERR(0, 605, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 605, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_channel_id = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_channel_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 606, __pyx_L3_error)
    __pyx_v_dom_id = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dom_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 607, __pyx_L3_error)
    __pyx_v_time = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_time == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 608, __pyx_L3_error)
    __pyx_v_tot = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_tot == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 609, __pyx_L3_error)
    __pyx_v_triggered = __Pyx_PyInt_As_unsigned_short(values[4]); if (unlikely((__pyx_v_triggered == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 610, __pyx_L3_error)
    if (values[5]) {
      __pyx_v_event_id = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_event_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 611, __pyx_L3_error)
    } else {
      __pyx_v_event_id = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 5, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 605, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHit.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_6RawHit___cinit__(((struct __pyx_obj_7km3pipe_11dataclasses_RawHit *)__pyx_v_self), __pyx_v_channel_id, __pyx_v_dom_id, __pyx_v_time, __pyx_v_tot, __pyx_v_triggered, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_6RawHit___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self, int __pyx_v_channel_id, int __pyx_v_dom_id, double __pyx_v_time, int __pyx_v_tot, unsigned short __pyx_v_triggered, CYTHON_UNUSED int __pyx_v_event_id) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 605, 0, __PYX_ERR(0, 605, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":613
 *                   int event_id=0        # ignore this! just for init * magic
 *                   ):
 *         self.channel_id = channel_id             # <<<<<<<<<<<<<<
 *         self.dom_id = dom_id
 *         self.time = time
 */
  __Pyx_TraceLine(613,0,__PYX_ERR(0, 613, __pyx_L1_error))
  __pyx_v_self->channel_id = __pyx_v_channel_id;

  /* "km3pipe/dataclasses.pyx":614
 *                   ):
 *         self.channel_id = channel_id
 *         self.dom_id = dom_id             # <<<<<<<<<<<<<<
 *         self.time = time
 *         self.tot = tot
 */
  __Pyx_TraceLine(614,0,__PYX_ERR(0, 614, __pyx_L1_error))
  __pyx_v_self->dom_id = __pyx_v_dom_id;

  /* "km3pipe/dataclasses.pyx":615
 *         self.channel_id = channel_id
 *         self.dom_id = dom_id
 *         self.time = time             # <<<<<<<<<<<<<<
 *         self.tot = tot
 *         self.triggered = triggered
 */
  __Pyx_TraceLine(615,0,__PYX_ERR(0, 615, __pyx_L1_error))
  __pyx_v_self->time = __pyx_v_time;

  /* "km3pipe/dataclasses.pyx":616
 *         self.dom_id = dom_id
 *         self.time = time
 *         self.tot = tot             # <<<<<<<<<<<<<<
 *         self.triggered = triggered
 * 
 */
  __Pyx_TraceLine(616,0,__PYX_ERR(0, 616, __pyx_L1_error))
  __pyx_v_self->tot = __pyx_v_tot;

  /* "km3pipe/dataclasses.pyx":617
 *         self.time = time
 *         self.tot = tot
 *         self.triggered = triggered             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(617,0,__PYX_ERR(0, 617, __pyx_L1_error))
  __pyx_v_self->triggered = __pyx_v_triggered;

  /* "km3pipe/dataclasses.pyx":605
 *     cdef public unsigned short int triggered
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   int channel_id,
 *                   int dom_id,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHit.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":619
 *         self.triggered = triggered
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "RawHit: channel_id({0}), dom_id({1}), tot({2}), " \
 *                "time({3}), triggered({4})" \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_6RawHit_2__str__(((struct __pyx_obj_7km3pipe_11dataclasses_RawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 619, 0, __PYX_ERR(0, 619, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":620
 * 
 *     def __str__(self):
 *         return "RawHit: channel_id({0}), dom_id({1}), tot({2}), " \             # <<<<<<<<<<<<<<
 *                "time({3}), triggered({4})" \
 *                .format(self.channel_id, self.dom_id, self.tot, self.time,
 */
  __Pyx_TraceLine(620,0,__PYX_ERR(0, 620, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":622
 *         return "RawHit: channel_id({0}), dom_id({1}), tot({2}), " \
 *                "time({3}), triggered({4})" \
 *                .format(self.channel_id, self.dom_id, self.tot, self.time,             # <<<<<<<<<<<<<<
 *                        self.triggered)
 * 
 */
  __Pyx_TraceLine(622,0,__PYX_ERR(0, 622, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_RawHit_channel_id_0_dom_id_1_tot, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->channel_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->dom_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->tot); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":623
 *                "time({3}), triggered({4})" \
 *                .format(self.channel_id, self.dom_id, self.tot, self.time,
 *                        self.triggered)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(623,0,__PYX_ERR(0, 623, __pyx_L1_error))
  __pyx_t_7 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->triggered); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 5+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 5+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(5+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_9, __pyx_t_7);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":619
 *         self.triggered = triggered
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "RawHit: channel_id({0}), dom_id({1}), tot({2}), " \
 *                "time({3}), triggered({4})" \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHit.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":625
 *                        self.triggered)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_6RawHit_4__repr__(((struct __pyx_obj_7km3pipe_11dataclasses_RawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 625, 0, __PYX_ERR(0, 625, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":626
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(626,0,__PYX_ERR(0, 626, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":625
 *                        self.triggered)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHit.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":628
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_6RawHit_6__insp__[] = "RawHit.__insp__(self)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_6RawHit_6__insp__(((struct __pyx_obj_7km3pipe_11dataclasses_RawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 628, 0, __PYX_ERR(0, 628, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":629
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(629,0,__PYX_ERR(0, 629, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":628
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHit.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":601
 * 
 *     """
 *     cdef public int dom_id, tot, channel_id             # <<<<<<<<<<<<<<
 *     cdef public double time
 *     cdef public unsigned short int triggered
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_6dom_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_6dom_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_6RawHit_6dom_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_RawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_6dom_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 601, 0, __PYX_ERR(0, 601, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dom_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHit.dom_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_6RawHit_6dom_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_6RawHit_6dom_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_6RawHit_6dom_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_RawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_6RawHit_6dom_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 601, 0, __PYX_ERR(0, 601, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 601, __pyx_L1_error)
  __pyx_v_self->dom_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHit.dom_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_3tot_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_3tot_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_6RawHit_3tot___get__(((struct __pyx_obj_7km3pipe_11dataclasses_RawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_3tot___get__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 601, 0, __PYX_ERR(0, 601, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->tot); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHit.tot.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_6RawHit_3tot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_6RawHit_3tot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_6RawHit_3tot_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_RawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_6RawHit_3tot_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 601, 0, __PYX_ERR(0, 601, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 601, __pyx_L1_error)
  __pyx_v_self->tot = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHit.tot.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_10channel_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_10channel_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_6RawHit_10channel_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_RawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_10channel_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 601, 0, __PYX_ERR(0, 601, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->channel_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHit.channel_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_6RawHit_10channel_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_6RawHit_10channel_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_6RawHit_10channel_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_RawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_6RawHit_10channel_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 601, 0, __PYX_ERR(0, 601, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 601, __pyx_L1_error)
  __pyx_v_self->channel_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHit.channel_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":602
 *     """
 *     cdef public int dom_id, tot, channel_id
 *     cdef public double time             # <<<<<<<<<<<<<<
 *     cdef public unsigned short int triggered
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_4time_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_6RawHit_4time___get__(((struct __pyx_obj_7km3pipe_11dataclasses_RawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 602, 0, __PYX_ERR(0, 602, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHit.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_6RawHit_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_6RawHit_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_6RawHit_4time_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_RawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_6RawHit_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 602, 0, __PYX_ERR(0, 602, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 602, __pyx_L1_error)
  __pyx_v_self->time = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHit.time.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":603
 *     cdef public int dom_id, tot, channel_id
 *     cdef public double time
 *     cdef public unsigned short int triggered             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_9triggered_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_9triggered_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_6RawHit_9triggered___get__(((struct __pyx_obj_7km3pipe_11dataclasses_RawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_9triggered___get__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 603, 0, __PYX_ERR(0, 603, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->triggered); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHit.triggered.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_6RawHit_9triggered_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_6RawHit_9triggered_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_6RawHit_9triggered_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_RawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_6RawHit_9triggered_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned short __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 603, 0, __PYX_ERR(0, 603, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_unsigned_short(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 603, __pyx_L1_error)
  __pyx_v_self->triggered = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHit.triggered.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_6RawHit_8__reduce_cython__[] = "RawHit.__reduce_cython__(self)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_6RawHit_8__reduce_cython__(((struct __pyx_obj_7km3pipe_11dataclasses_RawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __Pyx_TraceLine(2,0,__PYX_ERR(1, 2, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHit.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_6RawHit_10__setstate_cython__[] = "RawHit.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_6RawHit_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_6RawHit_10__setstate_cython__(((struct __pyx_obj_7km3pipe_11dataclasses_RawHit *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_6RawHit_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHit.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":654
 *     cdef public unsigned short int triggered
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   int channel_id,
 *                   float dir_x,
 */

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_channel_id;
  float __pyx_v_dir_x;
  float __pyx_v_dir_y;
  float __pyx_v_dir_z;
  int __pyx_v_dom_id;
  int __pyx_v_du;
  int __pyx_v_floor;
  float __pyx_v_pos_x;
  float __pyx_v_pos_y;
  float __pyx_v_pos_z;
  float __pyx_v_t0;
  double __pyx_v_time;
  int __pyx_v_tot;
  unsigned short __pyx_v_triggered;
  CYTHON_UNUSED int __pyx_v_event_id;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_channel_id,&__pyx_n_s_dir_x,&__pyx_n_s_dir_y,&__pyx_n_s_dir_z,&__pyx_n_s_dom_id,&__pyx_n_s_du,&__pyx_n_s_floor,&__pyx_n_s_pos_x,&__pyx_n_s_pos_y,&__pyx_n_s_pos_z,&__pyx_n_s_t0,&__pyx_n_s_time,&__pyx_n_s_tot,&__pyx_n_s_triggered,&__pyx_n_s_event_id,0};
    PyObject* values[15] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_channel_id)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 1); __PYX_ERR(0, 654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 2); __PYX_ERR(0, 654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 3); __PYX_ERR(0, 654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dom_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 4); __PYX_ERR(0, 654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_du)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 5); __PYX_ERR(0, 654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_floor)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 6); __PYX_ERR(0, 654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 7); __PYX_ERR(0, 654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 8); __PYX_ERR(0, 654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 9); __PYX_ERR(0, 654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (likely((values[10] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t0)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 10); __PYX_ERR(0, 654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 11:
        if (likely((values[11] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 11); __PYX_ERR(0, 654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 12:
        if (likely((values[12] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tot)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 12); __PYX_ERR(0, 654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 13:
        if (likely((values[13] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_triggered)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, 13); __PYX_ERR(0, 654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 14:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id);
          if (value) { values[14] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 654, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_channel_id = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_channel_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 655, __pyx_L3_error)
    __pyx_v_dir_x = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_dir_x == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 656, __pyx_L3_error)
    __pyx_v_dir_y = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_dir_y == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 657, __pyx_L3_error)
    __pyx_v_dir_z = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_dir_z == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 658, __pyx_L3_error)
    __pyx_v_dom_id = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_dom_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 659, __pyx_L3_error)
    __pyx_v_du = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_du == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 660, __pyx_L3_error)
    __pyx_v_floor = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_floor == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 661, __pyx_L3_error)
    __pyx_v_pos_x = __pyx_PyFloat_AsFloat(values[7]); if (unlikely((__pyx_v_pos_x == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 662, __pyx_L3_error)
    __pyx_v_pos_y = __pyx_PyFloat_AsFloat(values[8]); if (unlikely((__pyx_v_pos_y == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 663, __pyx_L3_error)
    __pyx_v_pos_z = __pyx_PyFloat_AsFloat(values[9]); if (unlikely((__pyx_v_pos_z == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 664, __pyx_L3_error)
    __pyx_v_t0 = __pyx_PyFloat_AsFloat(values[10]); if (unlikely((__pyx_v_t0 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 665, __pyx_L3_error)
    __pyx_v_time = __pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_time == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 666, __pyx_L3_error)
    __pyx_v_tot = __Pyx_PyInt_As_int(values[12]); if (unlikely((__pyx_v_tot == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 667, __pyx_L3_error)
    __pyx_v_triggered = __Pyx_PyInt_As_unsigned_short(values[13]); if (unlikely((__pyx_v_triggered == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 668, __pyx_L3_error)
    if (values[14]) {
      __pyx_v_event_id = __Pyx_PyInt_As_int(values[14]); if (unlikely((__pyx_v_event_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 669, __pyx_L3_error)
    } else {
      __pyx_v_event_id = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 14, 15, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 654, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit___cinit__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self), __pyx_v_channel_id, __pyx_v_dir_x, __pyx_v_dir_y, __pyx_v_dir_z, __pyx_v_dom_id, __pyx_v_du, __pyx_v_floor, __pyx_v_pos_x, __pyx_v_pos_y, __pyx_v_pos_z, __pyx_v_t0, __pyx_v_time, __pyx_v_tot, __pyx_v_triggered, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, int __pyx_v_channel_id, float __pyx_v_dir_x, float __pyx_v_dir_y, float __pyx_v_dir_z, int __pyx_v_dom_id, int __pyx_v_du, int __pyx_v_floor, float __pyx_v_pos_x, float __pyx_v_pos_y, float __pyx_v_pos_z, float __pyx_v_t0, double __pyx_v_time, int __pyx_v_tot, unsigned short __pyx_v_triggered, CYTHON_UNUSED int __pyx_v_event_id) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  float __pyx_t_2;
  float __pyx_t_3;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 654, 0, __PYX_ERR(0, 654, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":671
 *                   int event_id=0        # ignore this! just for init * magic
 *                   ):
 *         self.channel_id = channel_id             # <<<<<<<<<<<<<<
 *         self.dir_x, self.dir_y, self.dir_z = dir_x, dir_y, dir_z
 *         self.dom_id = dom_id
 */
  __Pyx_TraceLine(671,0,__PYX_ERR(0, 671, __pyx_L1_error))
  __pyx_v_self->channel_id = __pyx_v_channel_id;

  /* "km3pipe/dataclasses.pyx":672
 *                   ):
 *         self.channel_id = channel_id
 *         self.dir_x, self.dir_y, self.dir_z = dir_x, dir_y, dir_z             # <<<<<<<<<<<<<<
 *         self.dom_id = dom_id
 *         self.du = du
 */
  __Pyx_TraceLine(672,0,__PYX_ERR(0, 672, __pyx_L1_error))
  __pyx_t_1 = __pyx_v_dir_x;
  __pyx_t_2 = __pyx_v_dir_y;
  __pyx_t_3 = __pyx_v_dir_z;
  __pyx_v_self->dir_x = __pyx_t_1;
  __pyx_v_self->dir_y = __pyx_t_2;
  __pyx_v_self->dir_z = __pyx_t_3;

  /* "km3pipe/dataclasses.pyx":673
 *         self.channel_id = channel_id
 *         self.dir_x, self.dir_y, self.dir_z = dir_x, dir_y, dir_z
 *         self.dom_id = dom_id             # <<<<<<<<<<<<<<
 *         self.du = du
 *         self.floor = floor
 */
  __Pyx_TraceLine(673,0,__PYX_ERR(0, 673, __pyx_L1_error))
  __pyx_v_self->dom_id = __pyx_v_dom_id;

  /* "km3pipe/dataclasses.pyx":674
 *         self.dir_x, self.dir_y, self.dir_z = dir_x, dir_y, dir_z
 *         self.dom_id = dom_id
 *         self.du = du             # <<<<<<<<<<<<<<
 *         self.floor = floor
 *         self.pos_x, self.pos_y, self.pos_z = pos_x, pos_y, pos_z
 */
  __Pyx_TraceLine(674,0,__PYX_ERR(0, 674, __pyx_L1_error))
  __pyx_v_self->du = __pyx_v_du;

  /* "km3pipe/dataclasses.pyx":675
 *         self.dom_id = dom_id
 *         self.du = du
 *         self.floor = floor             # <<<<<<<<<<<<<<
 *         self.pos_x, self.pos_y, self.pos_z = pos_x, pos_y, pos_z
 *         self.t0 = t0
 */
  __Pyx_TraceLine(675,0,__PYX_ERR(0, 675, __pyx_L1_error))
  __pyx_v_self->floor = __pyx_v_floor;

  /* "km3pipe/dataclasses.pyx":676
 *         self.du = du
 *         self.floor = floor
 *         self.pos_x, self.pos_y, self.pos_z = pos_x, pos_y, pos_z             # <<<<<<<<<<<<<<
 *         self.t0 = t0
 *         self.time = time
 */
  __Pyx_TraceLine(676,0,__PYX_ERR(0, 676, __pyx_L1_error))
  __pyx_t_3 = __pyx_v_pos_x;
  __pyx_t_2 = __pyx_v_pos_y;
  __pyx_t_1 = __pyx_v_pos_z;
  __pyx_v_self->pos_x = __pyx_t_3;
  __pyx_v_self->pos_y = __pyx_t_2;
  __pyx_v_self->pos_z = __pyx_t_1;

  /* "km3pipe/dataclasses.pyx":677
 *         self.floor = floor
 *         self.pos_x, self.pos_y, self.pos_z = pos_x, pos_y, pos_z
 *         self.t0 = t0             # <<<<<<<<<<<<<<
 *         self.time = time
 *         self.tot = tot
 */
  __Pyx_TraceLine(677,0,__PYX_ERR(0, 677, __pyx_L1_error))
  __pyx_v_self->t0 = __pyx_v_t0;

  /* "km3pipe/dataclasses.pyx":678
 *         self.pos_x, self.pos_y, self.pos_z = pos_x, pos_y, pos_z
 *         self.t0 = t0
 *         self.time = time             # <<<<<<<<<<<<<<
 *         self.tot = tot
 *         self.triggered = triggered
 */
  __Pyx_TraceLine(678,0,__PYX_ERR(0, 678, __pyx_L1_error))
  __pyx_v_self->time = __pyx_v_time;

  /* "km3pipe/dataclasses.pyx":679
 *         self.t0 = t0
 *         self.time = time
 *         self.tot = tot             # <<<<<<<<<<<<<<
 *         self.triggered = triggered
 * 
 */
  __Pyx_TraceLine(679,0,__PYX_ERR(0, 679, __pyx_L1_error))
  __pyx_v_self->tot = __pyx_v_tot;

  /* "km3pipe/dataclasses.pyx":680
 *         self.time = time
 *         self.tot = tot
 *         self.triggered = triggered             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(680,0,__PYX_ERR(0, 680, __pyx_L1_error))
  __pyx_v_self->triggered = __pyx_v_triggered;

  /* "km3pipe/dataclasses.pyx":654
 *     cdef public unsigned short int triggered
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   int channel_id,
 *                   float dir_x,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":682
 *         self.triggered = triggered
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "CRawHit: channel_id({0}), dom_id({1}), tot({2}), " \
 *                "time({3}), triggered({4}), " \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_2__str__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 682, 0, __PYX_ERR(0, 682, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":683
 * 
 *     def __str__(self):
 *         return "CRawHit: channel_id({0}), dom_id({1}), tot({2}), " \             # <<<<<<<<<<<<<<
 *                "time({3}), triggered({4}), " \
 *                "pos({5}, {6}, {7}), dir({8}, {9}, {10})" \
 */
  __Pyx_TraceLine(683,0,__PYX_ERR(0, 683, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":686
 *                "time({3}), triggered({4}), " \
 *                "pos({5}, {6}, {7}), dir({8}, {9}, {10})" \
 *                .format(self.channel_id, self.dom_id, self.tot, self.time,             # <<<<<<<<<<<<<<
 *                        self.triggered, self.pos_x, self.pos_y, self.pos_z,
 *                        self.dir_x, self.dir_y, self.dir_z)
 */
  __Pyx_TraceLine(686,0,__PYX_ERR(0, 686, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_CRawHit_channel_id_0_dom_id_1_to, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->channel_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->dom_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->tot); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":687
 *                "pos({5}, {6}, {7}), dir({8}, {9}, {10})" \
 *                .format(self.channel_id, self.dom_id, self.tot, self.time,
 *                        self.triggered, self.pos_x, self.pos_y, self.pos_z,             # <<<<<<<<<<<<<<
 *                        self.dir_x, self.dir_y, self.dir_z)
 * 
 */
  __Pyx_TraceLine(687,0,__PYX_ERR(0, 687, __pyx_L1_error))
  __pyx_t_7 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->triggered); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyFloat_FromDouble(__pyx_v_self->pos_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = PyFloat_FromDouble(__pyx_v_self->pos_y); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyFloat_FromDouble(__pyx_v_self->pos_z); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "km3pipe/dataclasses.pyx":688
 *                .format(self.channel_id, self.dom_id, self.tot, self.time,
 *                        self.triggered, self.pos_x, self.pos_y, self.pos_z,
 *                        self.dir_x, self.dir_y, self.dir_z)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(688,0,__PYX_ERR(0, 688, __pyx_L1_error))
  __pyx_t_11 = PyFloat_FromDouble(__pyx_v_self->dir_x); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = PyFloat_FromDouble(__pyx_v_self->dir_y); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = PyFloat_FromDouble(__pyx_v_self->dir_z); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_14 = NULL;
  __pyx_t_15 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_14)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_15 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[12] = {__pyx_t_14, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_15, 11+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[12] = {__pyx_t_14, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_15, 11+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  {
    __pyx_t_16 = PyTuple_New(11+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    if (__pyx_t_14) {
      __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_14); __pyx_t_14 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_15, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_16, 3+__pyx_t_15, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_16, 4+__pyx_t_15, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_16, 5+__pyx_t_15, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_16, 6+__pyx_t_15, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_16, 7+__pyx_t_15, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_16, 8+__pyx_t_15, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_16, 9+__pyx_t_15, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_16, 10+__pyx_t_15, __pyx_t_13);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    __pyx_t_12 = 0;
    __pyx_t_13 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":682
 *         self.triggered = triggered
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "CRawHit: channel_id({0}), dom_id({1}), tot({2}), " \
 *                "time({3}), triggered({4}), " \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":690
 *                        self.dir_x, self.dir_y, self.dir_z)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_4__repr__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 690, 0, __PYX_ERR(0, 690, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":691
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(691,0,__PYX_ERR(0, 691, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":690
 *                        self.dir_x, self.dir_y, self.dir_z)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":693
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_7CRawHit_6__insp__[] = "CRawHit.__insp__(self)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_6__insp__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 693, 0, __PYX_ERR(0, 693, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":694
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(694,0,__PYX_ERR(0, 694, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":693
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":649
 * 
 *     """
 *     cdef public int dom_id, tot, channel_id, du, floor             # <<<<<<<<<<<<<<
 *     cdef public float dir_x, dir_y, dir_z, pos_x, pos_y, pos_z, t0
 *     cdef public double time
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_6dom_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_6dom_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_6dom_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_6dom_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 649, 0, __PYX_ERR(0, 649, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dom_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.dom_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_6dom_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_6dom_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_6dom_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_6dom_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 649, 0, __PYX_ERR(0, 649, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 649, __pyx_L1_error)
  __pyx_v_self->dom_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.dom_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_3tot_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_3tot_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_3tot___get__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_3tot___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 649, 0, __PYX_ERR(0, 649, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->tot); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.tot.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_3tot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_3tot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_3tot_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_3tot_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 649, 0, __PYX_ERR(0, 649, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 649, __pyx_L1_error)
  __pyx_v_self->tot = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.tot.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_10channel_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_10channel_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_10channel_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_10channel_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 649, 0, __PYX_ERR(0, 649, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->channel_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.channel_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_10channel_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_10channel_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_10channel_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_10channel_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 649, 0, __PYX_ERR(0, 649, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 649, __pyx_L1_error)
  __pyx_v_self->channel_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.channel_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_2du_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_2du_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_2du___get__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_2du___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 649, 0, __PYX_ERR(0, 649, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->du); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.du.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_2du_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_2du_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_2du_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_2du_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 649, 0, __PYX_ERR(0, 649, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 649, __pyx_L1_error)
  __pyx_v_self->du = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.du.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_5floor_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_5floor_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5floor___get__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_5floor___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 649, 0, __PYX_ERR(0, 649, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->floor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.floor.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5floor_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5floor_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5floor_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5floor_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 649, 0, __PYX_ERR(0, 649, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 649, __pyx_L1_error)
  __pyx_v_self->floor = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.floor.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":650
 *     """
 *     cdef public int dom_id, tot, channel_id, du, floor
 *     cdef public float dir_x, dir_y, dir_z, pos_x, pos_y, pos_z, t0             # <<<<<<<<<<<<<<
 *     cdef public double time
 *     cdef public unsigned short int triggered
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_x_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_x_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_x___get__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_x___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dir_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.dir_x.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_x_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_x_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 650, __pyx_L1_error)
  __pyx_v_self->dir_x = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.dir_x.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_y_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_y_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_y___get__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_y___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dir_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.dir_y.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_y_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_y_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 650, __pyx_L1_error)
  __pyx_v_self->dir_y = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.dir_y.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_z_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_z_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_z___get__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_z___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dir_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.dir_z.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_z_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_z_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_z_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5dir_z_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 650, __pyx_L1_error)
  __pyx_v_self->dir_z = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.dir_z.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_x_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_x_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_x___get__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_x___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->pos_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.pos_x.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_x_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_x_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 650, __pyx_L1_error)
  __pyx_v_self->pos_x = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.pos_x.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_y_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_y_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_y___get__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_y___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->pos_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.pos_y.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_y_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_y_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 650, __pyx_L1_error)
  __pyx_v_self->pos_y = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.pos_y.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_z_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_z_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_z___get__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_z___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->pos_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.pos_z.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_z_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_z_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_z_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_5pos_z_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 650, __pyx_L1_error)
  __pyx_v_self->pos_z = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.pos_z.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_2t0_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_2t0_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_2t0___get__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_2t0___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->t0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.t0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_2t0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_2t0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_2t0_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_2t0_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 650, __pyx_L1_error)
  __pyx_v_self->t0 = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.t0.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":651
 *     cdef public int dom_id, tot, channel_id, du, floor
 *     cdef public float dir_x, dir_y, dir_z, pos_x, pos_y, pos_z, t0
 *     cdef public double time             # <<<<<<<<<<<<<<
 *     cdef public unsigned short int triggered
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_4time_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_4time___get__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 651, 0, __PYX_ERR(0, 651, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_4time_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 651, 0, __PYX_ERR(0, 651, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 651, __pyx_L1_error)
  __pyx_v_self->time = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.time.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":652
 *     cdef public float dir_x, dir_y, dir_z, pos_x, pos_y, pos_z, t0
 *     cdef public double time
 *     cdef public unsigned short int triggered             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_9triggered_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_9triggered_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_9triggered___get__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_9triggered___get__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 652, 0, __PYX_ERR(0, 652, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->triggered); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.triggered.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_9triggered_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7CRawHit_9triggered_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_9triggered_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7CRawHit_9triggered_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned short __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 652, 0, __PYX_ERR(0, 652, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_unsigned_short(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 652, __pyx_L1_error)
  __pyx_v_self->triggered = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.triggered.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_7CRawHit_8__reduce_cython__[] = "CRawHit.__reduce_cython__(self)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_8__reduce_cython__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __Pyx_TraceLine(2,0,__PYX_ERR(1, 2, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_7CRawHit_10__setstate_cython__[] = "CRawHit.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7CRawHit_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7CRawHit_10__setstate_cython__(((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7CRawHit_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHit.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":712
 *     cdef public np.ndarray dir
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   int channel_id,
 *                   int dom_id,
 */

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_channel_id;
  int __pyx_v_dom_id;
  int __pyx_v_time;
  int __pyx_v_tot;
  CYTHON_UNUSED int __pyx_v_frame_id;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_channel_id,&__pyx_n_s_dom_id,&__pyx_n_s_time,&__pyx_n_s_tot,&__pyx_n_s_frame_id,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_channel_id)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dom_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 1); __PYX_ERR(0, 712, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 2); __PYX_ERR(0, 712, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tot)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 3); __PYX_ERR(0, 712, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame_id);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 712, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_channel_id = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_channel_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 713, __pyx_L3_error)
    __pyx_v_dom_id = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dom_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 714, __pyx_L3_error)
    __pyx_v_time = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_time == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 715, __pyx_L3_error)
    __pyx_v_tot = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_tot == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 716, __pyx_L3_error)
    if (values[4]) {
      __pyx_v_frame_id = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_frame_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 717, __pyx_L3_error)
    } else {
      __pyx_v_frame_id = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 712, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit___cinit__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self), __pyx_v_channel_id, __pyx_v_dom_id, __pyx_v_time, __pyx_v_tot, __pyx_v_frame_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, int __pyx_v_channel_id, int __pyx_v_dom_id, int __pyx_v_time, int __pyx_v_tot, CYTHON_UNUSED int __pyx_v_frame_id) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 712, 0, __PYX_ERR(0, 712, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":719
 *                   int frame_id=0        # ignore this!
 *                   ):
 *         self.channel_id = channel_id             # <<<<<<<<<<<<<<
 *         self.dom_id = dom_id
 *         self.time = time
 */
  __Pyx_TraceLine(719,0,__PYX_ERR(0, 719, __pyx_L1_error))
  __pyx_v_self->channel_id = __pyx_v_channel_id;

  /* "km3pipe/dataclasses.pyx":720
 *                   ):
 *         self.channel_id = channel_id
 *         self.dom_id = dom_id             # <<<<<<<<<<<<<<
 *         self.time = time
 *         self.tot = tot
 */
  __Pyx_TraceLine(720,0,__PYX_ERR(0, 720, __pyx_L1_error))
  __pyx_v_self->dom_id = __pyx_v_dom_id;

  /* "km3pipe/dataclasses.pyx":721
 *         self.channel_id = channel_id
 *         self.dom_id = dom_id
 *         self.time = time             # <<<<<<<<<<<<<<
 *         self.tot = tot
 * 
 */
  __Pyx_TraceLine(721,0,__PYX_ERR(0, 721, __pyx_L1_error))
  __pyx_v_self->time = __pyx_v_time;

  /* "km3pipe/dataclasses.pyx":722
 *         self.dom_id = dom_id
 *         self.time = time
 *         self.tot = tot             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(722,0,__PYX_ERR(0, 722, __pyx_L1_error))
  __pyx_v_self->tot = __pyx_v_tot;

  /* "km3pipe/dataclasses.pyx":712
 *     cdef public np.ndarray dir
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   int channel_id,
 *                   int dom_id,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":724
 *         self.tot = tot
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "TimesliceHit: channel_id({0}), dom_id({1}), tot({2}), " \
 *                "time({3})" \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_2__str__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 724, 0, __PYX_ERR(0, 724, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":725
 * 
 *     def __str__(self):
 *         return "TimesliceHit: channel_id({0}), dom_id({1}), tot({2}), " \             # <<<<<<<<<<<<<<
 *                "time({3})" \
 *                .format(self.channel_id, self.dom_id, self.tot, self.time)
 */
  __Pyx_TraceLine(725,0,__PYX_ERR(0, 725, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":727
 *         return "TimesliceHit: channel_id({0}), dom_id({1}), tot({2}), " \
 *                "time({3})" \
 *                .format(self.channel_id, self.dom_id, self.tot, self.time)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(727,0,__PYX_ERR(0, 727, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_TimesliceHit_channel_id_0_dom_id, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->channel_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->dom_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->tot); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_6);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":724
 *         self.tot = tot
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "TimesliceHit: channel_id({0}), dom_id({1}), tot({2}), " \
 *                "time({3})" \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":729
 *                .format(self.channel_id, self.dom_id, self.tot, self.time)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4__repr__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 729, 0, __PYX_ERR(0, 729, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":730
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(730,0,__PYX_ERR(0, 730, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":729
 *                .format(self.channel_id, self.dom_id, self.tot, self.time)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":732
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12TimesliceHit_6__insp__[] = "TimesliceHit.__insp__(self)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6__insp__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 732, 0, __PYX_ERR(0, 732, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":733
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(733,0,__PYX_ERR(0, 733, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":732
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":708
 * 
 *     """
 *     cdef public int dom_id, time, tot, channel_id             # <<<<<<<<<<<<<<
 *     cdef public np.ndarray pos
 *     cdef public np.ndarray dir
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6dom_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6dom_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 708, 0, __PYX_ERR(0, 708, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dom_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.dom_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 708, 0, __PYX_ERR(0, 708, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 708, __pyx_L1_error)
  __pyx_v_self->dom_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.dom_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_4time_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4time___get__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 708, 0, __PYX_ERR(0, 708, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4time_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 708, 0, __PYX_ERR(0, 708, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 708, __pyx_L1_error)
  __pyx_v_self->time = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.time.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3tot_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3tot_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3tot___get__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3tot___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 708, 0, __PYX_ERR(0, 708, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->tot); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.tot.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3tot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3tot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3tot_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3tot_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 708, 0, __PYX_ERR(0, 708, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 708, __pyx_L1_error)
  __pyx_v_self->tot = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.tot.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_10channel_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_10channel_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 708, 0, __PYX_ERR(0, 708, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->channel_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.channel_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 708, 0, __PYX_ERR(0, 708, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 708, __pyx_L1_error)
  __pyx_v_self->channel_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.channel_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":709
 *     """
 *     cdef public int dom_id, time, tot, channel_id
 *     cdef public np.ndarray pos             # <<<<<<<<<<<<<<
 *     cdef public np.ndarray dir
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos___get__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 709, 0, __PYX_ERR(0, 709, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->pos));
  __pyx_r = ((PyObject *)__pyx_v_self->pos);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 709, 0, __PYX_ERR(0, 709, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 709, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->pos);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pos));
  __pyx_v_self->pos = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.pos.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos_4__del__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3pos_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[0], 709, 0, __PYX_ERR(0, 709, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->pos);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pos));
  __pyx_v_self->pos = ((PyArrayObject *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.pos.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":710
 *     cdef public int dom_id, time, tot, channel_id
 *     cdef public np.ndarray pos
 *     cdef public np.ndarray dir             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir___get__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir___get__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 710, 0, __PYX_ERR(0, 710, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->dir));
  __pyx_r = ((PyObject *)__pyx_v_self->dir);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.dir.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 710, 0, __PYX_ERR(0, 710, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 710, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->dir);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->dir));
  __pyx_v_self->dir = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.dir.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir_4__del__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_3dir_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[0], 710, 0, __PYX_ERR(0, 710, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->dir);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->dir));
  __pyx_v_self->dir = ((PyArrayObject *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.dir.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12TimesliceHit_8__reduce_cython__[] = "TimesliceHit.__reduce_cython__(self)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_8__reduce_cython__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __Pyx_TraceLine(2,0,__PYX_ERR(1, 2, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12TimesliceHit_10__setstate_cython__[] = "TimesliceHit.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_10__setstate_cython__(((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12TimesliceHit_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHit.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":751
 *     cdef public int origin, pmt_id
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   float a,
 *                   int origin,
 */

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5McHit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5McHit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  float __pyx_v_a;
  int __pyx_v_origin;
  int __pyx_v_pmt_id;
  double __pyx_v_time;
  CYTHON_UNUSED int __pyx_v_event_id;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_origin,&__pyx_n_s_pmt_id,&__pyx_n_s_time,&__pyx_n_s_event_id,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_origin)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 1); __PYX_ERR(0, 751, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pmt_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 2); __PYX_ERR(0, 751, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 3); __PYX_ERR(0, 751, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 751, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_a = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_a == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 752, __pyx_L3_error)
    __pyx_v_origin = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_origin == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 753, __pyx_L3_error)
    __pyx_v_pmt_id = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_pmt_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 754, __pyx_L3_error)
    __pyx_v_time = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_time == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 755, __pyx_L3_error)
    if (values[4]) {
      __pyx_v_event_id = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_event_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 756, __pyx_L3_error)
    } else {
      __pyx_v_event_id = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 751, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHit.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5McHit___cinit__(((struct __pyx_obj_7km3pipe_11dataclasses_McHit *)__pyx_v_self), __pyx_v_a, __pyx_v_origin, __pyx_v_pmt_id, __pyx_v_time, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5McHit___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self, float __pyx_v_a, int __pyx_v_origin, int __pyx_v_pmt_id, double __pyx_v_time, CYTHON_UNUSED int __pyx_v_event_id) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 751, 0, __PYX_ERR(0, 751, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":758
 *                   int event_id=0        # ignore this! just for init * magic
 *                   ):
 *         self.a = a             # <<<<<<<<<<<<<<
 *         self.origin = origin
 *         self.pmt_id = pmt_id
 */
  __Pyx_TraceLine(758,0,__PYX_ERR(0, 758, __pyx_L1_error))
  __pyx_v_self->a = __pyx_v_a;

  /* "km3pipe/dataclasses.pyx":759
 *                   ):
 *         self.a = a
 *         self.origin = origin             # <<<<<<<<<<<<<<
 *         self.pmt_id = pmt_id
 *         self.time = time
 */
  __Pyx_TraceLine(759,0,__PYX_ERR(0, 759, __pyx_L1_error))
  __pyx_v_self->origin = __pyx_v_origin;

  /* "km3pipe/dataclasses.pyx":760
 *         self.a = a
 *         self.origin = origin
 *         self.pmt_id = pmt_id             # <<<<<<<<<<<<<<
 *         self.time = time
 * 
 */
  __Pyx_TraceLine(760,0,__PYX_ERR(0, 760, __pyx_L1_error))
  __pyx_v_self->pmt_id = __pyx_v_pmt_id;

  /* "km3pipe/dataclasses.pyx":761
 *         self.origin = origin
 *         self.pmt_id = pmt_id
 *         self.time = time             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(761,0,__PYX_ERR(0, 761, __pyx_L1_error))
  __pyx_v_self->time = __pyx_v_time;

  /* "km3pipe/dataclasses.pyx":751
 *     cdef public int origin, pmt_id
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   float a,
 *                   int origin,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHit.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":763
 *         self.time = time
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "McHit: a({0}), origin({1}), pmt_id({2}), time({3})" \
 *                .format(self.a, self.origin, self.pmt_id, self.time)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5McHit_2__str__(((struct __pyx_obj_7km3pipe_11dataclasses_McHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 763, 0, __PYX_ERR(0, 763, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":764
 * 
 *     def __str__(self):
 *         return "McHit: a({0}), origin({1}), pmt_id({2}), time({3})" \             # <<<<<<<<<<<<<<
 *                .format(self.a, self.origin, self.pmt_id, self.time)
 * 
 */
  __Pyx_TraceLine(764,0,__PYX_ERR(0, 764, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":765
 *     def __str__(self):
 *         return "McHit: a({0}), origin({1}), pmt_id({2}), time({3})" \
 *                .format(self.a, self.origin, self.pmt_id, self.time)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(765,0,__PYX_ERR(0, 765, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_McHit_a_0_origin_1_pmt_id_2_time, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->origin); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->pmt_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_6);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":763
 *         self.time = time
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "McHit: a({0}), origin({1}), pmt_id({2}), time({3})" \
 *                .format(self.a, self.origin, self.pmt_id, self.time)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHit.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":767
 *                .format(self.a, self.origin, self.pmt_id, self.time)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5McHit_4__repr__(((struct __pyx_obj_7km3pipe_11dataclasses_McHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 767, 0, __PYX_ERR(0, 767, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":768
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(768,0,__PYX_ERR(0, 768, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":767
 *                .format(self.a, self.origin, self.pmt_id, self.time)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHit.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":770
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5McHit_6__insp__[] = "McHit.__insp__(self)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5McHit_6__insp__(((struct __pyx_obj_7km3pipe_11dataclasses_McHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 770, 0, __PYX_ERR(0, 770, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":771
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(771,0,__PYX_ERR(0, 771, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 771, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 771, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":770
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHit.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":747
 * 
 *     """
 *     cdef public float a             # <<<<<<<<<<<<<<
 *     cdef public double time
 *     cdef public int origin, pmt_id
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_1a_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_1a_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5McHit_1a___get__(((struct __pyx_obj_7km3pipe_11dataclasses_McHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_1a___get__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 747, 0, __PYX_ERR(0, 747, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->a); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHit.a.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5McHit_1a_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5McHit_1a_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5McHit_1a_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_McHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5McHit_1a_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 747, 0, __PYX_ERR(0, 747, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 747, __pyx_L1_error)
  __pyx_v_self->a = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHit.a.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":748
 *     """
 *     cdef public float a
 *     cdef public double time             # <<<<<<<<<<<<<<
 *     cdef public int origin, pmt_id
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_4time_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5McHit_4time___get__(((struct __pyx_obj_7km3pipe_11dataclasses_McHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 748, 0, __PYX_ERR(0, 748, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHit.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5McHit_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5McHit_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5McHit_4time_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_McHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5McHit_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 748, 0, __PYX_ERR(0, 748, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 748, __pyx_L1_error)
  __pyx_v_self->time = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHit.time.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":749
 *     cdef public float a
 *     cdef public double time
 *     cdef public int origin, pmt_id             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_6origin_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_6origin_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5McHit_6origin___get__(((struct __pyx_obj_7km3pipe_11dataclasses_McHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_6origin___get__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 749, 0, __PYX_ERR(0, 749, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->origin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHit.origin.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5McHit_6origin_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5McHit_6origin_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5McHit_6origin_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_McHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5McHit_6origin_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 749, 0, __PYX_ERR(0, 749, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 749, __pyx_L1_error)
  __pyx_v_self->origin = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHit.origin.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_6pmt_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_6pmt_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5McHit_6pmt_id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_McHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_6pmt_id___get__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 749, 0, __PYX_ERR(0, 749, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->pmt_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHit.pmt_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5McHit_6pmt_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5McHit_6pmt_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5McHit_6pmt_id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_McHit *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5McHit_6pmt_id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 749, 0, __PYX_ERR(0, 749, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 749, __pyx_L1_error)
  __pyx_v_self->pmt_id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHit.pmt_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5McHit_8__reduce_cython__[] = "McHit.__reduce_cython__(self)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5McHit_8__reduce_cython__(((struct __pyx_obj_7km3pipe_11dataclasses_McHit *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __Pyx_TraceLine(2,0,__PYX_ERR(1, 2, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHit.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5McHit_10__setstate_cython__[] = "McHit.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5McHit_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5McHit_10__setstate_cython__(((struct __pyx_obj_7km3pipe_11dataclasses_McHit *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5McHit_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_McHit *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHit.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":796
 *     cdef public np.ndarray dir
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   float bjorkeny,
 *                   dir,
 */

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  float __pyx_v_bjorkeny;
  PyObject *__pyx_v_dir = 0;
  float __pyx_v_energy;
  int __pyx_v_id;
  __pyx_t_5numpy_int64_t __pyx_v_interaction_channel;
  unsigned short __pyx_v_is_cc;
  float __pyx_v_length;
  PyObject *__pyx_v_pos = 0;
  int __pyx_v_time;
  int __pyx_v_type;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bjorkeny,&__pyx_n_s_dir,&__pyx_n_s_energy,&__pyx_n_s_id,&__pyx_n_s_interaction_channel,&__pyx_n_s_is_cc,&__pyx_n_s_length,&__pyx_n_s_pos,&__pyx_n_s_time,&__pyx_n_s_type,0};
    PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bjorkeny)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 1); __PYX_ERR(0, 796, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 2); __PYX_ERR(0, 796, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 3); __PYX_ERR(0, 796, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_interaction_channel)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 4); __PYX_ERR(0, 796, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_is_cc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 5); __PYX_ERR(0, 796, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_length)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 6); __PYX_ERR(0, 796, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 7); __PYX_ERR(0, 796, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 8); __PYX_ERR(0, 796, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, 9); __PYX_ERR(0, 796, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 796, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 10) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
      values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
    }
    __pyx_v_bjorkeny = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_bjorkeny == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 797, __pyx_L3_error)
    __pyx_v_dir = values[1];
    __pyx_v_energy = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_energy == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 799, __pyx_L3_error)
    __pyx_v_id = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 800, __pyx_L3_error)
    __pyx_v_interaction_channel = __Pyx_PyInt_As_npy_int64(values[4]); if (unlikely((__pyx_v_interaction_channel == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 801, __pyx_L3_error)
    __pyx_v_is_cc = __Pyx_PyInt_As_unsigned_short(values[5]); if (unlikely((__pyx_v_is_cc == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 802, __pyx_L3_error)
    __pyx_v_length = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_length == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 803, __pyx_L3_error)
    __pyx_v_pos = values[7];
    __pyx_v_time = __Pyx_PyInt_As_int(values[8]); if (unlikely((__pyx_v_time == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 805, __pyx_L3_error)
    __pyx_v_type = __Pyx_PyInt_As_int(values[9]); if (unlikely((__pyx_v_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 806, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 10, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 796, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track___cinit__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), __pyx_v_bjorkeny, __pyx_v_dir, __pyx_v_energy, __pyx_v_id, __pyx_v_interaction_channel, __pyx_v_is_cc, __pyx_v_length, __pyx_v_pos, __pyx_v_time, __pyx_v_type);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5Track___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, float __pyx_v_bjorkeny, PyObject *__pyx_v_dir, float __pyx_v_energy, int __pyx_v_id, __pyx_t_5numpy_int64_t __pyx_v_interaction_channel, unsigned short __pyx_v_is_cc, float __pyx_v_length, PyObject *__pyx_v_pos, int __pyx_v_time, int __pyx_v_type) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 796, 0, __PYX_ERR(0, 796, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":808
 *                   int type
 *                   ):
 *         self.bjorkeny = bjorkeny             # <<<<<<<<<<<<<<
 *         self.is_cc = is_cc
 *         self.dir = dir
 */
  __Pyx_TraceLine(808,0,__PYX_ERR(0, 808, __pyx_L1_error))
  __pyx_v_self->bjorkeny = __pyx_v_bjorkeny;

  /* "km3pipe/dataclasses.pyx":809
 *                   ):
 *         self.bjorkeny = bjorkeny
 *         self.is_cc = is_cc             # <<<<<<<<<<<<<<
 *         self.dir = dir
 *         self.energy = energy
 */
  __Pyx_TraceLine(809,0,__PYX_ERR(0, 809, __pyx_L1_error))
  __pyx_v_self->is_cc = __pyx_v_is_cc;

  /* "km3pipe/dataclasses.pyx":810
 *         self.bjorkeny = bjorkeny
 *         self.is_cc = is_cc
 *         self.dir = dir             # <<<<<<<<<<<<<<
 *         self.energy = energy
 *         self.interaction_channel = interaction_channel
 */
  __Pyx_TraceLine(810,0,__PYX_ERR(0, 810, __pyx_L1_error))
  if (!(likely(((__pyx_v_dir) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dir, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 810, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_dir;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->dir);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->dir));
  __pyx_v_self->dir = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":811
 *         self.is_cc = is_cc
 *         self.dir = dir
 *         self.energy = energy             # <<<<<<<<<<<<<<
 *         self.interaction_channel = interaction_channel
 *         self.id = id
 */
  __Pyx_TraceLine(811,0,__PYX_ERR(0, 811, __pyx_L1_error))
  __pyx_v_self->energy = __pyx_v_energy;

  /* "km3pipe/dataclasses.pyx":812
 *         self.dir = dir
 *         self.energy = energy
 *         self.interaction_channel = interaction_channel             # <<<<<<<<<<<<<<
 *         self.id = id
 *         self.length = length
 */
  __Pyx_TraceLine(812,0,__PYX_ERR(0, 812, __pyx_L1_error))
  __pyx_v_self->interaction_channel = __pyx_v_interaction_channel;

  /* "km3pipe/dataclasses.pyx":813
 *         self.energy = energy
 *         self.interaction_channel = interaction_channel
 *         self.id = id             # <<<<<<<<<<<<<<
 *         self.length = length
 *         self.pos = pos
 */
  __Pyx_TraceLine(813,0,__PYX_ERR(0, 813, __pyx_L1_error))
  __pyx_v_self->id = __pyx_v_id;

  /* "km3pipe/dataclasses.pyx":814
 *         self.interaction_channel = interaction_channel
 *         self.id = id
 *         self.length = length             # <<<<<<<<<<<<<<
 *         self.pos = pos
 *         self.time = time
 */
  __Pyx_TraceLine(814,0,__PYX_ERR(0, 814, __pyx_L1_error))
  __pyx_v_self->length = __pyx_v_length;

  /* "km3pipe/dataclasses.pyx":815
 *         self.id = id
 *         self.length = length
 *         self.pos = pos             # <<<<<<<<<<<<<<
 *         self.time = time
 *         self.type = type
 */
  __Pyx_TraceLine(815,0,__PYX_ERR(0, 815, __pyx_L1_error))
  if (!(likely(((__pyx_v_pos) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_pos, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 815, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_pos;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->pos);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pos));
  __pyx_v_self->pos = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":816
 *         self.length = length
 *         self.pos = pos
 *         self.time = time             # <<<<<<<<<<<<<<
 *         self.type = type
 * 
 */
  __Pyx_TraceLine(816,0,__PYX_ERR(0, 816, __pyx_L1_error))
  __pyx_v_self->time = __pyx_v_time;

  /* "km3pipe/dataclasses.pyx":817
 *         self.pos = pos
 *         self.time = time
 *         self.type = type             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(817,0,__PYX_ERR(0, 817, __pyx_L1_error))
  __pyx_v_self->type = __pyx_v_type;

  /* "km3pipe/dataclasses.pyx":796
 *     cdef public np.ndarray dir
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   float bjorkeny,
 *                   dir,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":819
 *         self.type = type
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Track: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})" \
 *                .format(self.pos, self.dir, self.time, self.energy,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_2__str__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 819, 0, __PYX_ERR(0, 819, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":820
 * 
 *     def __str__(self):
 *         return "Track: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})" \             # <<<<<<<<<<<<<<
 *                .format(self.pos, self.dir, self.time, self.energy,
 *                        self.type, pdg2name(self.type))
 */
  __Pyx_TraceLine(820,0,__PYX_ERR(0, 820, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":821
 *     def __str__(self):
 *         return "Track: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})" \
 *                .format(self.pos, self.dir, self.time, self.energy,             # <<<<<<<<<<<<<<
 *                        self.type, pdg2name(self.type))
 * 
 */
  __Pyx_TraceLine(821,0,__PYX_ERR(0, 821, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Track_pos_0_dir_1_t_2_E_3_type_4, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->energy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":822
 *         return "Track: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})" \
 *                .format(self.pos, self.dir, self.time, self.energy,
 *                        self.type, pdg2name(self.type))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(822,0,__PYX_ERR(0, 822, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdg2name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_self->type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_9) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_11 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_11 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_7, ((PyObject *)__pyx_v_self->pos), ((PyObject *)__pyx_v_self->dir), __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 6+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_7, ((PyObject *)__pyx_v_self->pos), ((PyObject *)__pyx_v_self->dir), __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 6+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(6+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self->pos));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->pos));
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_11, ((PyObject *)__pyx_v_self->pos));
    __Pyx_INCREF(((PyObject *)__pyx_v_self->dir));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->dir));
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_11, ((PyObject *)__pyx_v_self->dir));
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_11, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_11, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_11, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 5+__pyx_t_11, __pyx_t_6);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":819
 *         self.type = type
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Track: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})" \
 *                .format(self.pos, self.dir, self.time, self.energy,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":824
 *                        self.type, pdg2name(self.type))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_4__repr__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 824, 0, __PYX_ERR(0, 824, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":825
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(825,0,__PYX_ERR(0, 825, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":824
 *                        self.type, pdg2name(self.type))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":827
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Track_6__insp__[] = "Track.__insp__(self)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_6__insp__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 827, 0, __PYX_ERR(0, 827, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":828
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(828,0,__PYX_ERR(0, 828, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":827
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":790
 *     type : int
 *     """
 *     cdef public int id, time, type, interaction_channel             # <<<<<<<<<<<<<<
 *     cdef public float energy, length, bjorkeny
 *     cdef public unsigned short int is_cc
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_2id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_2id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_2id___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 790, 0, __PYX_ERR(0, 790, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_2id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5Track_2id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 790, 0, __PYX_ERR(0, 790, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 790, __pyx_L1_error)
  __pyx_v_self->id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_4time_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_4time___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 790, 0, __PYX_ERR(0, 790, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_4time_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5Track_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 790, 0, __PYX_ERR(0, 790, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 790, __pyx_L1_error)
  __pyx_v_self->time = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.time.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_4type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_4type___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_4type___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 790, 0, __PYX_ERR(0, 790, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_4type_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5Track_4type_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 790, 0, __PYX_ERR(0, 790, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 790, __pyx_L1_error)
  __pyx_v_self->type = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_19interaction_channel_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_19interaction_channel_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_19interaction_channel___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_19interaction_channel___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 790, 0, __PYX_ERR(0, 790, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->interaction_channel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.interaction_channel.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_19interaction_channel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_19interaction_channel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_19interaction_channel_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5Track_19interaction_channel_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 790, 0, __PYX_ERR(0, 790, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 790, __pyx_L1_error)
  __pyx_v_self->interaction_channel = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.interaction_channel.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":791
 *     """
 *     cdef public int id, time, type, interaction_channel
 *     cdef public float energy, length, bjorkeny             # <<<<<<<<<<<<<<
 *     cdef public unsigned short int is_cc
 *     cdef public np.ndarray pos
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_6energy_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_6energy_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_6energy___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_6energy___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 791, 0, __PYX_ERR(0, 791, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->energy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.energy.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_6energy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_6energy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_6energy_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5Track_6energy_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 791, 0, __PYX_ERR(0, 791, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
  __pyx_v_self->energy = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.energy.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_6length_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_6length_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_6length___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_6length___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 791, 0, __PYX_ERR(0, 791, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_6length_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_6length_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_6length_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5Track_6length_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 791, 0, __PYX_ERR(0, 791, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
  __pyx_v_self->length = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.length.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_8bjorkeny_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_8bjorkeny_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_8bjorkeny___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_8bjorkeny___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 791, 0, __PYX_ERR(0, 791, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->bjorkeny); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.bjorkeny.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_8bjorkeny_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_8bjorkeny_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_8bjorkeny_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5Track_8bjorkeny_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 791, 0, __PYX_ERR(0, 791, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
  __pyx_v_self->bjorkeny = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.bjorkeny.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":792
 *     cdef public int id, time, type, interaction_channel
 *     cdef public float energy, length, bjorkeny
 *     cdef public unsigned short int is_cc             # <<<<<<<<<<<<<<
 *     cdef public np.ndarray pos
 *     cdef public np.ndarray dir
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_5is_cc_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_5is_cc_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_5is_cc___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_5is_cc___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 792, 0, __PYX_ERR(0, 792, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->is_cc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.is_cc.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_5is_cc_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_5is_cc_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_5is_cc_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5Track_5is_cc_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned short __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 792, 0, __PYX_ERR(0, 792, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_unsigned_short(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 792, __pyx_L1_error)
  __pyx_v_self->is_cc = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.is_cc.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":793
 *     cdef public float energy, length, bjorkeny
 *     cdef public unsigned short int is_cc
 *     cdef public np.ndarray pos             # <<<<<<<<<<<<<<
 *     cdef public np.ndarray dir
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_3pos_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_3pos___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_3pos___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 793, 0, __PYX_ERR(0, 793, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->pos));
  __pyx_r = ((PyObject *)__pyx_v_self->pos);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_3pos_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5Track_3pos_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 793, 0, __PYX_ERR(0, 793, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 793, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->pos);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pos));
  __pyx_v_self->pos = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.pos.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_3pos_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_3pos_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_3pos_4__del__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5Track_3pos_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[0], 793, 0, __PYX_ERR(0, 793, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->pos);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pos));
  __pyx_v_self->pos = ((PyArrayObject *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.pos.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":794
 *     cdef public unsigned short int is_cc
 *     cdef public np.ndarray pos
 *     cdef public np.ndarray dir             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_3dir_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_3dir_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_3dir___get__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_3dir___get__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 794, 0, __PYX_ERR(0, 794, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->dir));
  __pyx_r = ((PyObject *)__pyx_v_self->dir);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.dir.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_3dir_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_3dir_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_3dir_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5Track_3dir_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 794, 0, __PYX_ERR(0, 794, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 794, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->dir);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->dir));
  __pyx_v_self->dir = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.dir.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_5Track_3dir_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_5Track_3dir_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_3dir_4__del__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_5Track_3dir_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[0], 794, 0, __PYX_ERR(0, 794, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->dir);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->dir));
  __pyx_v_self->dir = ((PyArrayObject *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.dir.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Track_8__reduce_cython__[] = "Track.__reduce_cython__(self)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_8__reduce_cython__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __Pyx_TraceLine(2,0,__PYX_ERR(1, 2, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_5Track_10__setstate_cython__[] = "Track.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_5Track_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_5Track_10__setstate_cython__(((struct __pyx_obj_7km3pipe_11dataclasses_Track *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_5Track_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_Track *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.Track.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":844
 *     write_separate_columns = True
 * 
 *     def __init__(self, arr, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries___init__[] = "RawHitSeries.__init__(self, arr, event_id, h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_arr_2,&__pyx_n_s_event_id,&__pyx_n_s_h5loc,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); __PYX_ERR(0, 844, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); __PYX_ERR(0, 844, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 844, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_arr = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_h5loc = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 844, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12RawHitSeries___init__(__pyx_self, __pyx_v_self, __pyx_v_arr, __pyx_v_event_id, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__73)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 844, 0, __PYX_ERR(0, 844, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":845
 * 
 *     def __init__(self, arr, event_id, h5loc='/'):
 *         self._arr = arr             # <<<<<<<<<<<<<<
 *         self._index = 0
 *         self._hits = None
 */
  __Pyx_TraceLine(845,0,__PYX_ERR(0, 845, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_arr, __pyx_v_arr) < 0) __PYX_ERR(0, 845, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":846
 *     def __init__(self, arr, event_id, h5loc='/'):
 *         self._arr = arr
 *         self._index = 0             # <<<<<<<<<<<<<<
 *         self._hits = None
 *         self.event_id = event_id
 */
  __Pyx_TraceLine(846,0,__PYX_ERR(0, 846, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_int_0) < 0) __PYX_ERR(0, 846, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":847
 *         self._arr = arr
 *         self._index = 0
 *         self._hits = None             # <<<<<<<<<<<<<<
 *         self.event_id = event_id
 *         self.h5loc = h5loc
 */
  __Pyx_TraceLine(847,0,__PYX_ERR(0, 847, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_hits, Py_None) < 0) __PYX_ERR(0, 847, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":848
 *         self._index = 0
 *         self._hits = None
 *         self.event_id = event_id             # <<<<<<<<<<<<<<
 *         self.h5loc = h5loc
 * #        self.tabname = str(event_id)  # used when h5loc='/hits'
 */
  __Pyx_TraceLine(848,0,__PYX_ERR(0, 848, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_event_id, __pyx_v_event_id) < 0) __PYX_ERR(0, 848, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":849
 *         self._hits = None
 *         self.event_id = event_id
 *         self.h5loc = h5loc             # <<<<<<<<<<<<<<
 * #        self.tabname = str(event_id)  # used when h5loc='/hits'
 * 
 */
  __Pyx_TraceLine(849,0,__PYX_ERR(0, 849, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 849, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":844
 *     write_separate_columns = True
 * 
 *     def __init__(self, arr, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":853
 * 
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         try:
 *             return cls(np.array([(
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_3from_aanet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_2from_aanet[] = "RawHitSeries.from_aanet(cls, hits, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_3from_aanet = {"from_aanet", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_3from_aanet, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_2from_aanet};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_3from_aanet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_hits = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_aanet (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_hits_2,&__pyx_n_s_event_id,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hits_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, 1); __PYX_ERR(0, 853, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, 2); __PYX_ERR(0, 853, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_aanet") < 0)) __PYX_ERR(0, 853, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_cls = values[0];
    __pyx_v_hits = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 853, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.from_aanet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_2from_aanet(__pyx_self, __pyx_v_cls, __pyx_v_hits, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_2from_aanet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_hits, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_h = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  long __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__74)
  __Pyx_RefNannySetupContext("from_aanet", 0);
  __Pyx_TraceCall("from_aanet", __pyx_f[0], 853, 0, __PYX_ERR(0, 853, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":854
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):
 *         try:             # <<<<<<<<<<<<<<
 *             return cls(np.array([(
 *                 h.channel_id,
 */
  __Pyx_TraceLine(854,0,__PYX_ERR(0, 854, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":855
 *     def from_aanet(cls, hits, event_id):
 *         try:
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 h.channel_id,
 *                 h.dom_id,
 */
      __Pyx_TraceLine(855,0,__PYX_ERR(0, 855, __pyx_L3_error))
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 855, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "km3pipe/dataclasses.pyx":862
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             # Older aanet format.
 */
      __Pyx_TraceLine(862,0,__PYX_ERR(0, 862, __pyx_L3_error))
      if (likely(PyList_CheckExact(__pyx_v_hits)) || PyTuple_CheckExact(__pyx_v_hits)) {
        __pyx_t_7 = __pyx_v_hits; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_hits); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 862, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 862, __pyx_L3_error)
      }
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_7))) {
            if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_10 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 862, __pyx_L3_error)
            #else
            __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 862, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_10);
            #endif
          } else {
            if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 862, __pyx_L3_error)
            #else
            __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 862, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_10);
            #endif
          }
        } else {
          __pyx_t_10 = __pyx_t_9(__pyx_t_7);
          if (unlikely(!__pyx_t_10)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 862, __pyx_L3_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_10);
        }
        __Pyx_XDECREF_SET(__pyx_v_h, __pyx_t_10);
        __pyx_t_10 = 0;

        /* "km3pipe/dataclasses.pyx":856
 *         try:
 *             return cls(np.array([(
 *                 h.channel_id,             # <<<<<<<<<<<<<<
 *                 h.dom_id,
 *                 h.t,
 */
        __Pyx_TraceLine(856,0,__PYX_ERR(0, 856, __pyx_L3_error))
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_channel_id); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 856, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_10);

        /* "km3pipe/dataclasses.pyx":857
 *             return cls(np.array([(
 *                 h.channel_id,
 *                 h.dom_id,             # <<<<<<<<<<<<<<
 *                 h.t,
 *                 h.tot,
 */
        __Pyx_TraceLine(857,0,__PYX_ERR(0, 857, __pyx_L3_error))
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 857, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_11);

        /* "km3pipe/dataclasses.pyx":858
 *                 h.channel_id,
 *                 h.dom_id,
 *                 h.t,             # <<<<<<<<<<<<<<
 *                 h.tot,
 *                 h.trig,
 */
        __Pyx_TraceLine(858,0,__PYX_ERR(0, 858, __pyx_L3_error))
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_t); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 858, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_12);

        /* "km3pipe/dataclasses.pyx":859
 *                 h.dom_id,
 *                 h.t,
 *                 h.tot,             # <<<<<<<<<<<<<<
 *                 h.trig,
 *                 event_id,
 */
        __Pyx_TraceLine(859,0,__PYX_ERR(0, 859, __pyx_L3_error))
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_tot); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 859, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_13);

        /* "km3pipe/dataclasses.pyx":860
 *                 h.t,
 *                 h.tot,
 *                 h.trig,             # <<<<<<<<<<<<<<
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype), event_id)
 */
        __Pyx_TraceLine(860,0,__PYX_ERR(0, 860, __pyx_L3_error))
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_trig); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 860, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_14);

        /* "km3pipe/dataclasses.pyx":856
 *         try:
 *             return cls(np.array([(
 *                 h.channel_id,             # <<<<<<<<<<<<<<
 *                 h.dom_id,
 *                 h.t,
 */
        __Pyx_TraceLine(856,0,__PYX_ERR(0, 856, __pyx_L3_error))
        __pyx_t_15 = PyTuple_New(6); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 856, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_15, 3, __pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_15, 4, __pyx_t_14);
        __Pyx_INCREF(__pyx_v_event_id);
        __Pyx_GIVEREF(__pyx_v_event_id);
        PyTuple_SET_ITEM(__pyx_t_15, 5, __pyx_v_event_id);
        __pyx_t_10 = 0;
        __pyx_t_11 = 0;
        __pyx_t_12 = 0;
        __pyx_t_13 = 0;
        __pyx_t_14 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_15))) __PYX_ERR(0, 855, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

        /* "km3pipe/dataclasses.pyx":862
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             # Older aanet format.
 */
        __Pyx_TraceLine(862,0,__PYX_ERR(0, 862, __pyx_L3_error))
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "km3pipe/dataclasses.pyx":855
 *     def from_aanet(cls, hits, event_id):
 *         try:
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 h.channel_id,
 *                 h.dom_id,
 */
      __Pyx_TraceLine(855,0,__PYX_ERR(0, 855, __pyx_L3_error))
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 855, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "km3pipe/dataclasses.pyx":862
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             # Older aanet format.
 */
      __Pyx_TraceLine(862,0,__PYX_ERR(0, 862, __pyx_L3_error))
      __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 862, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 862, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_15);
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_15) < 0) __PYX_ERR(0, 862, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

      /* "km3pipe/dataclasses.pyx":855
 *     def from_aanet(cls, hits, event_id):
 *         try:
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 h.channel_id,
 *                 h.dom_id,
 */
      __Pyx_TraceLine(855,0,__PYX_ERR(0, 855, __pyx_L3_error))
      __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 855, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "km3pipe/dataclasses.pyx":862
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             # Older aanet format.
 */
      __Pyx_TraceLine(862,0,__PYX_ERR(0, 862, __pyx_L3_error))
      __Pyx_INCREF(__pyx_v_cls);
      __pyx_t_5 = __pyx_v_cls; __pyx_t_7 = NULL;
      __pyx_t_16 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_16 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_15, __pyx_v_event_id};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L3_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_15, __pyx_v_event_id};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L3_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 855, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_16, __pyx_t_15);
        __Pyx_INCREF(__pyx_v_event_id);
        __Pyx_GIVEREF(__pyx_v_event_id);
        PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_16, __pyx_v_event_id);
        __pyx_t_15 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "km3pipe/dataclasses.pyx":854
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):
 *         try:             # <<<<<<<<<<<<<<
 *             return cls(np.array([(
 *                 h.channel_id,
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":863
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype), event_id)
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             # Older aanet format.
 *             return cls(np.array([(
 */
    __Pyx_TraceLine(863,0,__PYX_ERR(0, 863, __pyx_L5_except_error))
    __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_16) {
      __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.from_aanet", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 863, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);

      /* "km3pipe/dataclasses.pyx":865
 *         except ValueError:
 *             # Older aanet format.
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 ord(h.channel_id),
 *                 h.dom_id,
 */
      __Pyx_TraceLine(865,0,__PYX_ERR(0, 865, __pyx_L5_except_error))
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 865, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 865, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 865, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);

      /* "km3pipe/dataclasses.pyx":872
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
      __Pyx_TraceLine(872,0,__PYX_ERR(0, 872, __pyx_L5_except_error))
      if (likely(PyList_CheckExact(__pyx_v_hits)) || PyTuple_CheckExact(__pyx_v_hits)) {
        __pyx_t_13 = __pyx_v_hits; __Pyx_INCREF(__pyx_t_13); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_v_hits); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 872, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_9 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 872, __pyx_L5_except_error)
      }
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_13))) {
            if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_13)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_12 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_8); __Pyx_INCREF(__pyx_t_12); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 872, __pyx_L5_except_error)
            #else
            __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 872, __pyx_L5_except_error)
            __Pyx_GOTREF(__pyx_t_12);
            #endif
          } else {
            if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_13)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_8); __Pyx_INCREF(__pyx_t_12); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 872, __pyx_L5_except_error)
            #else
            __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 872, __pyx_L5_except_error)
            __Pyx_GOTREF(__pyx_t_12);
            #endif
          }
        } else {
          __pyx_t_12 = __pyx_t_9(__pyx_t_13);
          if (unlikely(!__pyx_t_12)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 872, __pyx_L5_except_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_12);
        }
        __Pyx_XDECREF_SET(__pyx_v_h, __pyx_t_12);
        __pyx_t_12 = 0;

        /* "km3pipe/dataclasses.pyx":866
 *             # Older aanet format.
 *             return cls(np.array([(
 *                 ord(h.channel_id),             # <<<<<<<<<<<<<<
 *                 h.dom_id,
 *                 h.t,
 */
        __Pyx_TraceLine(866,0,__PYX_ERR(0, 866, __pyx_L5_except_error))
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_channel_id); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 866, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_17 = __Pyx_PyObject_Ord(__pyx_t_12); if (unlikely(__pyx_t_17 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 866, __pyx_L5_except_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyInt_From_long(__pyx_t_17); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 866, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_12);

        /* "km3pipe/dataclasses.pyx":867
 *             return cls(np.array([(
 *                 ord(h.channel_id),
 *                 h.dom_id,             # <<<<<<<<<<<<<<
 *                 h.t,
 *                 h.tot,
 */
        __Pyx_TraceLine(867,0,__PYX_ERR(0, 867, __pyx_L5_except_error))
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 867, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);

        /* "km3pipe/dataclasses.pyx":868
 *                 ord(h.channel_id),
 *                 h.dom_id,
 *                 h.t,             # <<<<<<<<<<<<<<
 *                 h.tot,
 *                 h.trig,
 */
        __Pyx_TraceLine(868,0,__PYX_ERR(0, 868, __pyx_L5_except_error))
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 868, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_10);

        /* "km3pipe/dataclasses.pyx":869
 *                 h.dom_id,
 *                 h.t,
 *                 h.tot,             # <<<<<<<<<<<<<<
 *                 h.trig,
 *                 event_id,
 */
        __Pyx_TraceLine(869,0,__PYX_ERR(0, 869, __pyx_L5_except_error))
        __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_tot); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 869, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_18);

        /* "km3pipe/dataclasses.pyx":870
 *                 h.t,
 *                 h.tot,
 *                 h.trig,             # <<<<<<<<<<<<<<
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype), event_id)
 */
        __Pyx_TraceLine(870,0,__PYX_ERR(0, 870, __pyx_L5_except_error))
        __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_trig); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 870, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_19);

        /* "km3pipe/dataclasses.pyx":866
 *             # Older aanet format.
 *             return cls(np.array([(
 *                 ord(h.channel_id),             # <<<<<<<<<<<<<<
 *                 h.dom_id,
 *                 h.t,
 */
        __Pyx_TraceLine(866,0,__PYX_ERR(0, 866, __pyx_L5_except_error))
        __pyx_t_20 = PyTuple_New(6); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 866, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_20);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_20, 3, __pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_19);
        PyTuple_SET_ITEM(__pyx_t_20, 4, __pyx_t_19);
        __Pyx_INCREF(__pyx_v_event_id);
        __Pyx_GIVEREF(__pyx_v_event_id);
        PyTuple_SET_ITEM(__pyx_t_20, 5, __pyx_v_event_id);
        __pyx_t_12 = 0;
        __pyx_t_11 = 0;
        __pyx_t_10 = 0;
        __pyx_t_18 = 0;
        __pyx_t_19 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_20))) __PYX_ERR(0, 865, __pyx_L5_except_error)
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

        /* "km3pipe/dataclasses.pyx":872
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
        __Pyx_TraceLine(872,0,__PYX_ERR(0, 872, __pyx_L5_except_error))
      }
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "km3pipe/dataclasses.pyx":865
 *         except ValueError:
 *             # Older aanet format.
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 ord(h.channel_id),
 *                 h.dom_id,
 */
      __Pyx_TraceLine(865,0,__PYX_ERR(0, 865, __pyx_L5_except_error))
      __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 865, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "km3pipe/dataclasses.pyx":872
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
      __Pyx_TraceLine(872,0,__PYX_ERR(0, 872, __pyx_L5_except_error))
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 872, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 872, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_20);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_20) < 0) __PYX_ERR(0, 872, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

      /* "km3pipe/dataclasses.pyx":865
 *         except ValueError:
 *             # Older aanet format.
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 ord(h.channel_id),
 *                 h.dom_id,
 */
      __Pyx_TraceLine(865,0,__PYX_ERR(0, 865, __pyx_L5_except_error))
      __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_13, __pyx_t_7); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 865, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_20);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "km3pipe/dataclasses.pyx":872
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
      __Pyx_TraceLine(872,0,__PYX_ERR(0, 872, __pyx_L5_except_error))
      __Pyx_INCREF(__pyx_v_cls);
      __pyx_t_7 = __pyx_v_cls; __pyx_t_13 = NULL;
      __pyx_t_16 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_16 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_20, __pyx_v_event_id};
        __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 865, __pyx_L5_except_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_20, __pyx_v_event_id};
        __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 865, __pyx_L5_except_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
      } else
      #endif
      {
        __pyx_t_14 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 865, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_14);
        if (__pyx_t_13) {
          __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_20);
        PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_16, __pyx_t_20);
        __Pyx_INCREF(__pyx_v_event_id);
        __Pyx_GIVEREF(__pyx_v_event_id);
        PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_16, __pyx_v_event_id);
        __pyx_t_20 = 0;
        __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_14, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 865, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "km3pipe/dataclasses.pyx":854
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):
 *         try:             # <<<<<<<<<<<<<<
 *             return cls(np.array([(
 *                 h.channel_id,
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "km3pipe/dataclasses.pyx":853
 * 
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         try:
 *             return cls(np.array([(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.from_aanet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_h);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":875
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dom_ids, times, tots, triggereds,             # <<<<<<<<<<<<<<
 *                     event_id):
 *         # do we need shape[0] or does len() work too?
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_5from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_4from_arrays[] = "RawHitSeries.from_arrays(cls, channel_ids, dom_ids, times, tots, triggereds, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_5from_arrays = {"from_arrays", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_5from_arrays, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_4from_arrays};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_5from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_channel_ids = 0;
  PyObject *__pyx_v_dom_ids = 0;
  PyObject *__pyx_v_times = 0;
  PyObject *__pyx_v_tots = 0;
  PyObject *__pyx_v_triggereds = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_channel_ids,&__pyx_n_s_dom_ids,&__pyx_n_s_times,&__pyx_n_s_tots,&__pyx_n_s_triggereds,&__pyx_n_s_event_id,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_channel_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 1); __PYX_ERR(0, 875, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dom_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 2); __PYX_ERR(0, 875, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_times)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 3); __PYX_ERR(0, 875, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tots)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 4); __PYX_ERR(0, 875, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_triggereds)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 5); __PYX_ERR(0, 875, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 6); __PYX_ERR(0, 875, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_arrays") < 0)) __PYX_ERR(0, 875, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
    }
    __pyx_v_cls = values[0];
    __pyx_v_channel_ids = values[1];
    __pyx_v_dom_ids = values[2];
    __pyx_v_times = values[3];
    __pyx_v_tots = values[4];
    __pyx_v_triggereds = values[5];
    __pyx_v_event_id = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 875, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_4from_arrays(__pyx_self, __pyx_v_cls, __pyx_v_channel_ids, __pyx_v_dom_ids, __pyx_v_times, __pyx_v_tots, __pyx_v_triggereds, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_4from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_channel_ids, PyObject *__pyx_v_dom_ids, PyObject *__pyx_v_times, PyObject *__pyx_v_tots, PyObject *__pyx_v_triggereds, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_v_hits = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__75)
  __Pyx_RefNannySetupContext("from_arrays", 0);
  __Pyx_TraceCall("from_arrays", __pyx_f[0], 875, 0, __PYX_ERR(0, 875, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":878
 *                     event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = channel_ids.shape[0]
 *         except AttributeError:
 */
  __Pyx_TraceLine(878,0,__PYX_ERR(0, 878, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":879
 *         # do we need shape[0] or does len() work too?
 *         try:
 *             length = channel_ids.shape[0]             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             length = len(channel_ids)
 */
      __Pyx_TraceLine(879,0,__PYX_ERR(0, 879, __pyx_L3_error))
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_channel_ids, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 879, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 879, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_length = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "km3pipe/dataclasses.pyx":878
 *                     event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = channel_ids.shape[0]
 *         except AttributeError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":880
 *         try:
 *             length = channel_ids.shape[0]
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             length = len(channel_ids)
 *         hits = np.empty(length, cls.dtype)
 */
    __Pyx_TraceLine(880,0,__PYX_ERR(0, 880, __pyx_L5_except_error))
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 880, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);

      /* "km3pipe/dataclasses.pyx":881
 *             length = channel_ids.shape[0]
 *         except AttributeError:
 *             length = len(channel_ids)             # <<<<<<<<<<<<<<
 *         hits = np.empty(length, cls.dtype)
 *         hits['channel_id'] = channel_ids
 */
      __Pyx_TraceLine(881,0,__PYX_ERR(0, 881, __pyx_L5_except_error))
      __pyx_t_8 = PyObject_Length(__pyx_v_channel_ids); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 881, __pyx_L5_except_error)
      __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 881, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "km3pipe/dataclasses.pyx":878
 *                     event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = channel_ids.shape[0]
 *         except AttributeError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "km3pipe/dataclasses.pyx":882
 *         except AttributeError:
 *             length = len(channel_ids)
 *         hits = np.empty(length, cls.dtype)             # <<<<<<<<<<<<<<
 *         hits['channel_id'] = channel_ids
 *         hits['dom_id'] = dom_ids
 */
  __Pyx_TraceLine(882,0,__PYX_ERR(0, 882, __pyx_L1_error))
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_length, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 882, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_length, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 882, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_INCREF(__pyx_v_length);
    __Pyx_GIVEREF(__pyx_v_length);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_v_length);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_hits = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":883
 *             length = len(channel_ids)
 *         hits = np.empty(length, cls.dtype)
 *         hits['channel_id'] = channel_ids             # <<<<<<<<<<<<<<
 *         hits['dom_id'] = dom_ids
 *         hits['time'] = times
 */
  __Pyx_TraceLine(883,0,__PYX_ERR(0, 883, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_channel_id, __pyx_v_channel_ids) < 0)) __PYX_ERR(0, 883, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":884
 *         hits = np.empty(length, cls.dtype)
 *         hits['channel_id'] = channel_ids
 *         hits['dom_id'] = dom_ids             # <<<<<<<<<<<<<<
 *         hits['time'] = times
 *         hits['tot'] = tots
 */
  __Pyx_TraceLine(884,0,__PYX_ERR(0, 884, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dom_id, __pyx_v_dom_ids) < 0)) __PYX_ERR(0, 884, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":885
 *         hits['channel_id'] = channel_ids
 *         hits['dom_id'] = dom_ids
 *         hits['time'] = times             # <<<<<<<<<<<<<<
 *         hits['tot'] = tots
 *         hits['triggered'] = triggereds
 */
  __Pyx_TraceLine(885,0,__PYX_ERR(0, 885, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_time, __pyx_v_times) < 0)) __PYX_ERR(0, 885, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":886
 *         hits['dom_id'] = dom_ids
 *         hits['time'] = times
 *         hits['tot'] = tots             # <<<<<<<<<<<<<<
 *         hits['triggered'] = triggereds
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 */
  __Pyx_TraceLine(886,0,__PYX_ERR(0, 886, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_tot, __pyx_v_tots) < 0)) __PYX_ERR(0, 886, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":887
 *         hits['time'] = times
 *         hits['tot'] = tots
 *         hits['triggered'] = triggereds             # <<<<<<<<<<<<<<
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 *         return cls(hits, event_id)
 */
  __Pyx_TraceLine(887,0,__PYX_ERR(0, 887, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_triggered, __pyx_v_triggereds) < 0)) __PYX_ERR(0, 887, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":888
 *         hits['tot'] = tots
 *         hits['triggered'] = triggereds
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')             # <<<<<<<<<<<<<<
 *         return cls(hits, event_id)
 * 
 */
  __Pyx_TraceLine(888,0,__PYX_ERR(0, 888, __pyx_L1_error))
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_full); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_length);
  __Pyx_GIVEREF(__pyx_v_length);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_length);
  __Pyx_INCREF(__pyx_v_event_id);
  __Pyx_GIVEREF(__pyx_v_event_id);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_event_id);
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_kp_s_u4) < 0) __PYX_ERR(0, 888, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_event_id, __pyx_t_4) < 0)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":889
 *         hits['triggered'] = triggereds
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 *         return cls(hits, event_id)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(889,0,__PYX_ERR(0, 889, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_10 = __pyx_v_cls; __pyx_t_7 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_10)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_hits, __pyx_v_event_id};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_hits, __pyx_v_event_id};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(__pyx_v_hits);
    __Pyx_GIVEREF(__pyx_v_hits);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_hits);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v_event_id);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":875
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dom_ids, times, tots, triggereds,             # <<<<<<<<<<<<<<
 *                     event_id):
 *         # do we need shape[0] or does len() work too?
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XDECREF(__pyx_v_hits);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":892
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return RawHitSeries(self._arr[self._arr['triggered'] == True],
 *                             self.event_id)  # noqa
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_7triggered_hits(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_6triggered_hits[] = "RawHitSeries.triggered_hits(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_7triggered_hits = {"triggered_hits", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_7triggered_hits, METH_O, __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_6triggered_hits};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_7triggered_hits(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("triggered_hits (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_6triggered_hits(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_6triggered_hits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__76)
  __Pyx_RefNannySetupContext("triggered_hits", 0);
  __Pyx_TraceCall("triggered_hits", __pyx_f[0], 892, 0, __PYX_ERR(0, 892, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":893
 *     @property
 *     def triggered_hits(self):
 *         return RawHitSeries(self._arr[self._arr['triggered'] == True],             # <<<<<<<<<<<<<<
 *                             self.event_id)  # noqa
 * 
 */
  __Pyx_TraceLine(893,0,__PYX_ERR(0, 893, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RawHitSeries); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_triggered); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":894
 *     def triggered_hits(self):
 *         return RawHitSeries(self._arr[self._arr['triggered'] == True],
 *                             self.event_id)  # noqa             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(894,0,__PYX_ERR(0, 894, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_event_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_5 = 0;
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":892
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return RawHitSeries(self._arr[self._arr['triggered'] == True],
 *                             self.event_id)  # noqa
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.triggered_hits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":897
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_9deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_8deserialise[] = "RawHitSeries.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_9deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_9deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_8deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_9deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 897, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 897, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_8deserialise(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_8deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__77)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 897, 0, __PYX_ERR(0, 897, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":898
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(898,0,__PYX_ERR(0, 898, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":897
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":900
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_11serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_10serialise[] = "RawHitSeries.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_11serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_11serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_10serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_11serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 900, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 900, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_10serialise(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_10serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__78)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 900, 0, __PYX_ERR(0, 900, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":901
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(901,0,__PYX_ERR(0, 901, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":900
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":904
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls(data, event_id)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_13conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_12conv_from[] = "RawHitSeries.conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_13conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_13conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_12conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_13conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_event_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, 1); __PYX_ERR(0, 904, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 904, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 904, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_12conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_event_id, __pyx_v_fmt, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_12conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__79)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 904, 0, __PYX_ERR(0, 904, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":905
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls(data, event_id)
 *         if fmt == 'pandas':
 */
  __Pyx_TraceLine(905,0,__PYX_ERR(0, 905, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 905, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":906
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 *             return cls(data, event_id)             # <<<<<<<<<<<<<<
 *         if fmt == 'pandas':
 *             return cls(data.to_records(index=False), event_id)
 */
    __Pyx_TraceLine(906,0,__PYX_ERR(0, 906, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_cls);
    __pyx_t_3 = __pyx_v_cls; __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_event_id};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_event_id};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 906, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
      __Pyx_INCREF(__pyx_v_event_id);
      __Pyx_GIVEREF(__pyx_v_event_id);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_event_id);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":905
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls(data, event_id)
 *         if fmt == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":907
 *         if fmt == 'numpy':
 *             return cls(data, event_id)
 *         if fmt == 'pandas':             # <<<<<<<<<<<<<<
 *             return cls(data.to_records(index=False), event_id)
 * 
 */
  __Pyx_TraceLine(907,0,__PYX_ERR(0, 907, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 907, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":908
 *             return cls(data, event_id)
 *         if fmt == 'pandas':
 *             return cls(data.to_records(index=False), event_id)             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(908,0,__PYX_ERR(0, 908, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_to_records); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 908, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_v_cls);
    __pyx_t_6 = __pyx_v_cls; __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_v_event_id};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 908, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_v_event_id};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 908, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 908, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_5, __pyx_t_4);
      __Pyx_INCREF(__pyx_v_event_id);
      __Pyx_GIVEREF(__pyx_v_event_id);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_5, __pyx_v_event_id);
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 908, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":907
 *         if fmt == 'numpy':
 *             return cls(data, event_id)
 *         if fmt == 'pandas':             # <<<<<<<<<<<<<<
 *             return cls(data.to_records(index=False), event_id)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":904
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls(data, event_id)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":910
 *             return cls(data.to_records(index=False), event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_15conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_14conv_to[] = "RawHitSeries.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_15conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_15conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_14conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_15conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 910, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 910, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_14conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_14conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__80)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 910, 0, __PYX_ERR(0, 910, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":911
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  __Pyx_TraceLine(911,0,__PYX_ERR(0, 911, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 911, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":912
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return self.__array__()             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(912,0,__PYX_ERR(0, 912, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":911
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":913
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(913,0,__PYX_ERR(0, 913, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":914
 *             return self.__array__()
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(914,0,__PYX_ERR(0, 914, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 914, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_t_3) < 0) __PYX_ERR(0, 914, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":913
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":910
 *             return cls(data.to_records(index=False), event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":916
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_17__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_16__array__[] = "RawHitSeries.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_17__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_17__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_16__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_17__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_16__array__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_16__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__81)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 916, 0, __PYX_ERR(0, 916, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":917
 * 
 *     def __array__(self):
 *         return self._arr             # <<<<<<<<<<<<<<
 * 
 *     def next(self):
 */
  __Pyx_TraceLine(917,0,__PYX_ERR(0, 917, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":916
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":919
 *         return self._arr
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_19next(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_18next[] = "RawHitSeries.next(self)\nPython 2/3 compatibility for iterators";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_19next = {"next", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_19next, METH_O, __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_18next};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_19next(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_18next(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_18next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__82)
  __Pyx_RefNannySetupContext("next", 0);
  __Pyx_TraceCall("next", __pyx_f[0], 919, 0, __PYX_ERR(0, 919, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":921
 *     def next(self):
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_TraceLine(921,0,__PYX_ERR(0, 921, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 921, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 921, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":919
 *         return self._arr
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":923
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_21__next__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_20__next__[] = "RawHitSeries.__next__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_21__next__ = {"__next__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_21__next__, METH_O, __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_20__next__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_21__next__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_20__next__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_20__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_hit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_TraceFrameInit(__pyx_codeobj__83)
  __Pyx_RefNannySetupContext("__next__", 0);
  __Pyx_TraceCall("__next__", __pyx_f[0], 923, 0, __PYX_ERR(0, 923, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":924
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  __Pyx_TraceLine(924,0,__PYX_ERR(0, 924, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 924, __pyx_L1_error)
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 924, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 924, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "km3pipe/dataclasses.pyx":925
 *     def __next__(self):
 *         if self._index >= len(self):
 *             self._index = 0             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         hit = self[self._index]
 */
    __Pyx_TraceLine(925,0,__PYX_ERR(0, 925, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_int_0) < 0) __PYX_ERR(0, 925, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":926
 *         if self._index >= len(self):
 *             self._index = 0
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         hit = self[self._index]
 *         self._index += 1
 */
    __Pyx_TraceLine(926,0,__PYX_ERR(0, 926, __pyx_L1_error))
    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
    __PYX_ERR(0, 926, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":924
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  }

  /* "km3pipe/dataclasses.pyx":927
 *             self._index = 0
 *             raise StopIteration
 *         hit = self[self._index]             # <<<<<<<<<<<<<<
 *         self._index += 1
 *         return hit
 */
  __Pyx_TraceLine(927,0,__PYX_ERR(0, 927, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_GetItem(__pyx_v_self, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_hit = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":928
 *             raise StopIteration
 *         hit = self[self._index]
 *         self._index += 1             # <<<<<<<<<<<<<<
 *         return hit
 * 
 */
  __Pyx_TraceLine(928,0,__PYX_ERR(0, 928, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_t_4) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":929
 *         hit = self[self._index]
 *         self._index += 1
 *         return hit             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index):
 */
  __Pyx_TraceLine(929,0,__PYX_ERR(0, 929, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_hit);
  __pyx_r = __pyx_v_hit;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":923
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_hit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":931
 *         return hit
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             # element = AttrVoid(self._arr[index])  # TODO: MemoryLeak
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_23__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_22__getitem__[] = "RawHitSeries.__getitem__(self, index)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_23__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_23__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_22__getitem__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_23__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 931, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 931, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 931, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_22__getitem__(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_22__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  struct __pyx_obj_7km3pipe_11dataclasses_RawHit *__pyx_v_hit = NULL;
  PyObject *__pyx_v_new = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__84)
  __Pyx_RefNannySetupContext("__getitem__", 0);
  __Pyx_TraceCall("__getitem__", __pyx_f[0], 931, 0, __PYX_ERR(0, 931, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":932
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             # element = AttrVoid(self._arr[index])  # TODO: MemoryLeak
 *             hit = RawHit(*self._arr[index])
 */
  __Pyx_TraceLine(932,0,__PYX_ERR(0, 932, __pyx_L1_error))
  __pyx_t_1 = PyInt_Check(__pyx_v_index); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":934
 *         if isinstance(index, int):
 *             # element = AttrVoid(self._arr[index])  # TODO: MemoryLeak
 *             hit = RawHit(*self._arr[index])             # <<<<<<<<<<<<<<
 *             return hit
 *         new = self.__class__(self._arr[index], self.event_id)
 */
    __Pyx_TraceLine(934,0,__PYX_ERR(0, 934, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_RawHit), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_hit = ((struct __pyx_obj_7km3pipe_11dataclasses_RawHit *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":935
 *             # element = AttrVoid(self._arr[index])  # TODO: MemoryLeak
 *             hit = RawHit(*self._arr[index])
 *             return hit             # <<<<<<<<<<<<<<
 *         new = self.__class__(self._arr[index], self.event_id)
 *         new.dtype = self.dtype
 */
    __Pyx_TraceLine(935,0,__PYX_ERR(0, 935, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_hit));
    __pyx_r = ((PyObject *)__pyx_v_hit);
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":932
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             # element = AttrVoid(self._arr[index])  # TODO: MemoryLeak
 *             hit = RawHit(*self._arr[index])
 */
  }

  /* "km3pipe/dataclasses.pyx":936
 *             hit = RawHit(*self._arr[index])
 *             return hit
 *         new = self.__class__(self._arr[index], self.event_id)             # <<<<<<<<<<<<<<
 *         new.dtype = self.dtype
 *         return new
 */
  __Pyx_TraceLine(936,0,__PYX_ERR(0, 936, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_v_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_event_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_t_5};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 936, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_t_5};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 936, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_5);
    __pyx_t_6 = 0;
    __pyx_t_5 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_new = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":937
 *             return hit
 *         new = self.__class__(self._arr[index], self.event_id)
 *         new.dtype = self.dtype             # <<<<<<<<<<<<<<
 *         return new
 * 
 */
  __Pyx_TraceLine(937,0,__PYX_ERR(0, 937, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_new, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":938
 *         new = self.__class__(self._arr[index], self.event_id)
 *         new.dtype = self.dtype
 *         return new             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_TraceLine(938,0,__PYX_ERR(0, 938, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_new);
  __pyx_r = __pyx_v_new;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":931
 *         return hit
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             # element = AttrVoid(self._arr[index])  # TODO: MemoryLeak
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_hit);
  __Pyx_XDECREF(__pyx_v_new);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":940
 *         return new
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_25__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_24__iter__[] = "RawHitSeries.__iter__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_25__iter__ = {"__iter__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_25__iter__, METH_O, __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_24__iter__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_25__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_24__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_24__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__85)
  __Pyx_RefNannySetupContext("__iter__", 0);
  __Pyx_TraceCall("__iter__", __pyx_f[0], 940, 0, __PYX_ERR(0, 940, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":941
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(941,0,__PYX_ERR(0, 941, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":940
 *         return new
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":943
 *         return self
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_27__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_26__len__[] = "RawHitSeries.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_27__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_27__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_26__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_27__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_26__len__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_26__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__86)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 943, 0, __PYX_ERR(0, 943, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":944
 * 
 *     def __len__(self):
 *         return self._arr.shape[0]             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(944,0,__PYX_ERR(0, 944, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":943
 *         return self
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":946
 *         return self._arr.shape[0]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_29__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_28__str__[] = "RawHitSeries.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_29__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_29__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_28__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_29__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_28__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_28__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_v_n_hits;
  PyObject *__pyx_v_plural = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__87)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 946, 0, __PYX_ERR(0, 946, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":947
 * 
 *     def __str__(self):
 *         n_hits = len(self)             # <<<<<<<<<<<<<<
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 *         return("RawHitSeries with {0} hit{1}.".format(len(self), plural))
 */
  __Pyx_TraceLine(947,0,__PYX_ERR(0, 947, __pyx_L1_error))
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 947, __pyx_L1_error)
  __pyx_v_n_hits = __pyx_t_1;

  /* "km3pipe/dataclasses.pyx":948
 *     def __str__(self):
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''             # <<<<<<<<<<<<<<
 *         return("RawHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 */
  __Pyx_TraceLine(948,0,__PYX_ERR(0, 948, __pyx_L1_error))
  __pyx_t_4 = ((__pyx_v_n_hits > 1) != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_4 = ((__pyx_v_n_hits == 0) != 0);
  __pyx_t_3 = __pyx_t_4;
  __pyx_L3_bool_binop_done:;
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_n_s_s);
    __pyx_t_2 = __pyx_n_s_s;
  } else {
    __Pyx_INCREF(__pyx_kp_s__88);
    __pyx_t_2 = __pyx_kp_s__88;
  }
  __pyx_v_plural = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":949
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 *         return("RawHitSeries with {0} hit{1}.".format(len(self), plural))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(949,0,__PYX_ERR(0, 949, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_RawHitSeries_with_0_hit_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 949, __pyx_L1_error)
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 949, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 949, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_plural);
    __Pyx_GIVEREF(__pyx_v_plural);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_plural);
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":946
 *         return self._arr.shape[0]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_plural);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":951
 *         return("RawHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_31__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_30__repr__[] = "RawHitSeries.__repr__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_31__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_31__repr__, METH_O, __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_30__repr__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_31__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_30__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_30__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__89)
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 951, 0, __PYX_ERR(0, 951, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":952
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(952,0,__PYX_ERR(0, 952, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":951
 *         return("RawHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":954
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_33__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_32__insp__[] = "RawHitSeries.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_33__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_33__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_12RawHitSeries_32__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12RawHitSeries_33__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_32__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12RawHitSeries_32__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_hit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__90)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 954, 0, __PYX_ERR(0, 954, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":955
 * 
 *     def __insp__(self):
 *         return '\n'.join([str(hit) for hit in self._hits])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(955,0,__PYX_ERR(0, 955, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hits); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 955, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 955, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 955, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 955, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 955, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_hit, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_hit);
    __Pyx_GIVEREF(__pyx_v_hit);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_hit);
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 955, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__91, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":954
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.RawHitSeries.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_hit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":980
 *     write_separate_columns = True
 * 
 *     def __init__(self, arr, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries___init__[] = "CRawHitSeries.__init__(self, arr, event_id, h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_arr_2,&__pyx_n_s_event_id,&__pyx_n_s_h5loc,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); __PYX_ERR(0, 980, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); __PYX_ERR(0, 980, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 980, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_arr = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_h5loc = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 980, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries___init__(__pyx_self, __pyx_v_self, __pyx_v_arr, __pyx_v_event_id, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__92)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 980, 0, __PYX_ERR(0, 980, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":981
 * 
 *     def __init__(self, arr, event_id, h5loc='/'):
 *         self._arr = arr             # <<<<<<<<<<<<<<
 *         self._index = 0
 *         self.event_id = event_id
 */
  __Pyx_TraceLine(981,0,__PYX_ERR(0, 981, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_arr, __pyx_v_arr) < 0) __PYX_ERR(0, 981, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":982
 *     def __init__(self, arr, event_id, h5loc='/'):
 *         self._arr = arr
 *         self._index = 0             # <<<<<<<<<<<<<<
 *         self.event_id = event_id
 *         self.h5loc = h5loc
 */
  __Pyx_TraceLine(982,0,__PYX_ERR(0, 982, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_int_0) < 0) __PYX_ERR(0, 982, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":983
 *         self._arr = arr
 *         self._index = 0
 *         self.event_id = event_id             # <<<<<<<<<<<<<<
 *         self.h5loc = h5loc
 * 
 */
  __Pyx_TraceLine(983,0,__PYX_ERR(0, 983, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_event_id, __pyx_v_event_id) < 0) __PYX_ERR(0, 983, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":984
 *         self._index = 0
 *         self.event_id = event_id
 *         self.h5loc = h5loc             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(984,0,__PYX_ERR(0, 984, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 984, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":980
 *     write_separate_columns = True
 * 
 *     def __init__(self, arr, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":987
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, dus,             # <<<<<<<<<<<<<<
 *                     floors, pos_xs, pos_ys, pos_zs, t0s, times, tots,
 *                     triggereds, event_id):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_3from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_2from_arrays[] = "CRawHitSeries.from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, dus, floors, pos_xs, pos_ys, pos_zs, t0s, times, tots, triggereds, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_3from_arrays = {"from_arrays", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_3from_arrays, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_2from_arrays};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_3from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_channel_ids = 0;
  PyObject *__pyx_v_dir_xs = 0;
  PyObject *__pyx_v_dir_ys = 0;
  PyObject *__pyx_v_dir_zs = 0;
  PyObject *__pyx_v_dom_ids = 0;
  PyObject *__pyx_v_dus = 0;
  PyObject *__pyx_v_floors = 0;
  PyObject *__pyx_v_pos_xs = 0;
  PyObject *__pyx_v_pos_ys = 0;
  PyObject *__pyx_v_pos_zs = 0;
  PyObject *__pyx_v_t0s = 0;
  PyObject *__pyx_v_times = 0;
  PyObject *__pyx_v_tots = 0;
  PyObject *__pyx_v_triggereds = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_channel_ids,&__pyx_n_s_dir_xs,&__pyx_n_s_dir_ys,&__pyx_n_s_dir_zs,&__pyx_n_s_dom_ids,&__pyx_n_s_dus,&__pyx_n_s_floors,&__pyx_n_s_pos_xs,&__pyx_n_s_pos_ys,&__pyx_n_s_pos_zs,&__pyx_n_s_t0s,&__pyx_n_s_times,&__pyx_n_s_tots,&__pyx_n_s_triggereds,&__pyx_n_s_event_id,0};
    PyObject* values[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        CYTHON_FALLTHROUGH;
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_channel_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 1); __PYX_ERR(0, 987, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_xs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 2); __PYX_ERR(0, 987, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_ys)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 3); __PYX_ERR(0, 987, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_zs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 4); __PYX_ERR(0, 987, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dom_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 5); __PYX_ERR(0, 987, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dus)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 6); __PYX_ERR(0, 987, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_floors)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 7); __PYX_ERR(0, 987, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_xs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 8); __PYX_ERR(0, 987, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_ys)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 9); __PYX_ERR(0, 987, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (likely((values[10] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_zs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 10); __PYX_ERR(0, 987, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 11:
        if (likely((values[11] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t0s)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 11); __PYX_ERR(0, 987, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 12:
        if (likely((values[12] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_times)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 12); __PYX_ERR(0, 987, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 13:
        if (likely((values[13] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tots)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 13); __PYX_ERR(0, 987, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 14:
        if (likely((values[14] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_triggereds)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 14); __PYX_ERR(0, 987, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 15:
        if (likely((values[15] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 15); __PYX_ERR(0, 987, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_arrays") < 0)) __PYX_ERR(0, 987, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 16) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
      values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
      values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
      values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
      values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
      values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
      values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
      values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
    }
    __pyx_v_cls = values[0];
    __pyx_v_channel_ids = values[1];
    __pyx_v_dir_xs = values[2];
    __pyx_v_dir_ys = values[3];
    __pyx_v_dir_zs = values[4];
    __pyx_v_dom_ids = values[5];
    __pyx_v_dus = values[6];
    __pyx_v_floors = values[7];
    __pyx_v_pos_xs = values[8];
    __pyx_v_pos_ys = values[9];
    __pyx_v_pos_zs = values[10];
    __pyx_v_t0s = values[11];
    __pyx_v_times = values[12];
    __pyx_v_tots = values[13];
    __pyx_v_triggereds = values[14];
    __pyx_v_event_id = values[15];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 987, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_2from_arrays(__pyx_self, __pyx_v_cls, __pyx_v_channel_ids, __pyx_v_dir_xs, __pyx_v_dir_ys, __pyx_v_dir_zs, __pyx_v_dom_ids, __pyx_v_dus, __pyx_v_floors, __pyx_v_pos_xs, __pyx_v_pos_ys, __pyx_v_pos_zs, __pyx_v_t0s, __pyx_v_times, __pyx_v_tots, __pyx_v_triggereds, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_2from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_channel_ids, PyObject *__pyx_v_dir_xs, PyObject *__pyx_v_dir_ys, PyObject *__pyx_v_dir_zs, PyObject *__pyx_v_dom_ids, PyObject *__pyx_v_dus, PyObject *__pyx_v_floors, PyObject *__pyx_v_pos_xs, PyObject *__pyx_v_pos_ys, PyObject *__pyx_v_pos_zs, PyObject *__pyx_v_t0s, PyObject *__pyx_v_times, PyObject *__pyx_v_tots, PyObject *__pyx_v_triggereds, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_v_hits = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__93)
  __Pyx_RefNannySetupContext("from_arrays", 0);
  __Pyx_TraceCall("from_arrays", __pyx_f[0], 987, 0, __PYX_ERR(0, 987, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":991
 *                     triggereds, event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = channel_ids.shape[0]
 *         except AttributeError:
 */
  __Pyx_TraceLine(991,0,__PYX_ERR(0, 991, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":992
 *         # do we need shape[0] or does len() work too?
 *         try:
 *             length = channel_ids.shape[0]             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             length = len(channel_ids)
 */
      __Pyx_TraceLine(992,0,__PYX_ERR(0, 992, __pyx_L3_error))
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_channel_ids, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 992, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 992, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_length = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "km3pipe/dataclasses.pyx":991
 *                     triggereds, event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = channel_ids.shape[0]
 *         except AttributeError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":993
 *         try:
 *             length = channel_ids.shape[0]
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             length = len(channel_ids)
 *         hits = np.empty(length, cls.dtype)
 */
    __Pyx_TraceLine(993,0,__PYX_ERR(0, 993, __pyx_L5_except_error))
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 993, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);

      /* "km3pipe/dataclasses.pyx":994
 *             length = channel_ids.shape[0]
 *         except AttributeError:
 *             length = len(channel_ids)             # <<<<<<<<<<<<<<
 *         hits = np.empty(length, cls.dtype)
 *         hits['channel_id'] = channel_ids
 */
      __Pyx_TraceLine(994,0,__PYX_ERR(0, 994, __pyx_L5_except_error))
      __pyx_t_8 = PyObject_Length(__pyx_v_channel_ids); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 994, __pyx_L5_except_error)
      __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 994, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "km3pipe/dataclasses.pyx":991
 *                     triggereds, event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = channel_ids.shape[0]
 *         except AttributeError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "km3pipe/dataclasses.pyx":995
 *         except AttributeError:
 *             length = len(channel_ids)
 *         hits = np.empty(length, cls.dtype)             # <<<<<<<<<<<<<<
 *         hits['channel_id'] = channel_ids
 *         hits['dir_x'] = dir_xs
 */
  __Pyx_TraceLine(995,0,__PYX_ERR(0, 995, __pyx_L1_error))
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_length, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 995, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_length, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 995, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 995, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_INCREF(__pyx_v_length);
    __Pyx_GIVEREF(__pyx_v_length);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_v_length);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 995, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_hits = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":996
 *             length = len(channel_ids)
 *         hits = np.empty(length, cls.dtype)
 *         hits['channel_id'] = channel_ids             # <<<<<<<<<<<<<<
 *         hits['dir_x'] = dir_xs
 *         hits['dir_y'] = dir_ys
 */
  __Pyx_TraceLine(996,0,__PYX_ERR(0, 996, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_channel_id, __pyx_v_channel_ids) < 0)) __PYX_ERR(0, 996, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":997
 *         hits = np.empty(length, cls.dtype)
 *         hits['channel_id'] = channel_ids
 *         hits['dir_x'] = dir_xs             # <<<<<<<<<<<<<<
 *         hits['dir_y'] = dir_ys
 *         hits['dir_z'] = dir_zs
 */
  __Pyx_TraceLine(997,0,__PYX_ERR(0, 997, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dir_x, __pyx_v_dir_xs) < 0)) __PYX_ERR(0, 997, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":998
 *         hits['channel_id'] = channel_ids
 *         hits['dir_x'] = dir_xs
 *         hits['dir_y'] = dir_ys             # <<<<<<<<<<<<<<
 *         hits['dir_z'] = dir_zs
 *         hits['dom_id'] = dom_ids
 */
  __Pyx_TraceLine(998,0,__PYX_ERR(0, 998, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dir_y, __pyx_v_dir_ys) < 0)) __PYX_ERR(0, 998, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":999
 *         hits['dir_x'] = dir_xs
 *         hits['dir_y'] = dir_ys
 *         hits['dir_z'] = dir_zs             # <<<<<<<<<<<<<<
 *         hits['dom_id'] = dom_ids
 *         hits['du'] = dus
 */
  __Pyx_TraceLine(999,0,__PYX_ERR(0, 999, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dir_z, __pyx_v_dir_zs) < 0)) __PYX_ERR(0, 999, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1000
 *         hits['dir_y'] = dir_ys
 *         hits['dir_z'] = dir_zs
 *         hits['dom_id'] = dom_ids             # <<<<<<<<<<<<<<
 *         hits['du'] = dus
 *         hits['floor'] = floors
 */
  __Pyx_TraceLine(1000,0,__PYX_ERR(0, 1000, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dom_id, __pyx_v_dom_ids) < 0)) __PYX_ERR(0, 1000, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1001
 *         hits['dir_z'] = dir_zs
 *         hits['dom_id'] = dom_ids
 *         hits['du'] = dus             # <<<<<<<<<<<<<<
 *         hits['floor'] = floors
 *         hits['pos_x'] = pos_xs
 */
  __Pyx_TraceLine(1001,0,__PYX_ERR(0, 1001, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_du, __pyx_v_dus) < 0)) __PYX_ERR(0, 1001, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1002
 *         hits['dom_id'] = dom_ids
 *         hits['du'] = dus
 *         hits['floor'] = floors             # <<<<<<<<<<<<<<
 *         hits['pos_x'] = pos_xs
 *         hits['pos_y'] = pos_ys
 */
  __Pyx_TraceLine(1002,0,__PYX_ERR(0, 1002, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_floor, __pyx_v_floors) < 0)) __PYX_ERR(0, 1002, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1003
 *         hits['du'] = dus
 *         hits['floor'] = floors
 *         hits['pos_x'] = pos_xs             # <<<<<<<<<<<<<<
 *         hits['pos_y'] = pos_ys
 *         hits['pos_z'] = pos_zs
 */
  __Pyx_TraceLine(1003,0,__PYX_ERR(0, 1003, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_pos_x, __pyx_v_pos_xs) < 0)) __PYX_ERR(0, 1003, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1004
 *         hits['floor'] = floors
 *         hits['pos_x'] = pos_xs
 *         hits['pos_y'] = pos_ys             # <<<<<<<<<<<<<<
 *         hits['pos_z'] = pos_zs
 *         hits['t0'] = t0s
 */
  __Pyx_TraceLine(1004,0,__PYX_ERR(0, 1004, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_pos_y, __pyx_v_pos_ys) < 0)) __PYX_ERR(0, 1004, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1005
 *         hits['pos_x'] = pos_xs
 *         hits['pos_y'] = pos_ys
 *         hits['pos_z'] = pos_zs             # <<<<<<<<<<<<<<
 *         hits['t0'] = t0s
 *         hits['time'] = times
 */
  __Pyx_TraceLine(1005,0,__PYX_ERR(0, 1005, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_pos_z, __pyx_v_pos_zs) < 0)) __PYX_ERR(0, 1005, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1006
 *         hits['pos_y'] = pos_ys
 *         hits['pos_z'] = pos_zs
 *         hits['t0'] = t0s             # <<<<<<<<<<<<<<
 *         hits['time'] = times
 *         hits['tot'] = tots
 */
  __Pyx_TraceLine(1006,0,__PYX_ERR(0, 1006, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_t0, __pyx_v_t0s) < 0)) __PYX_ERR(0, 1006, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1007
 *         hits['pos_z'] = pos_zs
 *         hits['t0'] = t0s
 *         hits['time'] = times             # <<<<<<<<<<<<<<
 *         hits['tot'] = tots
 *         hits['triggered'] = triggereds
 */
  __Pyx_TraceLine(1007,0,__PYX_ERR(0, 1007, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_time, __pyx_v_times) < 0)) __PYX_ERR(0, 1007, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1008
 *         hits['t0'] = t0s
 *         hits['time'] = times
 *         hits['tot'] = tots             # <<<<<<<<<<<<<<
 *         hits['triggered'] = triggereds
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 */
  __Pyx_TraceLine(1008,0,__PYX_ERR(0, 1008, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_tot, __pyx_v_tots) < 0)) __PYX_ERR(0, 1008, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1009
 *         hits['time'] = times
 *         hits['tot'] = tots
 *         hits['triggered'] = triggereds             # <<<<<<<<<<<<<<
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 *         return cls(hits, event_id)
 */
  __Pyx_TraceLine(1009,0,__PYX_ERR(0, 1009, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_triggered, __pyx_v_triggereds) < 0)) __PYX_ERR(0, 1009, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1010
 *         hits['tot'] = tots
 *         hits['triggered'] = triggereds
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')             # <<<<<<<<<<<<<<
 *         return cls(hits, event_id)
 * 
 */
  __Pyx_TraceLine(1010,0,__PYX_ERR(0, 1010, __pyx_L1_error))
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_full); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_length);
  __Pyx_GIVEREF(__pyx_v_length);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_length);
  __Pyx_INCREF(__pyx_v_event_id);
  __Pyx_GIVEREF(__pyx_v_event_id);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_event_id);
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_kp_s_u4) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_event_id, __pyx_t_4) < 0)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1011
 *         hits['triggered'] = triggereds
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 *         return cls(hits, event_id)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1011,0,__PYX_ERR(0, 1011, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_10 = __pyx_v_cls; __pyx_t_7 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_10)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_hits, __pyx_v_event_id};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1011, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_hits, __pyx_v_event_id};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1011, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(__pyx_v_hits);
    __Pyx_GIVEREF(__pyx_v_hits);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_hits);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v_event_id);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":987
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, dus,             # <<<<<<<<<<<<<<
 *                     floors, pos_xs, pos_ys, pos_zs, t0s, times, tots,
 *                     triggereds, event_id):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XDECREF(__pyx_v_hits);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1014
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return CRawHitSeries(self._arr[self._arr['triggered'] == True],
 *                             self.event_id)  # noqa
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_5triggered_hits(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_4triggered_hits[] = "CRawHitSeries.triggered_hits(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_5triggered_hits = {"triggered_hits", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_5triggered_hits, METH_O, __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_4triggered_hits};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_5triggered_hits(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("triggered_hits (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_4triggered_hits(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_4triggered_hits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__94)
  __Pyx_RefNannySetupContext("triggered_hits", 0);
  __Pyx_TraceCall("triggered_hits", __pyx_f[0], 1014, 0, __PYX_ERR(0, 1014, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1015
 *     @property
 *     def triggered_hits(self):
 *         return CRawHitSeries(self._arr[self._arr['triggered'] == True],             # <<<<<<<<<<<<<<
 *                             self.event_id)  # noqa
 * 
 */
  __Pyx_TraceLine(1015,0,__PYX_ERR(0, 1015, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CRawHitSeries); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_triggered); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1016
 *     def triggered_hits(self):
 *         return CRawHitSeries(self._arr[self._arr['triggered'] == True],
 *                             self.event_id)  # noqa             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1016,0,__PYX_ERR(0, 1016, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_event_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1015, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1015, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_5 = 0;
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1014
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return CRawHitSeries(self._arr[self._arr['triggered'] == True],
 *                             self.event_id)  # noqa
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.triggered_hits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1019
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_7deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_6deserialise[] = "CRawHitSeries.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_7deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_7deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_6deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_7deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 1019, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1019, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_6deserialise(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_6deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__95)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 1019, 0, __PYX_ERR(0, 1019, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1020
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(1020,0,__PYX_ERR(0, 1020, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1019
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1022
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_9serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_8serialise[] = "CRawHitSeries.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_9serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_9serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_8serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_9serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 1022, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1022, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_8serialise(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_8serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__96)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 1022, 0, __PYX_ERR(0, 1022, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1023
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1023,0,__PYX_ERR(0, 1023, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1022
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1026
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls(data, event_id)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_11conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_10conv_from[] = "CRawHitSeries.conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_11conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_11conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_10conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_11conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_event_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, 1); __PYX_ERR(0, 1026, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 1026, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1026, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_10conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_event_id, __pyx_v_fmt, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_10conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__97)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 1026, 0, __PYX_ERR(0, 1026, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1027
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls(data, event_id)
 *         if fmt == 'pandas':
 */
  __Pyx_TraceLine(1027,0,__PYX_ERR(0, 1027, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1027, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1028
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 *             return cls(data, event_id)             # <<<<<<<<<<<<<<
 *         if fmt == 'pandas':
 *             return cls(data.to_records(index=False), event_id)
 */
    __Pyx_TraceLine(1028,0,__PYX_ERR(0, 1028, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_cls);
    __pyx_t_3 = __pyx_v_cls; __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_event_id};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1028, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_event_id};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1028, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1028, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
      __Pyx_INCREF(__pyx_v_event_id);
      __Pyx_GIVEREF(__pyx_v_event_id);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_event_id);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1028, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1027
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls(data, event_id)
 *         if fmt == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":1029
 *         if fmt == 'numpy':
 *             return cls(data, event_id)
 *         if fmt == 'pandas':             # <<<<<<<<<<<<<<
 *             return cls(data.to_records(index=False), event_id)
 * 
 */
  __Pyx_TraceLine(1029,0,__PYX_ERR(0, 1029, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1029, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1030
 *             return cls(data, event_id)
 *         if fmt == 'pandas':
 *             return cls(data.to_records(index=False), event_id)             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(1030,0,__PYX_ERR(0, 1030, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_to_records); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 1030, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_v_cls);
    __pyx_t_6 = __pyx_v_cls; __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_v_event_id};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1030, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_v_event_id};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1030, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1030, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_5, __pyx_t_4);
      __Pyx_INCREF(__pyx_v_event_id);
      __Pyx_GIVEREF(__pyx_v_event_id);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_5, __pyx_v_event_id);
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1030, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1029
 *         if fmt == 'numpy':
 *             return cls(data, event_id)
 *         if fmt == 'pandas':             # <<<<<<<<<<<<<<
 *             return cls(data.to_records(index=False), event_id)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1026
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls(data, event_id)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1032
 *             return cls(data.to_records(index=False), event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_13conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_12conv_to[] = "CRawHitSeries.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_13conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_13conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_12conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_13conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 1032, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1032, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_12conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_12conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__98)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 1032, 0, __PYX_ERR(0, 1032, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1033
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  __Pyx_TraceLine(1033,0,__PYX_ERR(0, 1033, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1033, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1034
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return self.__array__()             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(1034,0,__PYX_ERR(0, 1034, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1034, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1034, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1033
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":1035
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(1035,0,__PYX_ERR(0, 1035, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1035, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1036
 *             return self.__array__()
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_TraceLine(1036,0,__PYX_ERR(0, 1036, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 1036, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_t_3) < 0) __PYX_ERR(0, 1036, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1035
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1032
 *             return cls(data.to_records(index=False), event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1039
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return CRawHitSeries(self._arr[self._arr['triggered'] == True],
 *                              self.event_id)  # noqa
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_15triggered_hits(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_14triggered_hits[] = "CRawHitSeries.triggered_hits(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_15triggered_hits = {"triggered_hits", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_15triggered_hits, METH_O, __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_14triggered_hits};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_15triggered_hits(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("triggered_hits (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_14triggered_hits(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_14triggered_hits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__99)
  __Pyx_RefNannySetupContext("triggered_hits", 0);
  __Pyx_TraceCall("triggered_hits", __pyx_f[0], 1039, 0, __PYX_ERR(0, 1039, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1040
 *     @property
 *     def triggered_hits(self):
 *         return CRawHitSeries(self._arr[self._arr['triggered'] == True],             # <<<<<<<<<<<<<<
 *                              self.event_id)  # noqa
 * 
 */
  __Pyx_TraceLine(1040,0,__PYX_ERR(0, 1040, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CRawHitSeries); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_triggered); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1041
 *     def triggered_hits(self):
 *         return CRawHitSeries(self._arr[self._arr['triggered'] == True],
 *                              self.event_id)  # noqa             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
  __Pyx_TraceLine(1041,0,__PYX_ERR(0, 1041, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_event_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1040, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_5 = 0;
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1039
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return CRawHitSeries(self._arr[self._arr['triggered'] == True],
 *                              self.event_id)  # noqa
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.triggered_hits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1043
 *                              self.event_id)  # noqa
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_17__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_16__array__[] = "CRawHitSeries.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_17__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_17__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_16__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_17__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_16__array__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_16__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__100)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 1043, 0, __PYX_ERR(0, 1043, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1044
 * 
 *     def __array__(self):
 *         return self._arr             # <<<<<<<<<<<<<<
 * 
 *     def next(self):
 */
  __Pyx_TraceLine(1044,0,__PYX_ERR(0, 1044, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1043
 *                              self.event_id)  # noqa
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1046
 *         return self._arr
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_19next(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_18next[] = "CRawHitSeries.next(self)\nPython 2/3 compatibility for iterators";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_19next = {"next", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_19next, METH_O, __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_18next};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_19next(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_18next(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_18next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__101)
  __Pyx_RefNannySetupContext("next", 0);
  __Pyx_TraceCall("next", __pyx_f[0], 1046, 0, __PYX_ERR(0, 1046, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1048
 *     def next(self):
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_TraceLine(1048,0,__PYX_ERR(0, 1048, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1046
 *         return self._arr
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1050
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_21__next__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_20__next__[] = "CRawHitSeries.__next__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_21__next__ = {"__next__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_21__next__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_20__next__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_21__next__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_20__next__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_20__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_hit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_TraceFrameInit(__pyx_codeobj__102)
  __Pyx_RefNannySetupContext("__next__", 0);
  __Pyx_TraceCall("__next__", __pyx_f[0], 1050, 0, __PYX_ERR(0, 1050, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1051
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  __Pyx_TraceLine(1051,0,__PYX_ERR(0, 1051, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1051, __pyx_L1_error)
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "km3pipe/dataclasses.pyx":1052
 *     def __next__(self):
 *         if self._index >= len(self):
 *             self._index = 0             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         hit = self[self._index]
 */
    __Pyx_TraceLine(1052,0,__PYX_ERR(0, 1052, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_int_0) < 0) __PYX_ERR(0, 1052, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1053
 *         if self._index >= len(self):
 *             self._index = 0
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         hit = self[self._index]
 *         self._index += 1
 */
    __Pyx_TraceLine(1053,0,__PYX_ERR(0, 1053, __pyx_L1_error))
    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
    __PYX_ERR(0, 1053, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1051
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  }

  /* "km3pipe/dataclasses.pyx":1054
 *             self._index = 0
 *             raise StopIteration
 *         hit = self[self._index]             # <<<<<<<<<<<<<<
 *         self._index += 1
 *         return hit
 */
  __Pyx_TraceLine(1054,0,__PYX_ERR(0, 1054, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_GetItem(__pyx_v_self, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_hit = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1055
 *             raise StopIteration
 *         hit = self[self._index]
 *         self._index += 1             # <<<<<<<<<<<<<<
 *         return hit
 * 
 */
  __Pyx_TraceLine(1055,0,__PYX_ERR(0, 1055, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_t_4) < 0) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1056
 *         hit = self[self._index]
 *         self._index += 1
 *         return hit             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index):
 */
  __Pyx_TraceLine(1056,0,__PYX_ERR(0, 1056, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_hit);
  __pyx_r = __pyx_v_hit;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1050
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_hit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1058
 *         return hit
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             hit = CRawHit(*self._arr[index])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_23__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_22__getitem__[] = "CRawHitSeries.__getitem__(self, index)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_23__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_23__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_22__getitem__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_23__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 1058, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 1058, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1058, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_22__getitem__(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_22__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *__pyx_v_hit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__103)
  __Pyx_RefNannySetupContext("__getitem__", 0);
  __Pyx_TraceCall("__getitem__", __pyx_f[0], 1058, 0, __PYX_ERR(0, 1058, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1059
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             hit = CRawHit(*self._arr[index])
 *             return hit
 */
  __Pyx_TraceLine(1059,0,__PYX_ERR(0, 1059, __pyx_L1_error))
  __pyx_t_1 = PyInt_Check(__pyx_v_index); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":1060
 *     def __getitem__(self, index):
 *         if isinstance(index, int):
 *             hit = CRawHit(*self._arr[index])             # <<<<<<<<<<<<<<
 *             return hit
 *         return self.__class__(self._arr[index], self.event_id)
 */
    __Pyx_TraceLine(1060,0,__PYX_ERR(0, 1060, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_CRawHit), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_hit = ((struct __pyx_obj_7km3pipe_11dataclasses_CRawHit *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":1061
 *         if isinstance(index, int):
 *             hit = CRawHit(*self._arr[index])
 *             return hit             # <<<<<<<<<<<<<<
 *         return self.__class__(self._arr[index], self.event_id)
 * 
 */
    __Pyx_TraceLine(1061,0,__PYX_ERR(0, 1061, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_hit));
    __pyx_r = ((PyObject *)__pyx_v_hit);
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1059
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             hit = CRawHit(*self._arr[index])
 *             return hit
 */
  }

  /* "km3pipe/dataclasses.pyx":1062
 *             hit = CRawHit(*self._arr[index])
 *             return hit
 *         return self.__class__(self._arr[index], self.event_id)             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_TraceLine(1062,0,__PYX_ERR(0, 1062, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_v_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_event_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_t_5};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1062, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_t_5};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1062, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_5);
    __pyx_t_6 = 0;
    __pyx_t_5 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1058
 *         return hit
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             hit = CRawHit(*self._arr[index])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_hit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1064
 *         return self.__class__(self._arr[index], self.event_id)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_25__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_24__iter__[] = "CRawHitSeries.__iter__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_25__iter__ = {"__iter__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_25__iter__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_24__iter__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_25__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_24__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_24__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__104)
  __Pyx_RefNannySetupContext("__iter__", 0);
  __Pyx_TraceCall("__iter__", __pyx_f[0], 1064, 0, __PYX_ERR(0, 1064, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1065
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(1065,0,__PYX_ERR(0, 1065, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1064
 *         return self.__class__(self._arr[index], self.event_id)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1067
 *         return self
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_27__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_26__len__[] = "CRawHitSeries.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_27__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_27__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_26__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_27__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_26__len__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_26__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__105)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 1067, 0, __PYX_ERR(0, 1067, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1068
 * 
 *     def __len__(self):
 *         return self._arr.shape[0]             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(1068,0,__PYX_ERR(0, 1068, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1067
 *         return self
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1070
 *         return self._arr.shape[0]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_29__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_28__str__[] = "CRawHitSeries.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_29__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_29__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_28__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_29__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_28__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_28__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_v_n_hits;
  PyObject *__pyx_v_plural = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__106)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 1070, 0, __PYX_ERR(0, 1070, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1071
 * 
 *     def __str__(self):
 *         n_hits = len(self)             # <<<<<<<<<<<<<<
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 *         return("CRawHitSeries with {0} hit{1}.".format(len(self), plural))
 */
  __Pyx_TraceLine(1071,0,__PYX_ERR(0, 1071, __pyx_L1_error))
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1071, __pyx_L1_error)
  __pyx_v_n_hits = __pyx_t_1;

  /* "km3pipe/dataclasses.pyx":1072
 *     def __str__(self):
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''             # <<<<<<<<<<<<<<
 *         return("CRawHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 */
  __Pyx_TraceLine(1072,0,__PYX_ERR(0, 1072, __pyx_L1_error))
  __pyx_t_4 = ((__pyx_v_n_hits > 1) != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_4 = ((__pyx_v_n_hits == 0) != 0);
  __pyx_t_3 = __pyx_t_4;
  __pyx_L3_bool_binop_done:;
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_n_s_s);
    __pyx_t_2 = __pyx_n_s_s;
  } else {
    __Pyx_INCREF(__pyx_kp_s__88);
    __pyx_t_2 = __pyx_kp_s__88;
  }
  __pyx_v_plural = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1073
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 *         return("CRawHitSeries with {0} hit{1}.".format(len(self), plural))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(1073,0,__PYX_ERR(0, 1073, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_CRawHitSeries_with_0_hit_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1073, __pyx_L1_error)
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1073, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1073, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1073, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_plural);
    __Pyx_GIVEREF(__pyx_v_plural);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_plural);
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1073, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1070
 *         return self._arr.shape[0]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_plural);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1075
 *         return("CRawHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_31__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_30__repr__[] = "CRawHitSeries.__repr__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_31__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_31__repr__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13CRawHitSeries_30__repr__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13CRawHitSeries_31__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_30__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13CRawHitSeries_30__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__107)
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 1075, 0, __PYX_ERR(0, 1075, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1076
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(1076,0,__PYX_ERR(0, 1076, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1075
 *         return("CRawHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.CRawHitSeries.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1101
 *     cdef public np.ndarray dir
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   float bjorkeny,
 *                   dir,
 */

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  float __pyx_v_bjorkeny;
  PyObject *__pyx_v_dir = 0;
  float __pyx_v_energy;
  int __pyx_v_id;
  __pyx_t_5numpy_int64_t __pyx_v_interaction_channel;
  unsigned short __pyx_v_is_cc;
  float __pyx_v_length;
  PyObject *__pyx_v_pos = 0;
  int __pyx_v_time;
  int __pyx_v_type;
  CYTHON_UNUSED int __pyx_v_event_id;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bjorkeny,&__pyx_n_s_dir,&__pyx_n_s_energy,&__pyx_n_s_id,&__pyx_n_s_interaction_channel,&__pyx_n_s_is_cc,&__pyx_n_s_length,&__pyx_n_s_pos,&__pyx_n_s_time,&__pyx_n_s_type,&__pyx_n_s_event_id,0};
    PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bjorkeny)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 10, 11, 1); __PYX_ERR(0, 1101, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_energy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 10, 11, 2); __PYX_ERR(0, 1101, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 10, 11, 3); __PYX_ERR(0, 1101, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_interaction_channel)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 10, 11, 4); __PYX_ERR(0, 1101, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_is_cc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 10, 11, 5); __PYX_ERR(0, 1101, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_length)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 10, 11, 6); __PYX_ERR(0, 1101, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 10, 11, 7); __PYX_ERR(0, 1101, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 10, 11, 8); __PYX_ERR(0, 1101, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 10, 11, 9); __PYX_ERR(0, 1101, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id);
          if (value) { values[10] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1101, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_bjorkeny = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_bjorkeny == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1102, __pyx_L3_error)
    __pyx_v_dir = values[1];
    __pyx_v_energy = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_energy == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1104, __pyx_L3_error)
    __pyx_v_id = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1105, __pyx_L3_error)
    __pyx_v_interaction_channel = __Pyx_PyInt_As_npy_int64(values[4]); if (unlikely((__pyx_v_interaction_channel == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1106, __pyx_L3_error)
    __pyx_v_is_cc = __Pyx_PyInt_As_unsigned_short(values[5]); if (unlikely((__pyx_v_is_cc == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 1107, __pyx_L3_error)
    __pyx_v_length = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_length == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1108, __pyx_L3_error)
    __pyx_v_pos = values[7];
    __pyx_v_time = __Pyx_PyInt_As_int(values[8]); if (unlikely((__pyx_v_time == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1110, __pyx_L3_error)
    __pyx_v_type = __Pyx_PyInt_As_int(values[9]); if (unlikely((__pyx_v_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1111, __pyx_L3_error)
    if (values[10]) {
      __pyx_v_event_id = __Pyx_PyInt_As_int(values[10]); if (unlikely((__pyx_v_event_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1112, __pyx_L3_error)
    } else {
      __pyx_v_event_id = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 10, 11, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1101, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack___cinit__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self), __pyx_v_bjorkeny, __pyx_v_dir, __pyx_v_energy, __pyx_v_id, __pyx_v_interaction_channel, __pyx_v_is_cc, __pyx_v_length, __pyx_v_pos, __pyx_v_time, __pyx_v_type, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7McTrack___cinit__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, float __pyx_v_bjorkeny, PyObject *__pyx_v_dir, float __pyx_v_energy, int __pyx_v_id, __pyx_t_5numpy_int64_t __pyx_v_interaction_channel, unsigned short __pyx_v_is_cc, float __pyx_v_length, PyObject *__pyx_v_pos, int __pyx_v_time, int __pyx_v_type, CYTHON_UNUSED int __pyx_v_event_id) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 1101, 0, __PYX_ERR(0, 1101, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1114
 *                   int event_id=0,
 *                   ):
 *         self.bjorkeny = bjorkeny             # <<<<<<<<<<<<<<
 *         self.is_cc = is_cc
 *         self.dir = dir
 */
  __Pyx_TraceLine(1114,0,__PYX_ERR(0, 1114, __pyx_L1_error))
  __pyx_v_self->bjorkeny = __pyx_v_bjorkeny;

  /* "km3pipe/dataclasses.pyx":1115
 *                   ):
 *         self.bjorkeny = bjorkeny
 *         self.is_cc = is_cc             # <<<<<<<<<<<<<<
 *         self.dir = dir
 *         self.energy = energy
 */
  __Pyx_TraceLine(1115,0,__PYX_ERR(0, 1115, __pyx_L1_error))
  __pyx_v_self->is_cc = __pyx_v_is_cc;

  /* "km3pipe/dataclasses.pyx":1116
 *         self.bjorkeny = bjorkeny
 *         self.is_cc = is_cc
 *         self.dir = dir             # <<<<<<<<<<<<<<
 *         self.energy = energy
 *         self.interaction_channel = interaction_channel
 */
  __Pyx_TraceLine(1116,0,__PYX_ERR(0, 1116, __pyx_L1_error))
  if (!(likely(((__pyx_v_dir) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dir, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1116, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_dir;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->dir);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->dir));
  __pyx_v_self->dir = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1117
 *         self.is_cc = is_cc
 *         self.dir = dir
 *         self.energy = energy             # <<<<<<<<<<<<<<
 *         self.interaction_channel = interaction_channel
 *         self.id = id
 */
  __Pyx_TraceLine(1117,0,__PYX_ERR(0, 1117, __pyx_L1_error))
  __pyx_v_self->energy = __pyx_v_energy;

  /* "km3pipe/dataclasses.pyx":1118
 *         self.dir = dir
 *         self.energy = energy
 *         self.interaction_channel = interaction_channel             # <<<<<<<<<<<<<<
 *         self.id = id
 *         self.length = length
 */
  __Pyx_TraceLine(1118,0,__PYX_ERR(0, 1118, __pyx_L1_error))
  __pyx_v_self->interaction_channel = __pyx_v_interaction_channel;

  /* "km3pipe/dataclasses.pyx":1119
 *         self.energy = energy
 *         self.interaction_channel = interaction_channel
 *         self.id = id             # <<<<<<<<<<<<<<
 *         self.length = length
 *         self.pos = pos
 */
  __Pyx_TraceLine(1119,0,__PYX_ERR(0, 1119, __pyx_L1_error))
  __pyx_v_self->id = __pyx_v_id;

  /* "km3pipe/dataclasses.pyx":1120
 *         self.interaction_channel = interaction_channel
 *         self.id = id
 *         self.length = length             # <<<<<<<<<<<<<<
 *         self.pos = pos
 *         self.time = time
 */
  __Pyx_TraceLine(1120,0,__PYX_ERR(0, 1120, __pyx_L1_error))
  __pyx_v_self->length = __pyx_v_length;

  /* "km3pipe/dataclasses.pyx":1121
 *         self.id = id
 *         self.length = length
 *         self.pos = pos             # <<<<<<<<<<<<<<
 *         self.time = time
 *         self.type = type
 */
  __Pyx_TraceLine(1121,0,__PYX_ERR(0, 1121, __pyx_L1_error))
  if (!(likely(((__pyx_v_pos) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_pos, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1121, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_pos;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->pos);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pos));
  __pyx_v_self->pos = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1122
 *         self.length = length
 *         self.pos = pos
 *         self.time = time             # <<<<<<<<<<<<<<
 *         self.type = type
 * 
 */
  __Pyx_TraceLine(1122,0,__PYX_ERR(0, 1122, __pyx_L1_error))
  __pyx_v_self->time = __pyx_v_time;

  /* "km3pipe/dataclasses.pyx":1123
 *         self.pos = pos
 *         self.time = time
 *         self.type = type             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(1123,0,__PYX_ERR(0, 1123, __pyx_L1_error))
  __pyx_v_self->type = __pyx_v_type;

  /* "km3pipe/dataclasses.pyx":1101
 *     cdef public np.ndarray dir
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   float bjorkeny,
 *                   dir,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1125
 *         self.type = type
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "McTrack: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})" \
 *                .format(self.pos, self.dir, self.time, self.energy,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_2__str__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_2__str__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 1125, 0, __PYX_ERR(0, 1125, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1126
 * 
 *     def __str__(self):
 *         return "McTrack: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})" \             # <<<<<<<<<<<<<<
 *                .format(self.pos, self.dir, self.time, self.energy,
 *                        self.type, pdg2name(self.type))
 */
  __Pyx_TraceLine(1126,0,__PYX_ERR(0, 1126, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);

  /* "km3pipe/dataclasses.pyx":1127
 *     def __str__(self):
 *         return "McTrack: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})" \
 *                .format(self.pos, self.dir, self.time, self.energy,             # <<<<<<<<<<<<<<
 *                        self.type, pdg2name(self.type))
 * 
 */
  __Pyx_TraceLine(1127,0,__PYX_ERR(0, 1127, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_McTrack_pos_0_dir_1_t_2_E_3_type, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->energy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":1128
 *         return "McTrack: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})" \
 *                .format(self.pos, self.dir, self.time, self.energy,
 *                        self.type, pdg2name(self.type))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(1128,0,__PYX_ERR(0, 1128, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdg2name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_self->type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_9) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1128, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_11 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_11 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_7, ((PyObject *)__pyx_v_self->pos), ((PyObject *)__pyx_v_self->dir), __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 6+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_7, ((PyObject *)__pyx_v_self->pos), ((PyObject *)__pyx_v_self->dir), __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 6+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(6+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self->pos));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->pos));
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_11, ((PyObject *)__pyx_v_self->pos));
    __Pyx_INCREF(((PyObject *)__pyx_v_self->dir));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->dir));
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_11, ((PyObject *)__pyx_v_self->dir));
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_11, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_11, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_11, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 5+__pyx_t_11, __pyx_t_6);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1125
 *         self.type = type
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "McTrack: pos({0}), dir({1}), t={2}, E={3}, type={4} ({5})" \
 *                .format(self.pos, self.dir, self.time, self.energy,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1130
 *                        self.type, pdg2name(self.type))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_4__repr__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_4__repr__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 1130, 0, __PYX_ERR(0, 1130, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1131
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(1131,0,__PYX_ERR(0, 1131, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1131, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1131, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1130
 *                        self.type, pdg2name(self.type))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1133
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_7McTrack_6__insp__[] = "McTrack.__insp__(self)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_7__insp__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_6__insp__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_6__insp__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 1133, 0, __PYX_ERR(0, 1133, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1134
 * 
 *     def __insp__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(1134,0,__PYX_ERR(0, 1134, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1133
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1095
 *     type : int
 *     """
 *     cdef public int id, time, type, interaction_channel             # <<<<<<<<<<<<<<
 *     cdef public float energy, length, bjorkeny
 *     cdef public unsigned short int is_cc
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_2id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_2id___get__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_2id___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 1095, 0, __PYX_ERR(0, 1095, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_2id_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_2id_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 1095, 0, __PYX_ERR(0, 1095, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L1_error)
  __pyx_v_self->id = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_4time_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_4time___get__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_4time___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 1095, 0, __PYX_ERR(0, 1095, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_4time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_4time_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_4time_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 1095, 0, __PYX_ERR(0, 1095, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L1_error)
  __pyx_v_self->time = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.time.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_4type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_4type___get__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_4type___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 1095, 0, __PYX_ERR(0, 1095, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_4type_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_4type_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 1095, 0, __PYX_ERR(0, 1095, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L1_error)
  __pyx_v_self->type = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_19interaction_channel_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_19interaction_channel_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_19interaction_channel___get__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_19interaction_channel___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 1095, 0, __PYX_ERR(0, 1095, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->interaction_channel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.interaction_channel.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_19interaction_channel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_19interaction_channel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_19interaction_channel_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_19interaction_channel_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 1095, 0, __PYX_ERR(0, 1095, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L1_error)
  __pyx_v_self->interaction_channel = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.interaction_channel.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1096
 *     """
 *     cdef public int id, time, type, interaction_channel
 *     cdef public float energy, length, bjorkeny             # <<<<<<<<<<<<<<
 *     cdef public unsigned short int is_cc
 *     cdef public np.ndarray pos
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_6energy_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_6energy_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_6energy___get__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_6energy___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 1096, 0, __PYX_ERR(0, 1096, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->energy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.energy.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_6energy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_6energy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_6energy_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_6energy_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 1096, 0, __PYX_ERR(0, 1096, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1096, __pyx_L1_error)
  __pyx_v_self->energy = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.energy.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_6length_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_6length_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_6length___get__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_6length___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 1096, 0, __PYX_ERR(0, 1096, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_6length_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_6length_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_6length_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_6length_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 1096, 0, __PYX_ERR(0, 1096, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1096, __pyx_L1_error)
  __pyx_v_self->length = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.length.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_8bjorkeny_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_8bjorkeny_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_8bjorkeny___get__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_8bjorkeny___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 1096, 0, __PYX_ERR(0, 1096, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->bjorkeny); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.bjorkeny.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_8bjorkeny_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_8bjorkeny_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_8bjorkeny_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_8bjorkeny_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 1096, 0, __PYX_ERR(0, 1096, __pyx_L1_error));
  __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1096, __pyx_L1_error)
  __pyx_v_self->bjorkeny = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.bjorkeny.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1097
 *     cdef public int id, time, type, interaction_channel
 *     cdef public float energy, length, bjorkeny
 *     cdef public unsigned short int is_cc             # <<<<<<<<<<<<<<
 *     cdef public np.ndarray pos
 *     cdef public np.ndarray dir
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_5is_cc_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_5is_cc_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_5is_cc___get__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_5is_cc___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 1097, 0, __PYX_ERR(0, 1097, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->is_cc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.is_cc.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_5is_cc_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_5is_cc_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_5is_cc_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_5is_cc_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned short __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 1097, 0, __PYX_ERR(0, 1097, __pyx_L1_error));
  __pyx_t_1 = __Pyx_PyInt_As_unsigned_short(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 1097, __pyx_L1_error)
  __pyx_v_self->is_cc = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.is_cc.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1098
 *     cdef public float energy, length, bjorkeny
 *     cdef public unsigned short int is_cc
 *     cdef public np.ndarray pos             # <<<<<<<<<<<<<<
 *     cdef public np.ndarray dir
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_3pos_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_3pos___get__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_3pos___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 1098, 0, __PYX_ERR(0, 1098, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->pos));
  __pyx_r = ((PyObject *)__pyx_v_self->pos);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_3pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_3pos_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_3pos_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 1098, 0, __PYX_ERR(0, 1098, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1098, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->pos);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pos));
  __pyx_v_self->pos = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.pos.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_3pos_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_3pos_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_3pos_4__del__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_3pos_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[0], 1098, 0, __PYX_ERR(0, 1098, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->pos);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pos));
  __pyx_v_self->pos = ((PyArrayObject *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.pos.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1099
 *     cdef public unsigned short int is_cc
 *     cdef public np.ndarray pos
 *     cdef public np.ndarray dir             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_3dir_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_3dir_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_3dir___get__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_3dir___get__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 1099, 0, __PYX_ERR(0, 1099, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->dir));
  __pyx_r = ((PyObject *)__pyx_v_self->dir);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.dir.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_3dir_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_3dir_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_3dir_2__set__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_3dir_2__set__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 1099, 0, __PYX_ERR(0, 1099, __pyx_L1_error));
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1099, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->dir);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->dir));
  __pyx_v_self->dir = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.dir.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_3dir_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7km3pipe_11dataclasses_7McTrack_3dir_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_3dir_4__del__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7km3pipe_11dataclasses_7McTrack_3dir_4__del__(struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_TraceCall("__del__", __pyx_f[0], 1099, 0, __PYX_ERR(0, 1099, __pyx_L1_error));
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->dir);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->dir));
  __pyx_v_self->dir = ((PyArrayObject *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.dir.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_7McTrack_8__reduce_cython__[] = "McTrack.__reduce_cython__(self)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_8__reduce_cython__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __Pyx_TraceLine(2,0,__PYX_ERR(1, 2, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__108, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_7McTrack_10__setstate_cython__[] = "McTrack.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_7km3pipe_11dataclasses_7McTrack_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_7McTrack_10__setstate_cython__(((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_7McTrack_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7km3pipe_11dataclasses_McTrack *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__109, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrack.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1150
 *     write_separate_columns = True
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries___init__[] = "McHitSeries.__init__(self, arr, h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_arr_2,&__pyx_n_s_h5loc,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 1150, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1150, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_arr = values[1];
    __pyx_v_h5loc = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1150, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries___init__(__pyx_self, __pyx_v_self, __pyx_v_arr, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__110)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1150, 0, __PYX_ERR(0, 1150, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1151
 * 
 *     def __init__(self, arr, h5loc='/'):
 *         self._arr = arr             # <<<<<<<<<<<<<<
 *         self._index = 0
 *         self._hits = None
 */
  __Pyx_TraceLine(1151,0,__PYX_ERR(0, 1151, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_arr, __pyx_v_arr) < 0) __PYX_ERR(0, 1151, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1152
 *     def __init__(self, arr, h5loc='/'):
 *         self._arr = arr
 *         self._index = 0             # <<<<<<<<<<<<<<
 *         self._hits = None
 *         self.h5loc = h5loc
 */
  __Pyx_TraceLine(1152,0,__PYX_ERR(0, 1152, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_int_0) < 0) __PYX_ERR(0, 1152, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1153
 *         self._arr = arr
 *         self._index = 0
 *         self._hits = None             # <<<<<<<<<<<<<<
 *         self.h5loc = h5loc
 * 
 */
  __Pyx_TraceLine(1153,0,__PYX_ERR(0, 1153, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_hits, Py_None) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1154
 *         self._index = 0
 *         self._hits = None
 *         self.h5loc = h5loc             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1154,0,__PYX_ERR(0, 1154, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 1154, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1150
 *     write_separate_columns = True
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1157
 * 
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             h.a,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_3from_aanet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_2from_aanet[] = "McHitSeries.from_aanet(cls, hits, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_3from_aanet = {"from_aanet", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_3from_aanet, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_2from_aanet};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_3from_aanet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_hits = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_aanet (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_hits_2,&__pyx_n_s_event_id,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hits_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, 1); __PYX_ERR(0, 1157, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, 2); __PYX_ERR(0, 1157, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_aanet") < 0)) __PYX_ERR(0, 1157, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_cls = values[0];
    __pyx_v_hits = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1157, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.from_aanet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_2from_aanet(__pyx_self, __pyx_v_cls, __pyx_v_hits, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_2from_aanet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_hits, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_h = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__111)
  __Pyx_RefNannySetupContext("from_aanet", 0);
  __Pyx_TraceCall("from_aanet", __pyx_f[0], 1157, 0, __PYX_ERR(0, 1157, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1158
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             h.a,
 *             h.origin,
 */
  __Pyx_TraceLine(1158,0,__PYX_ERR(0, 1158, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "km3pipe/dataclasses.pyx":1164
 *             h.t,
 *             event_id,
 *         ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1164,0,__PYX_ERR(0, 1164, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_hits)) || PyTuple_CheckExact(__pyx_v_hits)) {
    __pyx_t_4 = __pyx_v_hits; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_hits); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1164, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1164, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1164, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1164, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1164, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1164, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_h, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":1159
 *     def from_aanet(cls, hits, event_id):
 *         return cls(np.array([(
 *             h.a,             # <<<<<<<<<<<<<<
 *             h.origin,
 *             h.pmt_id,
 */
    __Pyx_TraceLine(1159,0,__PYX_ERR(0, 1159, __pyx_L1_error))
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_a); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "km3pipe/dataclasses.pyx":1160
 *         return cls(np.array([(
 *             h.a,
 *             h.origin,             # <<<<<<<<<<<<<<
 *             h.pmt_id,
 *             h.t,
 */
    __Pyx_TraceLine(1160,0,__PYX_ERR(0, 1160, __pyx_L1_error))
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_origin); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "km3pipe/dataclasses.pyx":1161
 *             h.a,
 *             h.origin,
 *             h.pmt_id,             # <<<<<<<<<<<<<<
 *             h.t,
 *             event_id,
 */
    __Pyx_TraceLine(1161,0,__PYX_ERR(0, 1161, __pyx_L1_error))
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_pmt_id); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "km3pipe/dataclasses.pyx":1162
 *             h.origin,
 *             h.pmt_id,
 *             h.t,             # <<<<<<<<<<<<<<
 *             event_id,
 *         ) for h in hits], dtype=cls.dtype))
 */
    __Pyx_TraceLine(1162,0,__PYX_ERR(0, 1162, __pyx_L1_error))
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "km3pipe/dataclasses.pyx":1159
 *     def from_aanet(cls, hits, event_id):
 *         return cls(np.array([(
 *             h.a,             # <<<<<<<<<<<<<<
 *             h.origin,
 *             h.pmt_id,
 */
    __Pyx_TraceLine(1159,0,__PYX_ERR(0, 1159, __pyx_L1_error))
    __pyx_t_11 = PyTuple_New(5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_10);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_v_event_id);
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 1158, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "km3pipe/dataclasses.pyx":1164
 *             h.t,
 *             event_id,
 *         ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(1164,0,__PYX_ERR(0, 1164, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1158
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             h.a,
 *             h.origin,
 */
  __Pyx_TraceLine(1158,0,__PYX_ERR(0, 1158, __pyx_L1_error))
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1164
 *             h.t,
 *             event_id,
 *         ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1164,0,__PYX_ERR(0, 1164, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_11) < 0) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "km3pipe/dataclasses.pyx":1158
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             h.a,
 *             h.origin,
 */
  __Pyx_TraceLine(1158,0,__PYX_ERR(0, 1158, __pyx_L1_error))
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_2 = __pyx_v_cls; __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_11};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_11};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_11);
      __pyx_t_11 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1157
 * 
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             h.a,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.from_aanet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_h);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1167
 * 
 *     @classmethod
 *     def from_evt(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             h.a,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_5from_evt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_4from_evt[] = "McHitSeries.from_evt(cls, hits, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_5from_evt = {"from_evt", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_5from_evt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_4from_evt};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_5from_evt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_hits = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_evt (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_hits_2,&__pyx_n_s_event_id,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hits_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_evt", 1, 3, 3, 1); __PYX_ERR(0, 1167, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_evt", 1, 3, 3, 2); __PYX_ERR(0, 1167, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_evt") < 0)) __PYX_ERR(0, 1167, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_cls = values[0];
    __pyx_v_hits = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_evt", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1167, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.from_evt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_4from_evt(__pyx_self, __pyx_v_cls, __pyx_v_hits, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_4from_evt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_hits, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_h = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__112)
  __Pyx_RefNannySetupContext("from_evt", 0);
  __Pyx_TraceCall("from_evt", __pyx_f[0], 1167, 0, __PYX_ERR(0, 1167, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1168
 *     @classmethod
 *     def from_evt(cls, hits, event_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             h.a,
 *             h.origin,
 */
  __Pyx_TraceLine(1168,0,__PYX_ERR(0, 1168, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "km3pipe/dataclasses.pyx":1174
 *             h.time,
 *             event_id,
 *         ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1174,0,__PYX_ERR(0, 1174, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_hits)) || PyTuple_CheckExact(__pyx_v_hits)) {
    __pyx_t_4 = __pyx_v_hits; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_hits); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1174, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1174, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1174, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1174, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1174, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1174, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_h, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":1169
 *     def from_evt(cls, hits, event_id):
 *         return cls(np.array([(
 *             h.a,             # <<<<<<<<<<<<<<
 *             h.origin,
 *             h.pmt_id,
 */
    __Pyx_TraceLine(1169,0,__PYX_ERR(0, 1169, __pyx_L1_error))
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_a); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "km3pipe/dataclasses.pyx":1170
 *         return cls(np.array([(
 *             h.a,
 *             h.origin,             # <<<<<<<<<<<<<<
 *             h.pmt_id,
 *             h.time,
 */
    __Pyx_TraceLine(1170,0,__PYX_ERR(0, 1170, __pyx_L1_error))
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_origin); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "km3pipe/dataclasses.pyx":1171
 *             h.a,
 *             h.origin,
 *             h.pmt_id,             # <<<<<<<<<<<<<<
 *             h.time,
 *             event_id,
 */
    __Pyx_TraceLine(1171,0,__PYX_ERR(0, 1171, __pyx_L1_error))
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_pmt_id); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "km3pipe/dataclasses.pyx":1172
 *             h.origin,
 *             h.pmt_id,
 *             h.time,             # <<<<<<<<<<<<<<
 *             event_id,
 *         ) for h in hits], dtype=cls.dtype))
 */
    __Pyx_TraceLine(1172,0,__PYX_ERR(0, 1172, __pyx_L1_error))
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_time); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "km3pipe/dataclasses.pyx":1169
 *     def from_evt(cls, hits, event_id):
 *         return cls(np.array([(
 *             h.a,             # <<<<<<<<<<<<<<
 *             h.origin,
 *             h.pmt_id,
 */
    __Pyx_TraceLine(1169,0,__PYX_ERR(0, 1169, __pyx_L1_error))
    __pyx_t_11 = PyTuple_New(5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_10);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_v_event_id);
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "km3pipe/dataclasses.pyx":1174
 *             h.time,
 *             event_id,
 *         ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(1174,0,__PYX_ERR(0, 1174, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1168
 *     @classmethod
 *     def from_evt(cls, hits, event_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             h.a,
 *             h.origin,
 */
  __Pyx_TraceLine(1168,0,__PYX_ERR(0, 1168, __pyx_L1_error))
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1174
 *             h.time,
 *             event_id,
 *         ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1174,0,__PYX_ERR(0, 1174, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_11) < 0) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "km3pipe/dataclasses.pyx":1168
 *     @classmethod
 *     def from_evt(cls, hits, event_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             h.a,
 *             h.origin,
 */
  __Pyx_TraceLine(1168,0,__PYX_ERR(0, 1168, __pyx_L1_error))
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_2 = __pyx_v_cls; __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_11};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_11};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_11);
      __pyx_t_11 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1167
 * 
 *     @classmethod
 *     def from_evt(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             h.a,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.from_evt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_h);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1177
 * 
 *     @classmethod
 *     def from_arrays(cls, a, origin, pmt_id, time, event_id):             # <<<<<<<<<<<<<<
 *         # do we need shape[0] or does len() work too?
 *         try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_7from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_6from_arrays[] = "McHitSeries.from_arrays(cls, a, origin, pmt_id, time, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_7from_arrays = {"from_arrays", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_7from_arrays, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_6from_arrays};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_7from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_origin = 0;
  PyObject *__pyx_v_pmt_id = 0;
  PyObject *__pyx_v_time = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_a,&__pyx_n_s_origin,&__pyx_n_s_pmt_id,&__pyx_n_s_time,&__pyx_n_s_event_id,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 6, 6, 1); __PYX_ERR(0, 1177, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_origin)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 6, 6, 2); __PYX_ERR(0, 1177, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pmt_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 6, 6, 3); __PYX_ERR(0, 1177, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 6, 6, 4); __PYX_ERR(0, 1177, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 6, 6, 5); __PYX_ERR(0, 1177, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_arrays") < 0)) __PYX_ERR(0, 1177, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_cls = values[0];
    __pyx_v_a = values[1];
    __pyx_v_origin = values[2];
    __pyx_v_pmt_id = values[3];
    __pyx_v_time = values[4];
    __pyx_v_event_id = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1177, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_6from_arrays(__pyx_self, __pyx_v_cls, __pyx_v_a, __pyx_v_origin, __pyx_v_pmt_id, __pyx_v_time, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_6from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_a, PyObject *__pyx_v_origin, PyObject *__pyx_v_pmt_id, PyObject *__pyx_v_time, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_v_hits = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__113)
  __Pyx_RefNannySetupContext("from_arrays", 0);
  __Pyx_TraceCall("from_arrays", __pyx_f[0], 1177, 0, __PYX_ERR(0, 1177, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1179
 *     def from_arrays(cls, a, origin, pmt_id, time, event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = time.shape[0]
 *         except AttributeError:
 */
  __Pyx_TraceLine(1179,0,__PYX_ERR(0, 1179, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":1180
 *         # do we need shape[0] or does len() work too?
 *         try:
 *             length = time.shape[0]             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             length = len(time)
 */
      __Pyx_TraceLine(1180,0,__PYX_ERR(0, 1180, __pyx_L3_error))
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_time, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1180, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1180, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_length = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "km3pipe/dataclasses.pyx":1179
 *     def from_arrays(cls, a, origin, pmt_id, time, event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = time.shape[0]
 *         except AttributeError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":1181
 *         try:
 *             length = time.shape[0]
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             length = len(time)
 *         hits = np.empty(length, cls.dtype)
 */
    __Pyx_TraceLine(1181,0,__PYX_ERR(0, 1181, __pyx_L5_except_error))
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 1181, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);

      /* "km3pipe/dataclasses.pyx":1182
 *             length = time.shape[0]
 *         except AttributeError:
 *             length = len(time)             # <<<<<<<<<<<<<<
 *         hits = np.empty(length, cls.dtype)
 *         hits['a'] = a
 */
      __Pyx_TraceLine(1182,0,__PYX_ERR(0, 1182, __pyx_L5_except_error))
      __pyx_t_8 = PyObject_Length(__pyx_v_time); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1182, __pyx_L5_except_error)
      __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1182, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "km3pipe/dataclasses.pyx":1179
 *     def from_arrays(cls, a, origin, pmt_id, time, event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = time.shape[0]
 *         except AttributeError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "km3pipe/dataclasses.pyx":1183
 *         except AttributeError:
 *             length = len(time)
 *         hits = np.empty(length, cls.dtype)             # <<<<<<<<<<<<<<
 *         hits['a'] = a
 *         hits['origin'] = origin
 */
  __Pyx_TraceLine(1183,0,__PYX_ERR(0, 1183, __pyx_L1_error))
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_length, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1183, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_length, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1183, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_INCREF(__pyx_v_length);
    __Pyx_GIVEREF(__pyx_v_length);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_v_length);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_hits = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1184
 *             length = len(time)
 *         hits = np.empty(length, cls.dtype)
 *         hits['a'] = a             # <<<<<<<<<<<<<<
 *         hits['origin'] = origin
 *         hits['pmt_id'] = pmt_id
 */
  __Pyx_TraceLine(1184,0,__PYX_ERR(0, 1184, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_a, __pyx_v_a) < 0)) __PYX_ERR(0, 1184, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1185
 *         hits = np.empty(length, cls.dtype)
 *         hits['a'] = a
 *         hits['origin'] = origin             # <<<<<<<<<<<<<<
 *         hits['pmt_id'] = pmt_id
 *         hits['time'] = time
 */
  __Pyx_TraceLine(1185,0,__PYX_ERR(0, 1185, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_origin, __pyx_v_origin) < 0)) __PYX_ERR(0, 1185, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1186
 *         hits['a'] = a
 *         hits['origin'] = origin
 *         hits['pmt_id'] = pmt_id             # <<<<<<<<<<<<<<
 *         hits['time'] = time
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 */
  __Pyx_TraceLine(1186,0,__PYX_ERR(0, 1186, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_pmt_id, __pyx_v_pmt_id) < 0)) __PYX_ERR(0, 1186, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1187
 *         hits['origin'] = origin
 *         hits['pmt_id'] = pmt_id
 *         hits['time'] = time             # <<<<<<<<<<<<<<
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 *         return cls(hits)
 */
  __Pyx_TraceLine(1187,0,__PYX_ERR(0, 1187, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_time, __pyx_v_time) < 0)) __PYX_ERR(0, 1187, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1188
 *         hits['pmt_id'] = pmt_id
 *         hits['time'] = time
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')             # <<<<<<<<<<<<<<
 *         return cls(hits)
 * 
 */
  __Pyx_TraceLine(1188,0,__PYX_ERR(0, 1188, __pyx_L1_error))
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_full); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_length);
  __Pyx_GIVEREF(__pyx_v_length);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_length);
  __Pyx_INCREF(__pyx_v_event_id);
  __Pyx_GIVEREF(__pyx_v_event_id);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_event_id);
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_kp_s_u4) < 0) __PYX_ERR(0, 1188, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_event_id, __pyx_t_4) < 0)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1189
 *         hits['time'] = time
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 *         return cls(hits)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1189,0,__PYX_ERR(0, 1189, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_10 = __pyx_v_cls; __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_hits); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_10)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_hits};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1189, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_hits};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1189, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_INCREF(__pyx_v_hits);
      __Pyx_GIVEREF(__pyx_v_hits);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_hits);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1177
 * 
 *     @classmethod
 *     def from_arrays(cls, a, origin, pmt_id, time, event_id):             # <<<<<<<<<<<<<<
 *         # do we need shape[0] or does len() work too?
 *         try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XDECREF(__pyx_v_hits);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1192
 * 
 *     @classmethod
 *     def from_dict(cls, map, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = map['event_id']
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_9from_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_8from_dict[] = "McHitSeries.from_dict(cls, map, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_9from_dict = {"from_dict", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_9from_dict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_8from_dict};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_9from_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_map = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_dict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_map,&__pyx_n_s_event_id,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_map)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_dict", 1, 3, 3, 1); __PYX_ERR(0, 1192, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_dict", 1, 3, 3, 2); __PYX_ERR(0, 1192, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_dict") < 0)) __PYX_ERR(0, 1192, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_cls = values[0];
    __pyx_v_map = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_dict", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1192, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_8from_dict(__pyx_self, __pyx_v_cls, __pyx_v_map, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_8from_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_map, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__114)
  __Pyx_RefNannySetupContext("from_dict", 0);
  __Pyx_TraceCall("from_dict", __pyx_f[0], 1192, 0, __PYX_ERR(0, 1192, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_event_id);

  /* "km3pipe/dataclasses.pyx":1193
 *     @classmethod
 *     def from_dict(cls, map, event_id):
 *         if event_id is None:             # <<<<<<<<<<<<<<
 *             event_id = map['event_id']
 *         return cls.from_arrays(
 */
  __Pyx_TraceLine(1193,0,__PYX_ERR(0, 1193, __pyx_L1_error))
  __pyx_t_1 = (__pyx_v_event_id == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":1194
 *     def from_dict(cls, map, event_id):
 *         if event_id is None:
 *             event_id = map['event_id']             # <<<<<<<<<<<<<<
 *         return cls.from_arrays(
 *             map['a'],
 */
    __Pyx_TraceLine(1194,0,__PYX_ERR(0, 1194, __pyx_L1_error))
    __pyx_t_3 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_event_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_event_id, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "km3pipe/dataclasses.pyx":1193
 *     @classmethod
 *     def from_dict(cls, map, event_id):
 *         if event_id is None:             # <<<<<<<<<<<<<<
 *             event_id = map['event_id']
 *         return cls.from_arrays(
 */
  }

  /* "km3pipe/dataclasses.pyx":1195
 *         if event_id is None:
 *             event_id = map['event_id']
 *         return cls.from_arrays(             # <<<<<<<<<<<<<<
 *             map['a'],
 *             map['origin'],
 */
  __Pyx_TraceLine(1195,0,__PYX_ERR(0, 1195, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_arrays); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":1196
 *             event_id = map['event_id']
 *         return cls.from_arrays(
 *             map['a'],             # <<<<<<<<<<<<<<
 *             map['origin'],
 *             map['pmt_id'],
 */
  __Pyx_TraceLine(1196,0,__PYX_ERR(0, 1196, __pyx_L1_error))
  __pyx_t_5 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_a); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":1197
 *         return cls.from_arrays(
 *             map['a'],
 *             map['origin'],             # <<<<<<<<<<<<<<
 *             map['pmt_id'],
 *             map['time'],
 */
  __Pyx_TraceLine(1197,0,__PYX_ERR(0, 1197, __pyx_L1_error))
  __pyx_t_6 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_origin); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1198
 *             map['a'],
 *             map['origin'],
 *             map['pmt_id'],             # <<<<<<<<<<<<<<
 *             map['time'],
 *             event_id,
 */
  __Pyx_TraceLine(1198,0,__PYX_ERR(0, 1198, __pyx_L1_error))
  __pyx_t_7 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_pmt_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1199
 *             map['origin'],
 *             map['pmt_id'],
 *             map['time'],             # <<<<<<<<<<<<<<
 *             event_id,
 *         )
 */
  __Pyx_TraceLine(1199,0,__PYX_ERR(0, 1199, __pyx_L1_error))
  __pyx_t_8 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_time); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "km3pipe/dataclasses.pyx":1200
 *             map['pmt_id'],
 *             map['time'],
 *             event_id,             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __Pyx_TraceLine(1200,0,__PYX_ERR(0, 1200, __pyx_L1_error))
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[6] = {__pyx_t_9, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_v_event_id};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 5+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1195, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[6] = {__pyx_t_9, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_v_event_id};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 5+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1195, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(5+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_10, __pyx_t_8);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_11, 4+__pyx_t_10, __pyx_v_event_id);
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1192
 * 
 *     @classmethod
 *     def from_dict(cls, map, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = map['event_id']
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_event_id);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1204
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_11from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_10from_table[] = "McHitSeries.from_table(cls, table, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_11from_table = {"from_table", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_11from_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_10from_table};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_11from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_table = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_table,&__pyx_n_s_event_id,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_table)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, 1); __PYX_ERR(0, 1204, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, 2); __PYX_ERR(0, 1204, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_table") < 0)) __PYX_ERR(0, 1204, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_cls = values[0];
    __pyx_v_table = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1204, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_10from_table(__pyx_self, __pyx_v_cls, __pyx_v_table, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_10from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  __Pyx_TraceFrameInit(__pyx_codeobj__115)
  __Pyx_RefNannySetupContext("from_table", 0);
  __Pyx_TraceCall("from_table", __pyx_f[0], 1204, 0, __PYX_ERR(0, 1204, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_event_id);

  /* "km3pipe/dataclasses.pyx":1205
 *     @classmethod
 *     def from_table(cls, table, event_id):
 *         if event_id is None:             # <<<<<<<<<<<<<<
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(
 */
  __Pyx_TraceLine(1205,0,__PYX_ERR(0, 1205, __pyx_L1_error))
  __pyx_t_1 = (__pyx_v_event_id == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":1206
 *     def from_table(cls, table, event_id):
 *         if event_id is None:
 *             event_id = table[0]['event_id']             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             row['a'],
 */
    __Pyx_TraceLine(1206,0,__PYX_ERR(0, 1206, __pyx_L1_error))
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_table, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_event_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_event_id, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":1205
 *     @classmethod
 *     def from_table(cls, table, event_id):
 *         if event_id is None:             # <<<<<<<<<<<<<<
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(
 */
  }

  /* "km3pipe/dataclasses.pyx":1207
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['a'],
 *             row['origin'],
 */
  __Pyx_TraceLine(1207,0,__PYX_ERR(0, 1207, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "km3pipe/dataclasses.pyx":1212
 *             row['pmt_id'],
 *             row['time'],
 *         ) for row in table], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1212,0,__PYX_ERR(0, 1212, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_table)) || PyTuple_CheckExact(__pyx_v_table)) {
    __pyx_t_6 = __pyx_v_table; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1212, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_6))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1212, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1212, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1212, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1212, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_8(__pyx_t_6);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1212, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "km3pipe/dataclasses.pyx":1208
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(
 *             row['a'],             # <<<<<<<<<<<<<<
 *             row['origin'],
 *             row['pmt_id'],
 */
    __Pyx_TraceLine(1208,0,__PYX_ERR(0, 1208, __pyx_L1_error))
    __pyx_t_9 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_a); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "km3pipe/dataclasses.pyx":1209
 *         return cls(np.array([(
 *             row['a'],
 *             row['origin'],             # <<<<<<<<<<<<<<
 *             row['pmt_id'],
 *             row['time'],
 */
    __Pyx_TraceLine(1209,0,__PYX_ERR(0, 1209, __pyx_L1_error))
    __pyx_t_10 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_origin); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "km3pipe/dataclasses.pyx":1210
 *             row['a'],
 *             row['origin'],
 *             row['pmt_id'],             # <<<<<<<<<<<<<<
 *             row['time'],
 *         ) for row in table], dtype=cls.dtype), event_id)
 */
    __Pyx_TraceLine(1210,0,__PYX_ERR(0, 1210, __pyx_L1_error))
    __pyx_t_11 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pmt_id); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);

    /* "km3pipe/dataclasses.pyx":1211
 *             row['origin'],
 *             row['pmt_id'],
 *             row['time'],             # <<<<<<<<<<<<<<
 *         ) for row in table], dtype=cls.dtype), event_id)
 * 
 */
    __Pyx_TraceLine(1211,0,__PYX_ERR(0, 1211, __pyx_L1_error))
    __pyx_t_12 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_time); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);

    /* "km3pipe/dataclasses.pyx":1208
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(
 *             row['a'],             # <<<<<<<<<<<<<<
 *             row['origin'],
 *             row['pmt_id'],
 */
    __Pyx_TraceLine(1208,0,__PYX_ERR(0, 1208, __pyx_L1_error))
    __pyx_t_13 = PyTuple_New(4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_t_12);
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    __pyx_t_12 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 1207, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "km3pipe/dataclasses.pyx":1212
 *             row['pmt_id'],
 *             row['time'],
 *         ) for row in table], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(1212,0,__PYX_ERR(0, 1212, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1207
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['a'],
 *             row['origin'],
 */
  __Pyx_TraceLine(1207,0,__PYX_ERR(0, 1207, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1212
 *             row['pmt_id'],
 *             row['time'],
 *         ) for row in table], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1212,0,__PYX_ERR(0, 1212, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_13) < 0) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "km3pipe/dataclasses.pyx":1207
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['a'],
 *             row['origin'],
 */
  __Pyx_TraceLine(1207,0,__PYX_ERR(0, 1207, __pyx_L1_error))
  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1212
 *             row['pmt_id'],
 *             row['time'],
 *         ) for row in table], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1212,0,__PYX_ERR(0, 1212, __pyx_L1_error))
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_3 = __pyx_v_cls; __pyx_t_6 = NULL;
  __pyx_t_14 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_14 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_13, __pyx_v_event_id};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_13, __pyx_v_event_id};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_14, __pyx_t_13);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_14, __pyx_v_event_id);
    __pyx_t_13 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1204
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_event_id);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1215
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_13deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_12deserialise[] = "McHitSeries.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_13deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_13deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_12deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_13deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 1215, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1215, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_12deserialise(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_12deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__116)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 1215, 0, __PYX_ERR(0, 1215, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1216
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(1216,0,__PYX_ERR(0, 1216, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1215
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1218
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_15serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_14serialise[] = "McHitSeries.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_15serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_15serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_14serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_15serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 1218, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1218, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_14serialise(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_14serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__117)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 1218, 0, __PYX_ERR(0, 1218, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1219
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1219,0,__PYX_ERR(0, 1219, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1218
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1222
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_17conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_16conv_from[] = "McHitSeries.conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_17conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_17conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_16conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_17conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_event_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, 1); __PYX_ERR(0, 1222, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 1222, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1222, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_16conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_event_id, __pyx_v_fmt, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_16conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__118)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 1222, 0, __PYX_ERR(0, 1222, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1224
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         # what is event_id doing here?
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls(data)
 *         if fmt == 'pandas':
 */
  __Pyx_TraceLine(1224,0,__PYX_ERR(0, 1224, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1224, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1225
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 *             return cls(data)             # <<<<<<<<<<<<<<
 *         if fmt == 'pandas':
 *             return cls(data.to_records(index=False))
 */
    __Pyx_TraceLine(1225,0,__PYX_ERR(0, 1225, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_cls);
    __pyx_t_3 = __pyx_v_cls; __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1225, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_data};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1225, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_data};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1225, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1225, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_data);
        __Pyx_GIVEREF(__pyx_v_data);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1225, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1224
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         # what is event_id doing here?
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls(data)
 *         if fmt == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":1226
 *         if fmt == 'numpy':
 *             return cls(data)
 *         if fmt == 'pandas':             # <<<<<<<<<<<<<<
 *             return cls(data.to_records(index=False))
 * 
 */
  __Pyx_TraceLine(1226,0,__PYX_ERR(0, 1226, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1226, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1227
 *             return cls(data)
 *         if fmt == 'pandas':
 *             return cls(data.to_records(index=False))             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(1227,0,__PYX_ERR(0, 1227, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_to_records); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 1227, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_v_cls);
    __pyx_t_5 = __pyx_v_cls; __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1227, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1227, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1227, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1227, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1227, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1226
 *         if fmt == 'numpy':
 *             return cls(data)
 *         if fmt == 'pandas':             # <<<<<<<<<<<<<<
 *             return cls(data.to_records(index=False))
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1222
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1229
 *             return cls(data.to_records(index=False))
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_19conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_18conv_to[] = "McHitSeries.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_19conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_19conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_18conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_19conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 1229, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1229, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_18conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_18conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__119)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 1229, 0, __PYX_ERR(0, 1229, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1230
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  __Pyx_TraceLine(1230,0,__PYX_ERR(0, 1230, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1230, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1231
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return self.__array__()             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(1231,0,__PYX_ERR(0, 1231, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1231, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1231, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1230
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":1232
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(1232,0,__PYX_ERR(0, 1232, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1232, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1233
 *             return self.__array__()
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(1233,0,__PYX_ERR(0, 1233, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 1233, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_t_3) < 0) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1232
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1229
 *             return cls(data.to_records(index=False))
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1235
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_21__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_20__array__[] = "McHitSeries.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_21__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_21__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_20__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_21__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_20__array__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_20__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__120)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 1235, 0, __PYX_ERR(0, 1235, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1236
 * 
 *     def __array__(self):
 *         return self._arr             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_TraceLine(1236,0,__PYX_ERR(0, 1236, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1235
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1238
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_23__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_22__iter__[] = "McHitSeries.__iter__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_23__iter__ = {"__iter__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_23__iter__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_22__iter__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_23__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_22__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_22__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__121)
  __Pyx_RefNannySetupContext("__iter__", 0);
  __Pyx_TraceCall("__iter__", __pyx_f[0], 1238, 0, __PYX_ERR(0, 1238, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1239
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def next(self):
 */
  __Pyx_TraceLine(1239,0,__PYX_ERR(0, 1239, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1238
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1241
 *         return self
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_25next(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_24next[] = "McHitSeries.next(self)\nPython 2/3 compatibility for iterators";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_25next = {"next", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_25next, METH_O, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_24next};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_25next(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_24next(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_24next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__122)
  __Pyx_RefNannySetupContext("next", 0);
  __Pyx_TraceCall("next", __pyx_f[0], 1241, 0, __PYX_ERR(0, 1241, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1243
 *     def next(self):
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_TraceLine(1243,0,__PYX_ERR(0, 1243, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1243, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1241
 *         return self
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1245
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_27__next__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_26__next__[] = "McHitSeries.__next__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_27__next__ = {"__next__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_27__next__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_26__next__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_27__next__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_26__next__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_26__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_hit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_TraceFrameInit(__pyx_codeobj__123)
  __Pyx_RefNannySetupContext("__next__", 0);
  __Pyx_TraceCall("__next__", __pyx_f[0], 1245, 0, __PYX_ERR(0, 1245, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1246
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  __Pyx_TraceLine(1246,0,__PYX_ERR(0, 1246, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1246, __pyx_L1_error)
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1246, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1246, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "km3pipe/dataclasses.pyx":1247
 *     def __next__(self):
 *         if self._index >= len(self):
 *             self._index = 0             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         hit = self[self._index]
 */
    __Pyx_TraceLine(1247,0,__PYX_ERR(0, 1247, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_int_0) < 0) __PYX_ERR(0, 1247, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1248
 *         if self._index >= len(self):
 *             self._index = 0
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         hit = self[self._index]
 *         self._index += 1
 */
    __Pyx_TraceLine(1248,0,__PYX_ERR(0, 1248, __pyx_L1_error))
    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
    __PYX_ERR(0, 1248, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1246
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  }

  /* "km3pipe/dataclasses.pyx":1249
 *             self._index = 0
 *             raise StopIteration
 *         hit = self[self._index]             # <<<<<<<<<<<<<<
 *         self._index += 1
 *         return hit
 */
  __Pyx_TraceLine(1249,0,__PYX_ERR(0, 1249, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_GetItem(__pyx_v_self, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_hit = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1250
 *             raise StopIteration
 *         hit = self[self._index]
 *         self._index += 1             # <<<<<<<<<<<<<<
 *         return hit
 * 
 */
  __Pyx_TraceLine(1250,0,__PYX_ERR(0, 1250, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_t_4) < 0) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1251
 *         hit = self[self._index]
 *         self._index += 1
 *         return hit             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(1251,0,__PYX_ERR(0, 1251, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_hit);
  __pyx_r = __pyx_v_hit;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1245
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_hit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1253
 *         return hit
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_29__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_28__len__[] = "McHitSeries.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_29__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_29__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_28__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_29__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_28__len__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_28__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__124)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 1253, 0, __PYX_ERR(0, 1253, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1254
 * 
 *     def __len__(self):
 *         return self._arr.shape[0]             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index):
 */
  __Pyx_TraceLine(1254,0,__PYX_ERR(0, 1254, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1253
 *         return hit
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1256
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return McHit(*self._arr[index])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_31__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_30__getitem__[] = "McHitSeries.__getitem__(self, index)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_31__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_31__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_30__getitem__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_31__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 1256, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 1256, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1256, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_30__getitem__(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_30__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__125)
  __Pyx_RefNannySetupContext("__getitem__", 0);
  __Pyx_TraceCall("__getitem__", __pyx_f[0], 1256, 0, __PYX_ERR(0, 1256, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1257
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return McHit(*self._arr[index])
 *         return self.__class__(self._arr[index], self.event_id)
 */
  __Pyx_TraceLine(1257,0,__PYX_ERR(0, 1257, __pyx_L1_error))
  __pyx_t_1 = PyInt_Check(__pyx_v_index); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":1258
 *     def __getitem__(self, index):
 *         if isinstance(index, int):
 *             return McHit(*self._arr[index])             # <<<<<<<<<<<<<<
 *         return self.__class__(self._arr[index], self.event_id)
 * 
 */
    __Pyx_TraceLine(1258,0,__PYX_ERR(0, 1258, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_McHit), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1257
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return McHit(*self._arr[index])
 *         return self.__class__(self._arr[index], self.event_id)
 */
  }

  /* "km3pipe/dataclasses.pyx":1259
 *         if isinstance(index, int):
 *             return McHit(*self._arr[index])
 *         return self.__class__(self._arr[index], self.event_id)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(1259,0,__PYX_ERR(0, 1259, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_v_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_event_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_t_5};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1259, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_t_5};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1259, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_5);
    __pyx_t_6 = 0;
    __pyx_t_5 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1256
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return McHit(*self._arr[index])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1261
 *         return self.__class__(self._arr[index], self.event_id)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_33__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_32__str__[] = "McHitSeries.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_33__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_33__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_32__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_33__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_32__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_32__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_v_n_hits;
  PyObject *__pyx_v_plural = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__126)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 1261, 0, __PYX_ERR(0, 1261, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1262
 * 
 *     def __str__(self):
 *         n_hits = len(self)             # <<<<<<<<<<<<<<
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 *         return("McHitSeries with {0} hit{1}.".format(len(self), plural))
 */
  __Pyx_TraceLine(1262,0,__PYX_ERR(0, 1262, __pyx_L1_error))
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1262, __pyx_L1_error)
  __pyx_v_n_hits = __pyx_t_1;

  /* "km3pipe/dataclasses.pyx":1263
 *     def __str__(self):
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''             # <<<<<<<<<<<<<<
 *         return("McHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 */
  __Pyx_TraceLine(1263,0,__PYX_ERR(0, 1263, __pyx_L1_error))
  __pyx_t_4 = ((__pyx_v_n_hits > 1) != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_4 = ((__pyx_v_n_hits == 0) != 0);
  __pyx_t_3 = __pyx_t_4;
  __pyx_L3_bool_binop_done:;
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_n_s_s);
    __pyx_t_2 = __pyx_n_s_s;
  } else {
    __Pyx_INCREF(__pyx_kp_s__88);
    __pyx_t_2 = __pyx_kp_s__88;
  }
  __pyx_v_plural = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1264
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 *         return("McHitSeries with {0} hit{1}.".format(len(self), plural))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(1264,0,__PYX_ERR(0, 1264, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_McHitSeries_with_0_hit_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1264, __pyx_L1_error)
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1264, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1264, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_plural);
    __Pyx_GIVEREF(__pyx_v_plural);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_plural);
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1261
 *         return self.__class__(self._arr[index], self.event_id)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_plural);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1266
 *         return("McHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_35__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_34__repr__[] = "McHitSeries.__repr__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_35__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_35__repr__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_34__repr__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_35__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_34__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_34__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__127)
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 1266, 0, __PYX_ERR(0, 1266, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1267
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(1267,0,__PYX_ERR(0, 1267, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1266
 *         return("McHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1269
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_37__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_36__insp__[] = "McHitSeries.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_37__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_37__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11McHitSeries_36__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11McHitSeries_37__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11McHitSeries_36__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11McHitSeries_36__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_hit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__128)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 1269, 0, __PYX_ERR(0, 1269, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1270
 * 
 *     def __insp__(self):
 *         return '\n'.join([str(hit) for hit in self._hits])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(1270,0,__PYX_ERR(0, 1270, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hits); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1270, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1270, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1270, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1270, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1270, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1270, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_hit, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_hit);
    __Pyx_GIVEREF(__pyx_v_hit);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_hit);
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1270, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__91, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1269
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.McHitSeries.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_hit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1292
 *     write_separate_columns = True
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries___init__[] = "CMcHitSeries.__init__(self, arr, h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_arr_2,&__pyx_n_s_h5loc,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 1292, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1292, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_arr = values[1];
    __pyx_v_h5loc = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1292, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CMcHitSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries___init__(__pyx_self, __pyx_v_self, __pyx_v_arr, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__129)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1292, 0, __PYX_ERR(0, 1292, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1293
 * 
 *     def __init__(self, arr, h5loc='/'):
 *         self._arr = arr             # <<<<<<<<<<<<<<
 *         self._index = 0
 *         self._hits = None
 */
  __Pyx_TraceLine(1293,0,__PYX_ERR(0, 1293, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_arr, __pyx_v_arr) < 0) __PYX_ERR(0, 1293, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1294
 *     def __init__(self, arr, h5loc='/'):
 *         self._arr = arr
 *         self._index = 0             # <<<<<<<<<<<<<<
 *         self._hits = None
 *         self.h5loc = h5loc
 */
  __Pyx_TraceLine(1294,0,__PYX_ERR(0, 1294, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_int_0) < 0) __PYX_ERR(0, 1294, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1295
 *         self._arr = arr
 *         self._index = 0
 *         self._hits = None             # <<<<<<<<<<<<<<
 *         self.h5loc = h5loc
 * 
 */
  __Pyx_TraceLine(1295,0,__PYX_ERR(0, 1295, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_hits, Py_None) < 0) __PYX_ERR(0, 1295, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1296
 *         self._index = 0
 *         self._hits = None
 *         self.h5loc = h5loc             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1296,0,__PYX_ERR(0, 1296, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 1296, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1292
 *     write_separate_columns = True
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CMcHitSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1299
 * 
 *     @classmethod
 *     def from_arrays(cls, a, dir_x, dir_y, dir_z, origin,             # <<<<<<<<<<<<<<
 *                     pmt_id, pos_x, pos_y, pos_z, time, event_id):
 *         # do we need shape[0] or does len() work too?
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_3from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_2from_arrays[] = "CMcHitSeries.from_arrays(cls, a, dir_x, dir_y, dir_z, origin, pmt_id, pos_x, pos_y, pos_z, time, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_3from_arrays = {"from_arrays", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_3from_arrays, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_2from_arrays};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_3from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_dir_x = 0;
  PyObject *__pyx_v_dir_y = 0;
  PyObject *__pyx_v_dir_z = 0;
  PyObject *__pyx_v_origin = 0;
  PyObject *__pyx_v_pmt_id = 0;
  PyObject *__pyx_v_pos_x = 0;
  PyObject *__pyx_v_pos_y = 0;
  PyObject *__pyx_v_pos_z = 0;
  PyObject *__pyx_v_time = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_a,&__pyx_n_s_dir_x,&__pyx_n_s_dir_y,&__pyx_n_s_dir_z,&__pyx_n_s_origin,&__pyx_n_s_pmt_id,&__pyx_n_s_pos_x,&__pyx_n_s_pos_y,&__pyx_n_s_pos_z,&__pyx_n_s_time,&__pyx_n_s_event_id,0};
    PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 12, 12, 1); __PYX_ERR(0, 1299, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 12, 12, 2); __PYX_ERR(0, 1299, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 12, 12, 3); __PYX_ERR(0, 1299, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 12, 12, 4); __PYX_ERR(0, 1299, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_origin)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 12, 12, 5); __PYX_ERR(0, 1299, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pmt_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 12, 12, 6); __PYX_ERR(0, 1299, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 12, 12, 7); __PYX_ERR(0, 1299, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 12, 12, 8); __PYX_ERR(0, 1299, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 12, 12, 9); __PYX_ERR(0, 1299, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (likely((values[10] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 12, 12, 10); __PYX_ERR(0, 1299, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 11:
        if (likely((values[11] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 12, 12, 11); __PYX_ERR(0, 1299, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_arrays") < 0)) __PYX_ERR(0, 1299, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 12) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
      values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
      values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
      values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
    }
    __pyx_v_cls = values[0];
    __pyx_v_a = values[1];
    __pyx_v_dir_x = values[2];
    __pyx_v_dir_y = values[3];
    __pyx_v_dir_z = values[4];
    __pyx_v_origin = values[5];
    __pyx_v_pmt_id = values[6];
    __pyx_v_pos_x = values[7];
    __pyx_v_pos_y = values[8];
    __pyx_v_pos_z = values[9];
    __pyx_v_time = values[10];
    __pyx_v_event_id = values[11];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 12, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1299, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CMcHitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_2from_arrays(__pyx_self, __pyx_v_cls, __pyx_v_a, __pyx_v_dir_x, __pyx_v_dir_y, __pyx_v_dir_z, __pyx_v_origin, __pyx_v_pmt_id, __pyx_v_pos_x, __pyx_v_pos_y, __pyx_v_pos_z, __pyx_v_time, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_2from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_a, PyObject *__pyx_v_dir_x, PyObject *__pyx_v_dir_y, PyObject *__pyx_v_dir_z, PyObject *__pyx_v_origin, PyObject *__pyx_v_pmt_id, PyObject *__pyx_v_pos_x, PyObject *__pyx_v_pos_y, PyObject *__pyx_v_pos_z, PyObject *__pyx_v_time, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_v_hits = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__130)
  __Pyx_RefNannySetupContext("from_arrays", 0);
  __Pyx_TraceCall("from_arrays", __pyx_f[0], 1299, 0, __PYX_ERR(0, 1299, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1302
 *                     pmt_id, pos_x, pos_y, pos_z, time, event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = time.shape[0]
 *         except AttributeError:
 */
  __Pyx_TraceLine(1302,0,__PYX_ERR(0, 1302, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":1303
 *         # do we need shape[0] or does len() work too?
 *         try:
 *             length = time.shape[0]             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             length = len(time)
 */
      __Pyx_TraceLine(1303,0,__PYX_ERR(0, 1303, __pyx_L3_error))
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_time, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1303, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1303, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_length = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "km3pipe/dataclasses.pyx":1302
 *                     pmt_id, pos_x, pos_y, pos_z, time, event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = time.shape[0]
 *         except AttributeError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":1304
 *         try:
 *             length = time.shape[0]
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             length = len(time)
 *         hits = np.empty(length, cls.dtype)
 */
    __Pyx_TraceLine(1304,0,__PYX_ERR(0, 1304, __pyx_L5_except_error))
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("km3pipe.dataclasses.CMcHitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 1304, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);

      /* "km3pipe/dataclasses.pyx":1305
 *             length = time.shape[0]
 *         except AttributeError:
 *             length = len(time)             # <<<<<<<<<<<<<<
 *         hits = np.empty(length, cls.dtype)
 *         hits['a'] = a
 */
      __Pyx_TraceLine(1305,0,__PYX_ERR(0, 1305, __pyx_L5_except_error))
      __pyx_t_8 = PyObject_Length(__pyx_v_time); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1305, __pyx_L5_except_error)
      __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1305, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "km3pipe/dataclasses.pyx":1302
 *                     pmt_id, pos_x, pos_y, pos_z, time, event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = time.shape[0]
 *         except AttributeError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "km3pipe/dataclasses.pyx":1306
 *         except AttributeError:
 *             length = len(time)
 *         hits = np.empty(length, cls.dtype)             # <<<<<<<<<<<<<<
 *         hits['a'] = a
 *         hits['dir_x'] = dir_x
 */
  __Pyx_TraceLine(1306,0,__PYX_ERR(0, 1306, __pyx_L1_error))
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_length, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1306, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_length, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1306, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_INCREF(__pyx_v_length);
    __Pyx_GIVEREF(__pyx_v_length);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_v_length);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_hits = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1307
 *             length = len(time)
 *         hits = np.empty(length, cls.dtype)
 *         hits['a'] = a             # <<<<<<<<<<<<<<
 *         hits['dir_x'] = dir_x
 *         hits['dir_y'] = dir_y
 */
  __Pyx_TraceLine(1307,0,__PYX_ERR(0, 1307, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_a, __pyx_v_a) < 0)) __PYX_ERR(0, 1307, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1308
 *         hits = np.empty(length, cls.dtype)
 *         hits['a'] = a
 *         hits['dir_x'] = dir_x             # <<<<<<<<<<<<<<
 *         hits['dir_y'] = dir_y
 *         hits['dir_z'] = dir_z
 */
  __Pyx_TraceLine(1308,0,__PYX_ERR(0, 1308, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dir_x, __pyx_v_dir_x) < 0)) __PYX_ERR(0, 1308, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1309
 *         hits['a'] = a
 *         hits['dir_x'] = dir_x
 *         hits['dir_y'] = dir_y             # <<<<<<<<<<<<<<
 *         hits['dir_z'] = dir_z
 *         hits['origin'] = origin
 */
  __Pyx_TraceLine(1309,0,__PYX_ERR(0, 1309, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dir_y, __pyx_v_dir_y) < 0)) __PYX_ERR(0, 1309, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1310
 *         hits['dir_x'] = dir_x
 *         hits['dir_y'] = dir_y
 *         hits['dir_z'] = dir_z             # <<<<<<<<<<<<<<
 *         hits['origin'] = origin
 *         hits['pmt_id'] = pmt_id
 */
  __Pyx_TraceLine(1310,0,__PYX_ERR(0, 1310, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dir_z, __pyx_v_dir_z) < 0)) __PYX_ERR(0, 1310, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1311
 *         hits['dir_y'] = dir_y
 *         hits['dir_z'] = dir_z
 *         hits['origin'] = origin             # <<<<<<<<<<<<<<
 *         hits['pmt_id'] = pmt_id
 *         hits['pos_x'] = pos_x
 */
  __Pyx_TraceLine(1311,0,__PYX_ERR(0, 1311, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_origin, __pyx_v_origin) < 0)) __PYX_ERR(0, 1311, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1312
 *         hits['dir_z'] = dir_z
 *         hits['origin'] = origin
 *         hits['pmt_id'] = pmt_id             # <<<<<<<<<<<<<<
 *         hits['pos_x'] = pos_x
 *         hits['pos_y'] = pos_y
 */
  __Pyx_TraceLine(1312,0,__PYX_ERR(0, 1312, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_pmt_id, __pyx_v_pmt_id) < 0)) __PYX_ERR(0, 1312, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1313
 *         hits['origin'] = origin
 *         hits['pmt_id'] = pmt_id
 *         hits['pos_x'] = pos_x             # <<<<<<<<<<<<<<
 *         hits['pos_y'] = pos_y
 *         hits['pos_z'] = pos_z
 */
  __Pyx_TraceLine(1313,0,__PYX_ERR(0, 1313, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_pos_x, __pyx_v_pos_x) < 0)) __PYX_ERR(0, 1313, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1314
 *         hits['pmt_id'] = pmt_id
 *         hits['pos_x'] = pos_x
 *         hits['pos_y'] = pos_y             # <<<<<<<<<<<<<<
 *         hits['pos_z'] = pos_z
 *         hits['time'] = time
 */
  __Pyx_TraceLine(1314,0,__PYX_ERR(0, 1314, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_pos_y, __pyx_v_pos_y) < 0)) __PYX_ERR(0, 1314, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1315
 *         hits['pos_x'] = pos_x
 *         hits['pos_y'] = pos_y
 *         hits['pos_z'] = pos_z             # <<<<<<<<<<<<<<
 *         hits['time'] = time
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 */
  __Pyx_TraceLine(1315,0,__PYX_ERR(0, 1315, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_pos_z, __pyx_v_pos_z) < 0)) __PYX_ERR(0, 1315, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1316
 *         hits['pos_y'] = pos_y
 *         hits['pos_z'] = pos_z
 *         hits['time'] = time             # <<<<<<<<<<<<<<
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 *         return cls(hits)
 */
  __Pyx_TraceLine(1316,0,__PYX_ERR(0, 1316, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_time, __pyx_v_time) < 0)) __PYX_ERR(0, 1316, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1317
 *         hits['pos_z'] = pos_z
 *         hits['time'] = time
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')             # <<<<<<<<<<<<<<
 *         return cls(hits)
 * 
 */
  __Pyx_TraceLine(1317,0,__PYX_ERR(0, 1317, __pyx_L1_error))
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_full); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_length);
  __Pyx_GIVEREF(__pyx_v_length);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_length);
  __Pyx_INCREF(__pyx_v_event_id);
  __Pyx_GIVEREF(__pyx_v_event_id);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_event_id);
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_kp_s_u4) < 0) __PYX_ERR(0, 1317, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_event_id, __pyx_t_4) < 0)) __PYX_ERR(0, 1317, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1318
 *         hits['time'] = time
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 *         return cls(hits)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1318,0,__PYX_ERR(0, 1318, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_10 = __pyx_v_cls; __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_hits); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_10)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_hits};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1318, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_hits};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1318, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1318, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_INCREF(__pyx_v_hits);
      __Pyx_GIVEREF(__pyx_v_hits);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_hits);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1318, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1299
 * 
 *     @classmethod
 *     def from_arrays(cls, a, dir_x, dir_y, dir_z, origin,             # <<<<<<<<<<<<<<
 *                     pmt_id, pos_x, pos_y, pos_z, time, event_id):
 *         # do we need shape[0] or does len() work too?
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("km3pipe.dataclasses.CMcHitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XDECREF(__pyx_v_hits);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1321
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_5deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_4deserialise[] = "CMcHitSeries.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_5deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_5deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_4deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_5deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 1321, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1321, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.CMcHitSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_4deserialise(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_4deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__131)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 1321, 0, __PYX_ERR(0, 1321, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1322
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(1322,0,__PYX_ERR(0, 1322, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1321
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.CMcHitSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1324
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_7serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_6serialise[] = "CMcHitSeries.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_7serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_7serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_6serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_7serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 1324, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1324, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.CMcHitSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_6serialise(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_6serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__132)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 1324, 0, __PYX_ERR(0, 1324, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1325
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1325,0,__PYX_ERR(0, 1325, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1324
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.CMcHitSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1328
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_9conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_8conv_from[] = "CMcHitSeries.conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_9conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_9conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_8conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_9conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_event_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, 1); __PYX_ERR(0, 1328, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 1328, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1328, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CMcHitSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_8conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_event_id, __pyx_v_fmt, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_8conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__133)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 1328, 0, __PYX_ERR(0, 1328, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1330
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         # what is event_id doing here?
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls(data)
 *         if fmt == 'pandas':
 */
  __Pyx_TraceLine(1330,0,__PYX_ERR(0, 1330, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1330, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1331
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 *             return cls(data)             # <<<<<<<<<<<<<<
 *         if fmt == 'pandas':
 *             return cls(data.to_records(index=False))
 */
    __Pyx_TraceLine(1331,0,__PYX_ERR(0, 1331, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_cls);
    __pyx_t_3 = __pyx_v_cls; __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_data};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_data};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1331, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_data);
        __Pyx_GIVEREF(__pyx_v_data);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1330
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         # what is event_id doing here?
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls(data)
 *         if fmt == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":1332
 *         if fmt == 'numpy':
 *             return cls(data)
 *         if fmt == 'pandas':             # <<<<<<<<<<<<<<
 *             return cls(data.to_records(index=False))
 * 
 */
  __Pyx_TraceLine(1332,0,__PYX_ERR(0, 1332, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1332, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1333
 *             return cls(data)
 *         if fmt == 'pandas':
 *             return cls(data.to_records(index=False))             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(1333,0,__PYX_ERR(0, 1333, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_to_records); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 1333, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_v_cls);
    __pyx_t_5 = __pyx_v_cls; __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1333, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1333, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1333, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1333, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1333, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1332
 *         if fmt == 'numpy':
 *             return cls(data)
 *         if fmt == 'pandas':             # <<<<<<<<<<<<<<
 *             return cls(data.to_records(index=False))
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1328
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.CMcHitSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1335
 *             return cls(data.to_records(index=False))
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_11conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_10conv_to[] = "CMcHitSeries.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_11conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_11conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_10conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_11conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 1335, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1335, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.CMcHitSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_10conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_10conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__134)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 1335, 0, __PYX_ERR(0, 1335, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1336
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  __Pyx_TraceLine(1336,0,__PYX_ERR(0, 1336, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1336, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1337
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return self.__array__()             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(1337,0,__PYX_ERR(0, 1337, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1337, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1337, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1336
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":1338
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(1338,0,__PYX_ERR(0, 1338, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1338, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1339
 *             return self.__array__()
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(1339,0,__PYX_ERR(0, 1339, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 1339, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_t_3) < 0) __PYX_ERR(0, 1339, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1338
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1335
 *             return cls(data.to_records(index=False))
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.CMcHitSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1341
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_13__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_12__array__[] = "CMcHitSeries.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_13__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_13__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_12__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_13__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_12__array__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_12__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__135)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 1341, 0, __PYX_ERR(0, 1341, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1342
 * 
 *     def __array__(self):
 *         return self._arr             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(1342,0,__PYX_ERR(0, 1342, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1341
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.CMcHitSeries.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1344
 *         return self._arr
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_15__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_14__len__[] = "CMcHitSeries.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_15__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_15__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_14__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_15__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_14__len__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_14__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__136)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 1344, 0, __PYX_ERR(0, 1344, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1345
 * 
 *     def __len__(self):
 *         return self._arr.shape[0]             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(1345,0,__PYX_ERR(0, 1345, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1344
 *         return self._arr
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.CMcHitSeries.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1347
 *         return self._arr.shape[0]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_17__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_16__str__[] = "CMcHitSeries.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_17__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_17__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_16__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_17__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_16__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_16__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_v_n_hits;
  PyObject *__pyx_v_plural = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__137)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 1347, 0, __PYX_ERR(0, 1347, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1348
 * 
 *     def __str__(self):
 *         n_hits = len(self)             # <<<<<<<<<<<<<<
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 *         return("CMcHitSeries with {0} hit{1}.".format(len(self), plural))
 */
  __Pyx_TraceLine(1348,0,__PYX_ERR(0, 1348, __pyx_L1_error))
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1348, __pyx_L1_error)
  __pyx_v_n_hits = __pyx_t_1;

  /* "km3pipe/dataclasses.pyx":1349
 *     def __str__(self):
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''             # <<<<<<<<<<<<<<
 *         return("CMcHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 */
  __Pyx_TraceLine(1349,0,__PYX_ERR(0, 1349, __pyx_L1_error))
  __pyx_t_4 = ((__pyx_v_n_hits > 1) != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_4 = ((__pyx_v_n_hits == 0) != 0);
  __pyx_t_3 = __pyx_t_4;
  __pyx_L3_bool_binop_done:;
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_n_s_s);
    __pyx_t_2 = __pyx_n_s_s;
  } else {
    __Pyx_INCREF(__pyx_kp_s__88);
    __pyx_t_2 = __pyx_kp_s__88;
  }
  __pyx_v_plural = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1350
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 *         return("CMcHitSeries with {0} hit{1}.".format(len(self), plural))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(1350,0,__PYX_ERR(0, 1350, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_CMcHitSeries_with_0_hit_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1350, __pyx_L1_error)
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1350, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1350, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_plural);
    __Pyx_GIVEREF(__pyx_v_plural);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_plural);
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1347
 *         return self._arr.shape[0]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.CMcHitSeries.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_plural);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1352
 *         return("CMcHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_19__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_18__repr__[] = "CMcHitSeries.__repr__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_19__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_19__repr__, METH_O, __pyx_doc_7km3pipe_11dataclasses_12CMcHitSeries_18__repr__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12CMcHitSeries_19__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_18__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12CMcHitSeries_18__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__138)
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 1352, 0, __PYX_ERR(0, 1352, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1353
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(1353,0,__PYX_ERR(0, 1353, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1352
 *         return("CMcHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.CMcHitSeries.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1378
 *     ])
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries___init__[] = "HitSeries.__init__(self, arr, h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_arr_2,&__pyx_n_s_h5loc,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 1378, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1378, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_arr = values[1];
    __pyx_v_h5loc = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1378, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries___init__(__pyx_self, __pyx_v_self, __pyx_v_arr, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__139)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1378, 0, __PYX_ERR(0, 1378, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1379
 * 
 *     def __init__(self, arr, h5loc='/'):
 *         self._arr = arr             # <<<<<<<<<<<<<<
 *         self._index = 0
 *         self._hits = None
 */
  __Pyx_TraceLine(1379,0,__PYX_ERR(0, 1379, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_arr, __pyx_v_arr) < 0) __PYX_ERR(0, 1379, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1380
 *     def __init__(self, arr, h5loc='/'):
 *         self._arr = arr
 *         self._index = 0             # <<<<<<<<<<<<<<
 *         self._hits = None
 *         self.h5loc = h5loc
 */
  __Pyx_TraceLine(1380,0,__PYX_ERR(0, 1380, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_int_0) < 0) __PYX_ERR(0, 1380, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1381
 *         self._arr = arr
 *         self._index = 0
 *         self._hits = None             # <<<<<<<<<<<<<<
 *         self.h5loc = h5loc
 * 
 */
  __Pyx_TraceLine(1381,0,__PYX_ERR(0, 1381, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_hits, Py_None) < 0) __PYX_ERR(0, 1381, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1382
 *         self._index = 0
 *         self._hits = None
 *         self.h5loc = h5loc             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1382,0,__PYX_ERR(0, 1382, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 1382, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1378
 *     ])
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1385
 * 
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         try:
 *             return cls(np.array([(
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_3from_aanet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_2from_aanet[] = "HitSeries.from_aanet(cls, hits, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_3from_aanet = {"from_aanet", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_3from_aanet, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_2from_aanet};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_3from_aanet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_hits = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_aanet (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_hits_2,&__pyx_n_s_event_id,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hits_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, 1); __PYX_ERR(0, 1385, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, 2); __PYX_ERR(0, 1385, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_aanet") < 0)) __PYX_ERR(0, 1385, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_cls = values[0];
    __pyx_v_hits = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1385, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_aanet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_2from_aanet(__pyx_self, __pyx_v_cls, __pyx_v_hits, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_2from_aanet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_hits, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_h = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  int __pyx_t_24;
  long __pyx_t_25;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__140)
  __Pyx_RefNannySetupContext("from_aanet", 0);
  __Pyx_TraceCall("from_aanet", __pyx_f[0], 1385, 0, __PYX_ERR(0, 1385, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1386
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):
 *         try:             # <<<<<<<<<<<<<<
 *             return cls(np.array([(
 *                 h.channel_id,
 */
  __Pyx_TraceLine(1386,0,__PYX_ERR(0, 1386, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":1387
 *     def from_aanet(cls, hits, event_id):
 *         try:
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 h.channel_id,
 *                 np.nan,     # h.dir.x,
 */
      __Pyx_TraceLine(1387,0,__PYX_ERR(0, 1387, __pyx_L3_error))
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1387, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1387, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1387, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "km3pipe/dataclasses.pyx":1403
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             # Older aanet format.
 */
      __Pyx_TraceLine(1403,0,__PYX_ERR(0, 1403, __pyx_L3_error))
      if (likely(PyList_CheckExact(__pyx_v_hits)) || PyTuple_CheckExact(__pyx_v_hits)) {
        __pyx_t_7 = __pyx_v_hits; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_hits); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1403, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1403, __pyx_L3_error)
      }
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_7))) {
            if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_10 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1403, __pyx_L3_error)
            #else
            __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1403, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_10);
            #endif
          } else {
            if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1403, __pyx_L3_error)
            #else
            __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1403, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_10);
            #endif
          }
        } else {
          __pyx_t_10 = __pyx_t_9(__pyx_t_7);
          if (unlikely(!__pyx_t_10)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1403, __pyx_L3_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_10);
        }
        __Pyx_XDECREF_SET(__pyx_v_h, __pyx_t_10);
        __pyx_t_10 = 0;

        /* "km3pipe/dataclasses.pyx":1388
 *         try:
 *             return cls(np.array([(
 *                 h.channel_id,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.dir.x,
 *                 np.nan,     # h.dir.y,
 */
        __Pyx_TraceLine(1388,0,__PYX_ERR(0, 1388, __pyx_L3_error))
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_channel_id); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1388, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_10);

        /* "km3pipe/dataclasses.pyx":1389
 *             return cls(np.array([(
 *                 h.channel_id,
 *                 np.nan,     # h.dir.x,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.dir.y,
 *                 np.nan,     # h.dir.z,
 */
        __Pyx_TraceLine(1389,0,__PYX_ERR(0, 1389, __pyx_L3_error))
        __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1389, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_nan); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1389, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "km3pipe/dataclasses.pyx":1390
 *                 h.channel_id,
 *                 np.nan,     # h.dir.x,
 *                 np.nan,     # h.dir.y,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.dir.z,
 *                 h.dom_id,
 */
        __Pyx_TraceLine(1390,0,__PYX_ERR(0, 1390, __pyx_L3_error))
        __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1390, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_nan); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1390, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "km3pipe/dataclasses.pyx":1391
 *                 np.nan,     # h.dir.x,
 *                 np.nan,     # h.dir.y,
 *                 np.nan,     # h.dir.z,             # <<<<<<<<<<<<<<
 *                 h.dom_id,
 *                 h.id,
 */
        __Pyx_TraceLine(1391,0,__PYX_ERR(0, 1391, __pyx_L3_error))
        __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1391, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_nan); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1391, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "km3pipe/dataclasses.pyx":1392
 *                 np.nan,     # h.dir.y,
 *                 np.nan,     # h.dir.z,
 *                 h.dom_id,             # <<<<<<<<<<<<<<
 *                 h.id,
 *                 h.pmt_id,
 */
        __Pyx_TraceLine(1392,0,__PYX_ERR(0, 1392, __pyx_L3_error))
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1392, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_11);

        /* "km3pipe/dataclasses.pyx":1393
 *                 np.nan,     # h.dir.z,
 *                 h.dom_id,
 *                 h.id,             # <<<<<<<<<<<<<<
 *                 h.pmt_id,
 *                 np.nan,     # h.pos.x,
 */
        __Pyx_TraceLine(1393,0,__PYX_ERR(0, 1393, __pyx_L3_error))
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_id); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1393, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_15);

        /* "km3pipe/dataclasses.pyx":1394
 *                 h.dom_id,
 *                 h.id,
 *                 h.pmt_id,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.pos.x,
 *                 np.nan,     # h.pos.y,
 */
        __Pyx_TraceLine(1394,0,__PYX_ERR(0, 1394, __pyx_L3_error))
        __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_pmt_id); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1394, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_16);

        /* "km3pipe/dataclasses.pyx":1395
 *                 h.id,
 *                 h.pmt_id,
 *                 np.nan,     # h.pos.x,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.pos.y,
 *                 np.nan,     # h.pos.z,
 */
        __Pyx_TraceLine(1395,0,__PYX_ERR(0, 1395, __pyx_L3_error))
        __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1395, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_nan); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1395, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

        /* "km3pipe/dataclasses.pyx":1396
 *                 h.pmt_id,
 *                 np.nan,     # h.pos.x,
 *                 np.nan,     # h.pos.y,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.pos.z,
 *                 0,          # t0
 */
        __Pyx_TraceLine(1396,0,__PYX_ERR(0, 1396, __pyx_L3_error))
        __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1396, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_nan); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1396, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

        /* "km3pipe/dataclasses.pyx":1397
 *                 np.nan,     # h.pos.x,
 *                 np.nan,     # h.pos.y,
 *                 np.nan,     # h.pos.z,             # <<<<<<<<<<<<<<
 *                 0,          # t0
 *                 h.t,
 */
        __Pyx_TraceLine(1397,0,__PYX_ERR(0, 1397, __pyx_L3_error))
        __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1397, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_nan); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1397, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_20);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

        /* "km3pipe/dataclasses.pyx":1399
 *                 np.nan,     # h.pos.z,
 *                 0,          # t0
 *                 h.t,             # <<<<<<<<<<<<<<
 *                 h.tot,
 *                 h.trig,
 */
        __Pyx_TraceLine(1399,0,__PYX_ERR(0, 1399, __pyx_L3_error))
        __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_t); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1399, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_17);

        /* "km3pipe/dataclasses.pyx":1400
 *                 0,          # t0
 *                 h.t,
 *                 h.tot,             # <<<<<<<<<<<<<<
 *                 h.trig,
 *                 event_id,
 */
        __Pyx_TraceLine(1400,0,__PYX_ERR(0, 1400, __pyx_L3_error))
        __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_tot); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1400, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_21);

        /* "km3pipe/dataclasses.pyx":1401
 *                 h.t,
 *                 h.tot,
 *                 h.trig,             # <<<<<<<<<<<<<<
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))
 */
        __Pyx_TraceLine(1401,0,__PYX_ERR(0, 1401, __pyx_L3_error))
        __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_trig); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1401, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_22);

        /* "km3pipe/dataclasses.pyx":1388
 *         try:
 *             return cls(np.array([(
 *                 h.channel_id,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.dir.x,
 *                 np.nan,     # h.dir.y,
 */
        __Pyx_TraceLine(1388,0,__PYX_ERR(0, 1388, __pyx_L3_error))
        __pyx_t_23 = PyTuple_New(15); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1388, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_23);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_23, 2, __pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_23, 3, __pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_23, 4, __pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_23, 5, __pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_23, 6, __pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_23, 7, __pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_19);
        PyTuple_SET_ITEM(__pyx_t_23, 8, __pyx_t_19);
        __Pyx_GIVEREF(__pyx_t_20);
        PyTuple_SET_ITEM(__pyx_t_23, 9, __pyx_t_20);
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_GIVEREF(__pyx_int_0);
        PyTuple_SET_ITEM(__pyx_t_23, 10, __pyx_int_0);
        __Pyx_GIVEREF(__pyx_t_17);
        PyTuple_SET_ITEM(__pyx_t_23, 11, __pyx_t_17);
        __Pyx_GIVEREF(__pyx_t_21);
        PyTuple_SET_ITEM(__pyx_t_23, 12, __pyx_t_21);
        __Pyx_GIVEREF(__pyx_t_22);
        PyTuple_SET_ITEM(__pyx_t_23, 13, __pyx_t_22);
        __Pyx_INCREF(__pyx_v_event_id);
        __Pyx_GIVEREF(__pyx_v_event_id);
        PyTuple_SET_ITEM(__pyx_t_23, 14, __pyx_v_event_id);
        __pyx_t_10 = 0;
        __pyx_t_12 = 0;
        __pyx_t_13 = 0;
        __pyx_t_14 = 0;
        __pyx_t_11 = 0;
        __pyx_t_15 = 0;
        __pyx_t_16 = 0;
        __pyx_t_18 = 0;
        __pyx_t_19 = 0;
        __pyx_t_20 = 0;
        __pyx_t_17 = 0;
        __pyx_t_21 = 0;
        __pyx_t_22 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_23))) __PYX_ERR(0, 1387, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;

        /* "km3pipe/dataclasses.pyx":1403
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             # Older aanet format.
 */
        __Pyx_TraceLine(1403,0,__PYX_ERR(0, 1403, __pyx_L3_error))
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "km3pipe/dataclasses.pyx":1387
 *     def from_aanet(cls, hits, event_id):
 *         try:
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 h.channel_id,
 *                 np.nan,     # h.dir.x,
 */
      __Pyx_TraceLine(1387,0,__PYX_ERR(0, 1387, __pyx_L3_error))
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1387, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "km3pipe/dataclasses.pyx":1403
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             # Older aanet format.
 */
      __Pyx_TraceLine(1403,0,__PYX_ERR(0, 1403, __pyx_L3_error))
      __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1403, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1403, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_23);
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_23) < 0) __PYX_ERR(0, 1403, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;

      /* "km3pipe/dataclasses.pyx":1387
 *     def from_aanet(cls, hits, event_id):
 *         try:
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 h.channel_id,
 *                 np.nan,     # h.dir.x,
 */
      __Pyx_TraceLine(1387,0,__PYX_ERR(0, 1387, __pyx_L3_error))
      __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1387, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_23);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_v_cls);
      __pyx_t_5 = __pyx_v_cls; __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (!__pyx_t_7) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_23); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1387, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_23};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1387, __pyx_L3_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_23};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1387, __pyx_L3_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1387, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
          __Pyx_GIVEREF(__pyx_t_23);
          PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_23);
          __pyx_t_23 = 0;
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1387, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "km3pipe/dataclasses.pyx":1386
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):
 *         try:             # <<<<<<<<<<<<<<
 *             return cls(np.array([(
 *                 h.channel_id,
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
    __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":1404
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             # Older aanet format.
 *             return cls(np.array([(
 */
    __Pyx_TraceLine(1404,0,__PYX_ERR(0, 1404, __pyx_L5_except_error))
    __pyx_t_24 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_24) {
      __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_aanet", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1404, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);

      /* "km3pipe/dataclasses.pyx":1406
 *         except ValueError:
 *             # Older aanet format.
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 ord(h.channel_id),
 *                 np.nan,     # h.dir.x,
 */
      __Pyx_TraceLine(1406,0,__PYX_ERR(0, 1406, __pyx_L5_except_error))
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1406, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array_2); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1406, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_22);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1406, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);

      /* "km3pipe/dataclasses.pyx":1422
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
      __Pyx_TraceLine(1422,0,__PYX_ERR(0, 1422, __pyx_L5_except_error))
      if (likely(PyList_CheckExact(__pyx_v_hits)) || PyTuple_CheckExact(__pyx_v_hits)) {
        __pyx_t_21 = __pyx_v_hits; __Pyx_INCREF(__pyx_t_21); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_21 = PyObject_GetIter(__pyx_v_hits); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1422, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_21);
        __pyx_t_9 = Py_TYPE(__pyx_t_21)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1422, __pyx_L5_except_error)
      }
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_21))) {
            if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_21)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_17 = PyList_GET_ITEM(__pyx_t_21, __pyx_t_8); __Pyx_INCREF(__pyx_t_17); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1422, __pyx_L5_except_error)
            #else
            __pyx_t_17 = PySequence_ITEM(__pyx_t_21, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1422, __pyx_L5_except_error)
            __Pyx_GOTREF(__pyx_t_17);
            #endif
          } else {
            if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_21)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_17 = PyTuple_GET_ITEM(__pyx_t_21, __pyx_t_8); __Pyx_INCREF(__pyx_t_17); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1422, __pyx_L5_except_error)
            #else
            __pyx_t_17 = PySequence_ITEM(__pyx_t_21, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1422, __pyx_L5_except_error)
            __Pyx_GOTREF(__pyx_t_17);
            #endif
          }
        } else {
          __pyx_t_17 = __pyx_t_9(__pyx_t_21);
          if (unlikely(!__pyx_t_17)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1422, __pyx_L5_except_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_17);
        }
        __Pyx_XDECREF_SET(__pyx_v_h, __pyx_t_17);
        __pyx_t_17 = 0;

        /* "km3pipe/dataclasses.pyx":1407
 *             # Older aanet format.
 *             return cls(np.array([(
 *                 ord(h.channel_id),             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.dir.x,
 *                 np.nan,     # h.dir.y,
 */
        __Pyx_TraceLine(1407,0,__PYX_ERR(0, 1407, __pyx_L5_except_error))
        __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_channel_id); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1407, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_25 = __Pyx_PyObject_Ord(__pyx_t_17); if (unlikely(__pyx_t_25 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 1407, __pyx_L5_except_error)
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __pyx_t_17 = __Pyx_PyInt_From_long(__pyx_t_25); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1407, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_17);

        /* "km3pipe/dataclasses.pyx":1408
 *             return cls(np.array([(
 *                 ord(h.channel_id),
 *                 np.nan,     # h.dir.x,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.dir.y,
 *                 np.nan,     # h.dir.z,
 */
        __Pyx_TraceLine(1408,0,__PYX_ERR(0, 1408, __pyx_L5_except_error))
        __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1408, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_20);
        __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_nan); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1408, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

        /* "km3pipe/dataclasses.pyx":1409
 *                 ord(h.channel_id),
 *                 np.nan,     # h.dir.x,
 *                 np.nan,     # h.dir.y,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.dir.z,
 *                 h.dom_id,
 */
        __Pyx_TraceLine(1409,0,__PYX_ERR(0, 1409, __pyx_L5_except_error))
        __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1409, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_20);
        __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_nan); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1409, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

        /* "km3pipe/dataclasses.pyx":1410
 *                 np.nan,     # h.dir.x,
 *                 np.nan,     # h.dir.y,
 *                 np.nan,     # h.dir.z,             # <<<<<<<<<<<<<<
 *                 h.dom_id,
 *                 h.id,
 */
        __Pyx_TraceLine(1410,0,__PYX_ERR(0, 1410, __pyx_L5_except_error))
        __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1410, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_20);
        __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_nan); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1410, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

        /* "km3pipe/dataclasses.pyx":1411
 *                 np.nan,     # h.dir.y,
 *                 np.nan,     # h.dir.z,
 *                 h.dom_id,             # <<<<<<<<<<<<<<
 *                 h.id,
 *                 h.pmt_id,
 */
        __Pyx_TraceLine(1411,0,__PYX_ERR(0, 1411, __pyx_L5_except_error))
        __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1411, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_20);

        /* "km3pipe/dataclasses.pyx":1412
 *                 np.nan,     # h.dir.z,
 *                 h.dom_id,
 *                 h.id,             # <<<<<<<<<<<<<<
 *                 h.pmt_id,
 *                 np.nan,     # h.pos.x,
 */
        __Pyx_TraceLine(1412,0,__PYX_ERR(0, 1412, __pyx_L5_except_error))
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_id); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1412, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_15);

        /* "km3pipe/dataclasses.pyx":1413
 *                 h.dom_id,
 *                 h.id,
 *                 h.pmt_id,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.pos.x,
 *                 np.nan,     # h.pos.y,
 */
        __Pyx_TraceLine(1413,0,__PYX_ERR(0, 1413, __pyx_L5_except_error))
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_pmt_id); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1413, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);

        /* "km3pipe/dataclasses.pyx":1414
 *                 h.id,
 *                 h.pmt_id,
 *                 np.nan,     # h.pos.x,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.pos.y,
 *                 np.nan,     # h.pos.z,
 */
        __Pyx_TraceLine(1414,0,__PYX_ERR(0, 1414, __pyx_L5_except_error))
        __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1414, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_nan); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1414, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

        /* "km3pipe/dataclasses.pyx":1415
 *                 h.pmt_id,
 *                 np.nan,     # h.pos.x,
 *                 np.nan,     # h.pos.y,             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.pos.z,
 *                 0,          # t0
 */
        __Pyx_TraceLine(1415,0,__PYX_ERR(0, 1415, __pyx_L5_except_error))
        __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1415, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_nan); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1415, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

        /* "km3pipe/dataclasses.pyx":1416
 *                 np.nan,     # h.pos.x,
 *                 np.nan,     # h.pos.y,
 *                 np.nan,     # h.pos.z,             # <<<<<<<<<<<<<<
 *                 0,          # t0
 *                 h.t,
 */
        __Pyx_TraceLine(1416,0,__PYX_ERR(0, 1416, __pyx_L5_except_error))
        __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1416, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_nan); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1416, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

        /* "km3pipe/dataclasses.pyx":1418
 *                 np.nan,     # h.pos.z,
 *                 0,          # t0
 *                 h.t,             # <<<<<<<<<<<<<<
 *                 h.tot,
 *                 h.trig,
 */
        __Pyx_TraceLine(1418,0,__PYX_ERR(0, 1418, __pyx_L5_except_error))
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_t); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1418, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_14);

        /* "km3pipe/dataclasses.pyx":1419
 *                 0,          # t0
 *                 h.t,
 *                 h.tot,             # <<<<<<<<<<<<<<
 *                 h.trig,
 *                 event_id,
 */
        __Pyx_TraceLine(1419,0,__PYX_ERR(0, 1419, __pyx_L5_except_error))
        __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_tot); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1419, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_26);

        /* "km3pipe/dataclasses.pyx":1420
 *                 h.t,
 *                 h.tot,
 *                 h.trig,             # <<<<<<<<<<<<<<
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))
 */
        __Pyx_TraceLine(1420,0,__PYX_ERR(0, 1420, __pyx_L5_except_error))
        __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_trig); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1420, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_27);

        /* "km3pipe/dataclasses.pyx":1407
 *             # Older aanet format.
 *             return cls(np.array([(
 *                 ord(h.channel_id),             # <<<<<<<<<<<<<<
 *                 np.nan,     # h.dir.x,
 *                 np.nan,     # h.dir.y,
 */
        __Pyx_TraceLine(1407,0,__PYX_ERR(0, 1407, __pyx_L5_except_error))
        __pyx_t_28 = PyTuple_New(15); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1407, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_28);
        __Pyx_GIVEREF(__pyx_t_17);
        PyTuple_SET_ITEM(__pyx_t_28, 0, __pyx_t_17);
        __Pyx_GIVEREF(__pyx_t_19);
        PyTuple_SET_ITEM(__pyx_t_28, 1, __pyx_t_19);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_28, 2, __pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_28, 3, __pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_20);
        PyTuple_SET_ITEM(__pyx_t_28, 4, __pyx_t_20);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_28, 5, __pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_28, 6, __pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_28, 7, __pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_28, 8, __pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_28, 9, __pyx_t_10);
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_GIVEREF(__pyx_int_0);
        PyTuple_SET_ITEM(__pyx_t_28, 10, __pyx_int_0);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_28, 11, __pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_26);
        PyTuple_SET_ITEM(__pyx_t_28, 12, __pyx_t_26);
        __Pyx_GIVEREF(__pyx_t_27);
        PyTuple_SET_ITEM(__pyx_t_28, 13, __pyx_t_27);
        __Pyx_INCREF(__pyx_v_event_id);
        __Pyx_GIVEREF(__pyx_v_event_id);
        PyTuple_SET_ITEM(__pyx_t_28, 14, __pyx_v_event_id);
        __pyx_t_17 = 0;
        __pyx_t_19 = 0;
        __pyx_t_18 = 0;
        __pyx_t_16 = 0;
        __pyx_t_20 = 0;
        __pyx_t_15 = 0;
        __pyx_t_11 = 0;
        __pyx_t_13 = 0;
        __pyx_t_12 = 0;
        __pyx_t_10 = 0;
        __pyx_t_14 = 0;
        __pyx_t_26 = 0;
        __pyx_t_27 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_28))) __PYX_ERR(0, 1406, __pyx_L5_except_error)
        __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

        /* "km3pipe/dataclasses.pyx":1422
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
        __Pyx_TraceLine(1422,0,__PYX_ERR(0, 1422, __pyx_L5_except_error))
      }
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

      /* "km3pipe/dataclasses.pyx":1406
 *         except ValueError:
 *             # Older aanet format.
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 ord(h.channel_id),
 *                 np.nan,     # h.dir.x,
 */
      __Pyx_TraceLine(1406,0,__PYX_ERR(0, 1406, __pyx_L5_except_error))
      __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1406, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_21);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "km3pipe/dataclasses.pyx":1422
 *                 h.trig,
 *                 event_id,
 *             ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
      __Pyx_TraceLine(1422,0,__PYX_ERR(0, 1422, __pyx_L5_except_error))
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1422, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1422, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_28);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_28) < 0) __PYX_ERR(0, 1422, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;

      /* "km3pipe/dataclasses.pyx":1406
 *         except ValueError:
 *             # Older aanet format.
 *             return cls(np.array([(             # <<<<<<<<<<<<<<
 *                 ord(h.channel_id),
 *                 np.nan,     # h.dir.x,
 */
      __Pyx_TraceLine(1406,0,__PYX_ERR(0, 1406, __pyx_L5_except_error))
      __pyx_t_28 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_21, __pyx_t_7); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1406, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_28);
      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_INCREF(__pyx_v_cls);
      __pyx_t_7 = __pyx_v_cls; __pyx_t_21 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_21)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_21);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      if (!__pyx_t_21) {
        __pyx_t_23 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_28); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1406, __pyx_L5_except_error)
        __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
        __Pyx_GOTREF(__pyx_t_23);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_21, __pyx_t_28};
          __pyx_t_23 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1406, __pyx_L5_except_error)
          __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
          __Pyx_GOTREF(__pyx_t_23);
          __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_21, __pyx_t_28};
          __pyx_t_23 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1406, __pyx_L5_except_error)
          __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
          __Pyx_GOTREF(__pyx_t_23);
          __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
        } else
        #endif
        {
          __pyx_t_22 = PyTuple_New(1+1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1406, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_22);
          __Pyx_GIVEREF(__pyx_t_21); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_21); __pyx_t_21 = NULL;
          __Pyx_GIVEREF(__pyx_t_28);
          PyTuple_SET_ITEM(__pyx_t_22, 0+1, __pyx_t_28);
          __pyx_t_28 = 0;
          __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_22, NULL); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1406, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_23);
          __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_r = __pyx_t_23;
      __pyx_t_23 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "km3pipe/dataclasses.pyx":1386
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):
 *         try:             # <<<<<<<<<<<<<<
 *             return cls(np.array([(
 *                 h.channel_id,
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "km3pipe/dataclasses.pyx":1385
 * 
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         try:
 *             return cls(np.array([(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_XDECREF(__pyx_t_26);
  __Pyx_XDECREF(__pyx_t_27);
  __Pyx_XDECREF(__pyx_t_28);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_aanet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_h);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1425
 * 
 *     @classmethod
 *     def from_evt(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             0,     # channel_id
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_5from_evt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_4from_evt[] = "HitSeries.from_evt(cls, hits, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_5from_evt = {"from_evt", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_5from_evt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_4from_evt};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_5from_evt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_hits = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_evt (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_hits_2,&__pyx_n_s_event_id,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hits_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_evt", 1, 3, 3, 1); __PYX_ERR(0, 1425, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_evt", 1, 3, 3, 2); __PYX_ERR(0, 1425, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_evt") < 0)) __PYX_ERR(0, 1425, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_cls = values[0];
    __pyx_v_hits = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_evt", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1425, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_evt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_4from_evt(__pyx_self, __pyx_v_cls, __pyx_v_hits, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_4from_evt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_hits, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_h = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__141)
  __Pyx_RefNannySetupContext("from_evt", 0);
  __Pyx_TraceCall("from_evt", __pyx_f[0], 1425, 0, __PYX_ERR(0, 1425, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1426
 *     @classmethod
 *     def from_evt(cls, hits, event_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             0,     # channel_id
 *             np.nan,
 */
  __Pyx_TraceLine(1426,0,__PYX_ERR(0, 1426, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "km3pipe/dataclasses.pyx":1442
 *             0,     # triggered
 *             event_id,
 *         ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1442,0,__PYX_ERR(0, 1442, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_hits)) || PyTuple_CheckExact(__pyx_v_hits)) {
    __pyx_t_4 = __pyx_v_hits; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_hits); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1442, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1442, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1442, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1442, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1442, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1442, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_h, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":1428
 *         return cls(np.array([(
 *             0,     # channel_id
 *             np.nan,             # <<<<<<<<<<<<<<
 *             np.nan,
 *             np.nan,
 */
    __Pyx_TraceLine(1428,0,__PYX_ERR(0, 1428, __pyx_L1_error))
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nan); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":1429
 *             0,     # channel_id
 *             np.nan,
 *             np.nan,             # <<<<<<<<<<<<<<
 *             np.nan,
 *             0,     # dom_id
 */
    __Pyx_TraceLine(1429,0,__PYX_ERR(0, 1429, __pyx_L1_error))
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":1430
 *             np.nan,
 *             np.nan,
 *             np.nan,             # <<<<<<<<<<<<<<
 *             0,     # dom_id
 *             h.id,
 */
    __Pyx_TraceLine(1430,0,__PYX_ERR(0, 1430, __pyx_L1_error))
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nan); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":1432
 *             np.nan,
 *             0,     # dom_id
 *             h.id,             # <<<<<<<<<<<<<<
 *             h.pmt_id,
 *             np.nan,
 */
    __Pyx_TraceLine(1432,0,__PYX_ERR(0, 1432, __pyx_L1_error))
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "km3pipe/dataclasses.pyx":1433
 *             0,     # dom_id
 *             h.id,
 *             h.pmt_id,             # <<<<<<<<<<<<<<
 *             np.nan,
 *             np.nan,
 */
    __Pyx_TraceLine(1433,0,__PYX_ERR(0, 1433, __pyx_L1_error))
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_pmt_id); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);

    /* "km3pipe/dataclasses.pyx":1434
 *             h.id,
 *             h.pmt_id,
 *             np.nan,             # <<<<<<<<<<<<<<
 *             np.nan,
 *             np.nan,
 */
    __Pyx_TraceLine(1434,0,__PYX_ERR(0, 1434, __pyx_L1_error))
    __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_nan); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "km3pipe/dataclasses.pyx":1435
 *             h.pmt_id,
 *             np.nan,
 *             np.nan,             # <<<<<<<<<<<<<<
 *             np.nan,
 *             0,      # t0
 */
    __Pyx_TraceLine(1435,0,__PYX_ERR(0, 1435, __pyx_L1_error))
    __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_nan); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "km3pipe/dataclasses.pyx":1436
 *             np.nan,
 *             np.nan,
 *             np.nan,             # <<<<<<<<<<<<<<
 *             0,      # t0
 *             h.time,
 */
    __Pyx_TraceLine(1436,0,__PYX_ERR(0, 1436, __pyx_L1_error))
    __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_nan); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "km3pipe/dataclasses.pyx":1438
 *             np.nan,
 *             0,      # t0
 *             h.time,             # <<<<<<<<<<<<<<
 *             h.tot,
 *             0,     # triggered
 */
    __Pyx_TraceLine(1438,0,__PYX_ERR(0, 1438, __pyx_L1_error))
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_time); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);

    /* "km3pipe/dataclasses.pyx":1439
 *             0,      # t0
 *             h.time,
 *             h.tot,             # <<<<<<<<<<<<<<
 *             0,     # triggered
 *             event_id,
 */
    __Pyx_TraceLine(1439,0,__PYX_ERR(0, 1439, __pyx_L1_error))
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_tot); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);

    /* "km3pipe/dataclasses.pyx":1427
 *     def from_evt(cls, hits, event_id):
 *         return cls(np.array([(
 *             0,     # channel_id             # <<<<<<<<<<<<<<
 *             np.nan,
 *             np.nan,
 */
    __Pyx_TraceLine(1427,0,__PYX_ERR(0, 1427, __pyx_L1_error))
    __pyx_t_17 = PyTuple_New(15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_17, 3, __pyx_t_10);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_17, 4, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_17, 5, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_17, 6, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_17, 7, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_17, 8, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_17, 9, __pyx_t_15);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_17, 10, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_17, 11, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_17, 12, __pyx_t_16);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_17, 13, __pyx_int_0);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_17, 14, __pyx_v_event_id);
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_7 = 0;
    __pyx_t_11 = 0;
    __pyx_t_13 = 0;
    __pyx_t_14 = 0;
    __pyx_t_15 = 0;
    __pyx_t_12 = 0;
    __pyx_t_16 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_17))) __PYX_ERR(0, 1426, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

    /* "km3pipe/dataclasses.pyx":1442
 *             0,     # triggered
 *             event_id,
 *         ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(1442,0,__PYX_ERR(0, 1442, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1426
 *     @classmethod
 *     def from_evt(cls, hits, event_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             0,     # channel_id
 *             np.nan,
 */
  __Pyx_TraceLine(1426,0,__PYX_ERR(0, 1426, __pyx_L1_error))
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1442
 *             0,     # triggered
 *             event_id,
 *         ) for h in hits], dtype=cls.dtype))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1442,0,__PYX_ERR(0, 1442, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_17) < 0) __PYX_ERR(0, 1442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

  /* "km3pipe/dataclasses.pyx":1426
 *     @classmethod
 *     def from_evt(cls, hits, event_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             0,     # channel_id
 *             np.nan,
 */
  __Pyx_TraceLine(1426,0,__PYX_ERR(0, 1426, __pyx_L1_error))
  __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_2 = __pyx_v_cls; __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_17};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_17};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1426, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_17);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_17);
      __pyx_t_17 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1425
 * 
 *     @classmethod
 *     def from_evt(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             0,     # channel_id
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_evt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_h);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1445
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, ids,             # <<<<<<<<<<<<<<
 *                     pmt_ids, pos_xs, pos_ys, pos_zs, t0s, times, tots,
 *                     triggereds, event_id):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_7from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_6from_arrays[] = "HitSeries.from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, ids, pmt_ids, pos_xs, pos_ys, pos_zs, t0s, times, tots, triggereds, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_7from_arrays = {"from_arrays", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_7from_arrays, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_6from_arrays};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_7from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_channel_ids = 0;
  PyObject *__pyx_v_dir_xs = 0;
  PyObject *__pyx_v_dir_ys = 0;
  PyObject *__pyx_v_dir_zs = 0;
  PyObject *__pyx_v_dom_ids = 0;
  PyObject *__pyx_v_ids = 0;
  PyObject *__pyx_v_pmt_ids = 0;
  PyObject *__pyx_v_pos_xs = 0;
  PyObject *__pyx_v_pos_ys = 0;
  PyObject *__pyx_v_pos_zs = 0;
  PyObject *__pyx_v_t0s = 0;
  PyObject *__pyx_v_times = 0;
  PyObject *__pyx_v_tots = 0;
  PyObject *__pyx_v_triggereds = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_channel_ids,&__pyx_n_s_dir_xs,&__pyx_n_s_dir_ys,&__pyx_n_s_dir_zs,&__pyx_n_s_dom_ids,&__pyx_n_s_ids,&__pyx_n_s_pmt_ids,&__pyx_n_s_pos_xs,&__pyx_n_s_pos_ys,&__pyx_n_s_pos_zs,&__pyx_n_s_t0s,&__pyx_n_s_times,&__pyx_n_s_tots,&__pyx_n_s_triggereds,&__pyx_n_s_event_id,0};
    PyObject* values[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        CYTHON_FALLTHROUGH;
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_channel_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 1); __PYX_ERR(0, 1445, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_xs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 2); __PYX_ERR(0, 1445, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_ys)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 3); __PYX_ERR(0, 1445, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dir_zs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 4); __PYX_ERR(0, 1445, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dom_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 5); __PYX_ERR(0, 1445, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 6); __PYX_ERR(0, 1445, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pmt_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 7); __PYX_ERR(0, 1445, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_xs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 8); __PYX_ERR(0, 1445, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_ys)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 9); __PYX_ERR(0, 1445, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (likely((values[10] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos_zs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 10); __PYX_ERR(0, 1445, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 11:
        if (likely((values[11] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t0s)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 11); __PYX_ERR(0, 1445, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 12:
        if (likely((values[12] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_times)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 12); __PYX_ERR(0, 1445, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 13:
        if (likely((values[13] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tots)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 13); __PYX_ERR(0, 1445, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 14:
        if (likely((values[14] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_triggereds)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 14); __PYX_ERR(0, 1445, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 15:
        if (likely((values[15] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 15); __PYX_ERR(0, 1445, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_arrays") < 0)) __PYX_ERR(0, 1445, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 16) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
      values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
      values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
      values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
      values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
      values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
      values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
      values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
    }
    __pyx_v_cls = values[0];
    __pyx_v_channel_ids = values[1];
    __pyx_v_dir_xs = values[2];
    __pyx_v_dir_ys = values[3];
    __pyx_v_dir_zs = values[4];
    __pyx_v_dom_ids = values[5];
    __pyx_v_ids = values[6];
    __pyx_v_pmt_ids = values[7];
    __pyx_v_pos_xs = values[8];
    __pyx_v_pos_ys = values[9];
    __pyx_v_pos_zs = values[10];
    __pyx_v_t0s = values[11];
    __pyx_v_times = values[12];
    __pyx_v_tots = values[13];
    __pyx_v_triggereds = values[14];
    __pyx_v_event_id = values[15];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1445, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_6from_arrays(__pyx_self, __pyx_v_cls, __pyx_v_channel_ids, __pyx_v_dir_xs, __pyx_v_dir_ys, __pyx_v_dir_zs, __pyx_v_dom_ids, __pyx_v_ids, __pyx_v_pmt_ids, __pyx_v_pos_xs, __pyx_v_pos_ys, __pyx_v_pos_zs, __pyx_v_t0s, __pyx_v_times, __pyx_v_tots, __pyx_v_triggereds, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_6from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_channel_ids, PyObject *__pyx_v_dir_xs, PyObject *__pyx_v_dir_ys, PyObject *__pyx_v_dir_zs, PyObject *__pyx_v_dom_ids, PyObject *__pyx_v_ids, PyObject *__pyx_v_pmt_ids, PyObject *__pyx_v_pos_xs, PyObject *__pyx_v_pos_ys, PyObject *__pyx_v_pos_zs, PyObject *__pyx_v_t0s, PyObject *__pyx_v_times, PyObject *__pyx_v_tots, PyObject *__pyx_v_triggereds, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_v_hits = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__142)
  __Pyx_RefNannySetupContext("from_arrays", 0);
  __Pyx_TraceCall("from_arrays", __pyx_f[0], 1445, 0, __PYX_ERR(0, 1445, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1449
 *                     triggereds, event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = channel_ids.shape[0]
 *         except AttributeError:
 */
  __Pyx_TraceLine(1449,0,__PYX_ERR(0, 1449, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":1450
 *         # do we need shape[0] or does len() work too?
 *         try:
 *             length = channel_ids.shape[0]             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             length = len(channel_ids)
 */
      __Pyx_TraceLine(1450,0,__PYX_ERR(0, 1450, __pyx_L3_error))
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_channel_ids, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1450, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1450, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_length = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "km3pipe/dataclasses.pyx":1449
 *                     triggereds, event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = channel_ids.shape[0]
 *         except AttributeError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":1451
 *         try:
 *             length = channel_ids.shape[0]
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             length = len(channel_ids)
 *         hits = np.empty(length, cls.dtype)
 */
    __Pyx_TraceLine(1451,0,__PYX_ERR(0, 1451, __pyx_L5_except_error))
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 1451, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);

      /* "km3pipe/dataclasses.pyx":1452
 *             length = channel_ids.shape[0]
 *         except AttributeError:
 *             length = len(channel_ids)             # <<<<<<<<<<<<<<
 *         hits = np.empty(length, cls.dtype)
 *         hits['channel_id'] = channel_ids
 */
      __Pyx_TraceLine(1452,0,__PYX_ERR(0, 1452, __pyx_L5_except_error))
      __pyx_t_8 = PyObject_Length(__pyx_v_channel_ids); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1452, __pyx_L5_except_error)
      __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1452, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "km3pipe/dataclasses.pyx":1449
 *                     triggereds, event_id):
 *         # do we need shape[0] or does len() work too?
 *         try:             # <<<<<<<<<<<<<<
 *             length = channel_ids.shape[0]
 *         except AttributeError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "km3pipe/dataclasses.pyx":1453
 *         except AttributeError:
 *             length = len(channel_ids)
 *         hits = np.empty(length, cls.dtype)             # <<<<<<<<<<<<<<
 *         hits['channel_id'] = channel_ids
 *         hits['dir_x'] = dir_xs
 */
  __Pyx_TraceLine(1453,0,__PYX_ERR(0, 1453, __pyx_L1_error))
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_length, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1453, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_length, __pyx_t_4};
    __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1453, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_INCREF(__pyx_v_length);
    __Pyx_GIVEREF(__pyx_v_length);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_v_length);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_hits = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":1454
 *             length = len(channel_ids)
 *         hits = np.empty(length, cls.dtype)
 *         hits['channel_id'] = channel_ids             # <<<<<<<<<<<<<<
 *         hits['dir_x'] = dir_xs
 *         hits['dir_y'] = dir_ys
 */
  __Pyx_TraceLine(1454,0,__PYX_ERR(0, 1454, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_channel_id, __pyx_v_channel_ids) < 0)) __PYX_ERR(0, 1454, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1455
 *         hits = np.empty(length, cls.dtype)
 *         hits['channel_id'] = channel_ids
 *         hits['dir_x'] = dir_xs             # <<<<<<<<<<<<<<
 *         hits['dir_y'] = dir_ys
 *         hits['dir_z'] = dir_zs
 */
  __Pyx_TraceLine(1455,0,__PYX_ERR(0, 1455, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dir_x, __pyx_v_dir_xs) < 0)) __PYX_ERR(0, 1455, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1456
 *         hits['channel_id'] = channel_ids
 *         hits['dir_x'] = dir_xs
 *         hits['dir_y'] = dir_ys             # <<<<<<<<<<<<<<
 *         hits['dir_z'] = dir_zs
 *         hits['dom_id'] = dom_ids
 */
  __Pyx_TraceLine(1456,0,__PYX_ERR(0, 1456, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dir_y, __pyx_v_dir_ys) < 0)) __PYX_ERR(0, 1456, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1457
 *         hits['dir_x'] = dir_xs
 *         hits['dir_y'] = dir_ys
 *         hits['dir_z'] = dir_zs             # <<<<<<<<<<<<<<
 *         hits['dom_id'] = dom_ids
 *         hits['id'] = ids
 */
  __Pyx_TraceLine(1457,0,__PYX_ERR(0, 1457, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dir_z, __pyx_v_dir_zs) < 0)) __PYX_ERR(0, 1457, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1458
 *         hits['dir_y'] = dir_ys
 *         hits['dir_z'] = dir_zs
 *         hits['dom_id'] = dom_ids             # <<<<<<<<<<<<<<
 *         hits['id'] = ids
 *         hits['pmt_id'] = pmt_ids
 */
  __Pyx_TraceLine(1458,0,__PYX_ERR(0, 1458, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dom_id, __pyx_v_dom_ids) < 0)) __PYX_ERR(0, 1458, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1459
 *         hits['dir_z'] = dir_zs
 *         hits['dom_id'] = dom_ids
 *         hits['id'] = ids             # <<<<<<<<<<<<<<
 *         hits['pmt_id'] = pmt_ids
 *         hits['pos_x'] = pos_xs
 */
  __Pyx_TraceLine(1459,0,__PYX_ERR(0, 1459, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_id, __pyx_v_ids) < 0)) __PYX_ERR(0, 1459, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1460
 *         hits['dom_id'] = dom_ids
 *         hits['id'] = ids
 *         hits['pmt_id'] = pmt_ids             # <<<<<<<<<<<<<<
 *         hits['pos_x'] = pos_xs
 *         hits['pos_y'] = pos_ys
 */
  __Pyx_TraceLine(1460,0,__PYX_ERR(0, 1460, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_pmt_id, __pyx_v_pmt_ids) < 0)) __PYX_ERR(0, 1460, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1461
 *         hits['id'] = ids
 *         hits['pmt_id'] = pmt_ids
 *         hits['pos_x'] = pos_xs             # <<<<<<<<<<<<<<
 *         hits['pos_y'] = pos_ys
 *         hits['pos_z'] = pos_zs
 */
  __Pyx_TraceLine(1461,0,__PYX_ERR(0, 1461, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_pos_x, __pyx_v_pos_xs) < 0)) __PYX_ERR(0, 1461, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1462
 *         hits['pmt_id'] = pmt_ids
 *         hits['pos_x'] = pos_xs
 *         hits['pos_y'] = pos_ys             # <<<<<<<<<<<<<<
 *         hits['pos_z'] = pos_zs
 *         hits['t0'] = t0s
 */
  __Pyx_TraceLine(1462,0,__PYX_ERR(0, 1462, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_pos_y, __pyx_v_pos_ys) < 0)) __PYX_ERR(0, 1462, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1463
 *         hits['pos_x'] = pos_xs
 *         hits['pos_y'] = pos_ys
 *         hits['pos_z'] = pos_zs             # <<<<<<<<<<<<<<
 *         hits['t0'] = t0s
 *         hits['time'] = times
 */
  __Pyx_TraceLine(1463,0,__PYX_ERR(0, 1463, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_pos_z, __pyx_v_pos_zs) < 0)) __PYX_ERR(0, 1463, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1464
 *         hits['pos_y'] = pos_ys
 *         hits['pos_z'] = pos_zs
 *         hits['t0'] = t0s             # <<<<<<<<<<<<<<
 *         hits['time'] = times
 *         hits['tot'] = tots
 */
  __Pyx_TraceLine(1464,0,__PYX_ERR(0, 1464, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_t0, __pyx_v_t0s) < 0)) __PYX_ERR(0, 1464, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1465
 *         hits['pos_z'] = pos_zs
 *         hits['t0'] = t0s
 *         hits['time'] = times             # <<<<<<<<<<<<<<
 *         hits['tot'] = tots
 *         hits['triggered'] = triggereds
 */
  __Pyx_TraceLine(1465,0,__PYX_ERR(0, 1465, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_time, __pyx_v_times) < 0)) __PYX_ERR(0, 1465, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1466
 *         hits['t0'] = t0s
 *         hits['time'] = times
 *         hits['tot'] = tots             # <<<<<<<<<<<<<<
 *         hits['triggered'] = triggereds
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 */
  __Pyx_TraceLine(1466,0,__PYX_ERR(0, 1466, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_tot, __pyx_v_tots) < 0)) __PYX_ERR(0, 1466, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1467
 *         hits['time'] = times
 *         hits['tot'] = tots
 *         hits['triggered'] = triggereds             # <<<<<<<<<<<<<<
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 *         return cls(hits)
 */
  __Pyx_TraceLine(1467,0,__PYX_ERR(0, 1467, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_triggered, __pyx_v_triggereds) < 0)) __PYX_ERR(0, 1467, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1468
 *         hits['tot'] = tots
 *         hits['triggered'] = triggereds
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')             # <<<<<<<<<<<<<<
 *         return cls(hits)
 * 
 */
  __Pyx_TraceLine(1468,0,__PYX_ERR(0, 1468, __pyx_L1_error))
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_full); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_length);
  __Pyx_GIVEREF(__pyx_v_length);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_length);
  __Pyx_INCREF(__pyx_v_event_id);
  __Pyx_GIVEREF(__pyx_v_event_id);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_event_id);
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_kp_s_u4) < 0) __PYX_ERR(0, 1468, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_event_id, __pyx_t_4) < 0)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1469
 *         hits['triggered'] = triggereds
 *         hits['event_id'] = np.full(length, event_id, dtype='<u4')
 *         return cls(hits)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1469,0,__PYX_ERR(0, 1469, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_10 = __pyx_v_cls; __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_hits); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_10)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_hits};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1469, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_hits};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1469, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_INCREF(__pyx_v_hits);
      __Pyx_GIVEREF(__pyx_v_hits);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_hits);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1445
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, ids,             # <<<<<<<<<<<<<<
 *                     pmt_ids, pos_xs, pos_ys, pos_zs, t0s, times, tots,
 *                     triggereds, event_id):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XDECREF(__pyx_v_hits);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1472
 * 
 *     @classmethod
 *     def from_dict(cls, map, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = map['event_id']
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_9from_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_8from_dict[] = "HitSeries.from_dict(cls, map, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_9from_dict = {"from_dict", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_9from_dict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_8from_dict};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_9from_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_map = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_dict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_map,&__pyx_n_s_event_id,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_map)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_dict", 1, 3, 3, 1); __PYX_ERR(0, 1472, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_dict", 1, 3, 3, 2); __PYX_ERR(0, 1472, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_dict") < 0)) __PYX_ERR(0, 1472, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_cls = values[0];
    __pyx_v_map = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_dict", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1472, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_8from_dict(__pyx_self, __pyx_v_cls, __pyx_v_map, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_8from_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_map, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__143)
  __Pyx_RefNannySetupContext("from_dict", 0);
  __Pyx_TraceCall("from_dict", __pyx_f[0], 1472, 0, __PYX_ERR(0, 1472, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_event_id);

  /* "km3pipe/dataclasses.pyx":1473
 *     @classmethod
 *     def from_dict(cls, map, event_id):
 *         if event_id is None:             # <<<<<<<<<<<<<<
 *             event_id = map['event_id']
 *         return cls.from_arrays(
 */
  __Pyx_TraceLine(1473,0,__PYX_ERR(0, 1473, __pyx_L1_error))
  __pyx_t_1 = (__pyx_v_event_id == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":1474
 *     def from_dict(cls, map, event_id):
 *         if event_id is None:
 *             event_id = map['event_id']             # <<<<<<<<<<<<<<
 *         return cls.from_arrays(
 *             map['channel_id'],
 */
    __Pyx_TraceLine(1474,0,__PYX_ERR(0, 1474, __pyx_L1_error))
    __pyx_t_3 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_event_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_event_id, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "km3pipe/dataclasses.pyx":1473
 *     @classmethod
 *     def from_dict(cls, map, event_id):
 *         if event_id is None:             # <<<<<<<<<<<<<<
 *             event_id = map['event_id']
 *         return cls.from_arrays(
 */
  }

  /* "km3pipe/dataclasses.pyx":1475
 *         if event_id is None:
 *             event_id = map['event_id']
 *         return cls.from_arrays(             # <<<<<<<<<<<<<<
 *             map['channel_id'],
 *             map['dir_x'],
 */
  __Pyx_TraceLine(1475,0,__PYX_ERR(0, 1475, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_arrays); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":1476
 *             event_id = map['event_id']
 *         return cls.from_arrays(
 *             map['channel_id'],             # <<<<<<<<<<<<<<
 *             map['dir_x'],
 *             map['dir_y'],
 */
  __Pyx_TraceLine(1476,0,__PYX_ERR(0, 1476, __pyx_L1_error))
  __pyx_t_5 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_channel_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":1477
 *         return cls.from_arrays(
 *             map['channel_id'],
 *             map['dir_x'],             # <<<<<<<<<<<<<<
 *             map['dir_y'],
 *             map['dir_z'],
 */
  __Pyx_TraceLine(1477,0,__PYX_ERR(0, 1477, __pyx_L1_error))
  __pyx_t_6 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_dir_x); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1478
 *             map['channel_id'],
 *             map['dir_x'],
 *             map['dir_y'],             # <<<<<<<<<<<<<<
 *             map['dir_z'],
 *             map['dom_id'],
 */
  __Pyx_TraceLine(1478,0,__PYX_ERR(0, 1478, __pyx_L1_error))
  __pyx_t_7 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_dir_y); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "km3pipe/dataclasses.pyx":1479
 *             map['dir_x'],
 *             map['dir_y'],
 *             map['dir_z'],             # <<<<<<<<<<<<<<
 *             map['dom_id'],
 *             map['id'],
 */
  __Pyx_TraceLine(1479,0,__PYX_ERR(0, 1479, __pyx_L1_error))
  __pyx_t_8 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_dir_z); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "km3pipe/dataclasses.pyx":1480
 *             map['dir_y'],
 *             map['dir_z'],
 *             map['dom_id'],             # <<<<<<<<<<<<<<
 *             map['id'],
 *             map['pmt_id'],
 */
  __Pyx_TraceLine(1480,0,__PYX_ERR(0, 1480, __pyx_L1_error))
  __pyx_t_9 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "km3pipe/dataclasses.pyx":1481
 *             map['dir_z'],
 *             map['dom_id'],
 *             map['id'],             # <<<<<<<<<<<<<<
 *             map['pmt_id'],
 *             map['pos_x'],
 */
  __Pyx_TraceLine(1481,0,__PYX_ERR(0, 1481, __pyx_L1_error))
  __pyx_t_10 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_id); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "km3pipe/dataclasses.pyx":1482
 *             map['dom_id'],
 *             map['id'],
 *             map['pmt_id'],             # <<<<<<<<<<<<<<
 *             map['pos_x'],
 *             map['pos_y'],
 */
  __Pyx_TraceLine(1482,0,__PYX_ERR(0, 1482, __pyx_L1_error))
  __pyx_t_11 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_pmt_id); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);

  /* "km3pipe/dataclasses.pyx":1483
 *             map['id'],
 *             map['pmt_id'],
 *             map['pos_x'],             # <<<<<<<<<<<<<<
 *             map['pos_y'],
 *             map['pos_z'],
 */
  __Pyx_TraceLine(1483,0,__PYX_ERR(0, 1483, __pyx_L1_error))
  __pyx_t_12 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_pos_x); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "km3pipe/dataclasses.pyx":1484
 *             map['pmt_id'],
 *             map['pos_x'],
 *             map['pos_y'],             # <<<<<<<<<<<<<<
 *             map['pos_z'],
 *             map['t0'],
 */
  __Pyx_TraceLine(1484,0,__PYX_ERR(0, 1484, __pyx_L1_error))
  __pyx_t_13 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_pos_y); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);

  /* "km3pipe/dataclasses.pyx":1485
 *             map['pos_x'],
 *             map['pos_y'],
 *             map['pos_z'],             # <<<<<<<<<<<<<<
 *             map['t0'],
 *             map['time'],
 */
  __Pyx_TraceLine(1485,0,__PYX_ERR(0, 1485, __pyx_L1_error))
  __pyx_t_14 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_pos_z); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);

  /* "km3pipe/dataclasses.pyx":1486
 *             map['pos_y'],
 *             map['pos_z'],
 *             map['t0'],             # <<<<<<<<<<<<<<
 *             map['time'],
 *             map['tot'],
 */
  __Pyx_TraceLine(1486,0,__PYX_ERR(0, 1486, __pyx_L1_error))
  __pyx_t_15 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_t0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);

  /* "km3pipe/dataclasses.pyx":1487
 *             map['pos_z'],
 *             map['t0'],
 *             map['time'],             # <<<<<<<<<<<<<<
 *             map['tot'],
 *             map['triggered'],
 */
  __Pyx_TraceLine(1487,0,__PYX_ERR(0, 1487, __pyx_L1_error))
  __pyx_t_16 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_time); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);

  /* "km3pipe/dataclasses.pyx":1488
 *             map['t0'],
 *             map['time'],
 *             map['tot'],             # <<<<<<<<<<<<<<
 *             map['triggered'],
 *             event_id,
 */
  __Pyx_TraceLine(1488,0,__PYX_ERR(0, 1488, __pyx_L1_error))
  __pyx_t_17 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_tot); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);

  /* "km3pipe/dataclasses.pyx":1489
 *             map['time'],
 *             map['tot'],
 *             map['triggered'],             # <<<<<<<<<<<<<<
 *             event_id,
 *         )
 */
  __Pyx_TraceLine(1489,0,__PYX_ERR(0, 1489, __pyx_L1_error))
  __pyx_t_18 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_triggered); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);

  /* "km3pipe/dataclasses.pyx":1490
 *             map['tot'],
 *             map['triggered'],
 *             event_id,             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __Pyx_TraceLine(1490,0,__PYX_ERR(0, 1490, __pyx_L1_error))
  __pyx_t_19 = NULL;
  __pyx_t_20 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_19)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_19);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_20 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[16] = {__pyx_t_19, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_v_event_id};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_20, 15+__pyx_t_20); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1475, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[16] = {__pyx_t_19, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_v_event_id};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_20, 15+__pyx_t_20); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1475, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  } else
  #endif
  {
    __pyx_t_21 = PyTuple_New(15+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    if (__pyx_t_19) {
      __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_19); __pyx_t_19 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_21, 0+__pyx_t_20, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_20, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_21, 2+__pyx_t_20, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_21, 3+__pyx_t_20, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_21, 4+__pyx_t_20, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_21, 5+__pyx_t_20, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_21, 6+__pyx_t_20, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_21, 7+__pyx_t_20, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_21, 8+__pyx_t_20, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_21, 9+__pyx_t_20, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_21, 10+__pyx_t_20, __pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_21, 11+__pyx_t_20, __pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_21, 12+__pyx_t_20, __pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_21, 13+__pyx_t_20, __pyx_t_18);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_21, 14+__pyx_t_20, __pyx_v_event_id);
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    __pyx_t_12 = 0;
    __pyx_t_13 = 0;
    __pyx_t_14 = 0;
    __pyx_t_15 = 0;
    __pyx_t_16 = 0;
    __pyx_t_17 = 0;
    __pyx_t_18 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1472
 * 
 *     @classmethod
 *     def from_dict(cls, map, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = map['event_id']
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_event_id);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1494
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_11from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_10from_table[] = "HitSeries.from_table(cls, table, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_11from_table = {"from_table", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_11from_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_10from_table};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_11from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_table = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_table,&__pyx_n_s_event_id,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_table)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, 1); __PYX_ERR(0, 1494, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, 2); __PYX_ERR(0, 1494, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_table") < 0)) __PYX_ERR(0, 1494, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_cls = values[0];
    __pyx_v_table = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1494, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_10from_table(__pyx_self, __pyx_v_cls, __pyx_v_table, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_10from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  int __pyx_t_24;
  __Pyx_TraceFrameInit(__pyx_codeobj__144)
  __Pyx_RefNannySetupContext("from_table", 0);
  __Pyx_TraceCall("from_table", __pyx_f[0], 1494, 0, __PYX_ERR(0, 1494, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_event_id);

  /* "km3pipe/dataclasses.pyx":1495
 *     @classmethod
 *     def from_table(cls, table, event_id):
 *         if event_id is None:             # <<<<<<<<<<<<<<
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(
 */
  __Pyx_TraceLine(1495,0,__PYX_ERR(0, 1495, __pyx_L1_error))
  __pyx_t_1 = (__pyx_v_event_id == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":1496
 *     def from_table(cls, table, event_id):
 *         if event_id is None:
 *             event_id = table[0]['event_id']             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             row['channel_id'],
 */
    __Pyx_TraceLine(1496,0,__PYX_ERR(0, 1496, __pyx_L1_error))
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_table, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_event_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_event_id, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":1495
 *     @classmethod
 *     def from_table(cls, table, event_id):
 *         if event_id is None:             # <<<<<<<<<<<<<<
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(
 */
  }

  /* "km3pipe/dataclasses.pyx":1497
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['channel_id'],
 *             row['dir_x'],
 */
  __Pyx_TraceLine(1497,0,__PYX_ERR(0, 1497, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "km3pipe/dataclasses.pyx":1512
 *             row['tot'],
 *             row['triggered'],
 *         ) for row in table], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1512,0,__PYX_ERR(0, 1512, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_table)) || PyTuple_CheckExact(__pyx_v_table)) {
    __pyx_t_6 = __pyx_v_table; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1512, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_6))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1512, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1512, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1512, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1512, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_8(__pyx_t_6);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1512, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "km3pipe/dataclasses.pyx":1498
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(
 *             row['channel_id'],             # <<<<<<<<<<<<<<
 *             row['dir_x'],
 *             row['dir_y'],
 */
    __Pyx_TraceLine(1498,0,__PYX_ERR(0, 1498, __pyx_L1_error))
    __pyx_t_9 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_channel_id); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "km3pipe/dataclasses.pyx":1499
 *         return cls(np.array([(
 *             row['channel_id'],
 *             row['dir_x'],             # <<<<<<<<<<<<<<
 *             row['dir_y'],
 *             row['dir_z'],
 */
    __Pyx_TraceLine(1499,0,__PYX_ERR(0, 1499, __pyx_L1_error))
    __pyx_t_10 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dir_x); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "km3pipe/dataclasses.pyx":1500
 *             row['channel_id'],
 *             row['dir_x'],
 *             row['dir_y'],             # <<<<<<<<<<<<<<
 *             row['dir_z'],
 *             row['dom_id'],
 */
    __Pyx_TraceLine(1500,0,__PYX_ERR(0, 1500, __pyx_L1_error))
    __pyx_t_11 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dir_y); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);

    /* "km3pipe/dataclasses.pyx":1501
 *             row['dir_x'],
 *             row['dir_y'],
 *             row['dir_z'],             # <<<<<<<<<<<<<<
 *             row['dom_id'],
 *             row['id'],
 */
    __Pyx_TraceLine(1501,0,__PYX_ERR(0, 1501, __pyx_L1_error))
    __pyx_t_12 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dir_z); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);

    /* "km3pipe/dataclasses.pyx":1502
 *             row['dir_y'],
 *             row['dir_z'],
 *             row['dom_id'],             # <<<<<<<<<<<<<<
 *             row['id'],
 *             row['pmt_id'],
 */
    __Pyx_TraceLine(1502,0,__PYX_ERR(0, 1502, __pyx_L1_error))
    __pyx_t_13 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);

    /* "km3pipe/dataclasses.pyx":1503
 *             row['dir_z'],
 *             row['dom_id'],
 *             row['id'],             # <<<<<<<<<<<<<<
 *             row['pmt_id'],
 *             row['pos_x'],
 */
    __Pyx_TraceLine(1503,0,__PYX_ERR(0, 1503, __pyx_L1_error))
    __pyx_t_14 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_id); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);

    /* "km3pipe/dataclasses.pyx":1504
 *             row['dom_id'],
 *             row['id'],
 *             row['pmt_id'],             # <<<<<<<<<<<<<<
 *             row['pos_x'],
 *             row['pos_y'],
 */
    __Pyx_TraceLine(1504,0,__PYX_ERR(0, 1504, __pyx_L1_error))
    __pyx_t_15 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pmt_id); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);

    /* "km3pipe/dataclasses.pyx":1505
 *             row['id'],
 *             row['pmt_id'],
 *             row['pos_x'],             # <<<<<<<<<<<<<<
 *             row['pos_y'],
 *             row['pos_z'],
 */
    __Pyx_TraceLine(1505,0,__PYX_ERR(0, 1505, __pyx_L1_error))
    __pyx_t_16 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pos_x); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);

    /* "km3pipe/dataclasses.pyx":1506
 *             row['pmt_id'],
 *             row['pos_x'],
 *             row['pos_y'],             # <<<<<<<<<<<<<<
 *             row['pos_z'],
 *             row['t0'],
 */
    __Pyx_TraceLine(1506,0,__PYX_ERR(0, 1506, __pyx_L1_error))
    __pyx_t_17 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pos_y); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);

    /* "km3pipe/dataclasses.pyx":1507
 *             row['pos_x'],
 *             row['pos_y'],
 *             row['pos_z'],             # <<<<<<<<<<<<<<
 *             row['t0'],
 *             row['time'],
 */
    __Pyx_TraceLine(1507,0,__PYX_ERR(0, 1507, __pyx_L1_error))
    __pyx_t_18 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pos_z); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);

    /* "km3pipe/dataclasses.pyx":1508
 *             row['pos_y'],
 *             row['pos_z'],
 *             row['t0'],             # <<<<<<<<<<<<<<
 *             row['time'],
 *             row['tot'],
 */
    __Pyx_TraceLine(1508,0,__PYX_ERR(0, 1508, __pyx_L1_error))
    __pyx_t_19 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_t0); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);

    /* "km3pipe/dataclasses.pyx":1509
 *             row['pos_z'],
 *             row['t0'],
 *             row['time'],             # <<<<<<<<<<<<<<
 *             row['tot'],
 *             row['triggered'],
 */
    __Pyx_TraceLine(1509,0,__PYX_ERR(0, 1509, __pyx_L1_error))
    __pyx_t_20 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_time); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);

    /* "km3pipe/dataclasses.pyx":1510
 *             row['t0'],
 *             row['time'],
 *             row['tot'],             # <<<<<<<<<<<<<<
 *             row['triggered'],
 *         ) for row in table], dtype=cls.dtype), event_id)
 */
    __Pyx_TraceLine(1510,0,__PYX_ERR(0, 1510, __pyx_L1_error))
    __pyx_t_21 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_tot); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);

    /* "km3pipe/dataclasses.pyx":1511
 *             row['time'],
 *             row['tot'],
 *             row['triggered'],             # <<<<<<<<<<<<<<
 *         ) for row in table], dtype=cls.dtype), event_id)
 * 
 */
    __Pyx_TraceLine(1511,0,__PYX_ERR(0, 1511, __pyx_L1_error))
    __pyx_t_22 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_triggered); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_22);

    /* "km3pipe/dataclasses.pyx":1498
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(
 *             row['channel_id'],             # <<<<<<<<<<<<<<
 *             row['dir_x'],
 *             row['dir_y'],
 */
    __Pyx_TraceLine(1498,0,__PYX_ERR(0, 1498, __pyx_L1_error))
    __pyx_t_23 = PyTuple_New(14); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_23);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_23, 2, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_23, 3, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_23, 4, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_23, 5, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_23, 6, __pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_23, 7, __pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_23, 8, __pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_23, 9, __pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_19);
    PyTuple_SET_ITEM(__pyx_t_23, 10, __pyx_t_19);
    __Pyx_GIVEREF(__pyx_t_20);
    PyTuple_SET_ITEM(__pyx_t_23, 11, __pyx_t_20);
    __Pyx_GIVEREF(__pyx_t_21);
    PyTuple_SET_ITEM(__pyx_t_23, 12, __pyx_t_21);
    __Pyx_GIVEREF(__pyx_t_22);
    PyTuple_SET_ITEM(__pyx_t_23, 13, __pyx_t_22);
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    __pyx_t_12 = 0;
    __pyx_t_13 = 0;
    __pyx_t_14 = 0;
    __pyx_t_15 = 0;
    __pyx_t_16 = 0;
    __pyx_t_17 = 0;
    __pyx_t_18 = 0;
    __pyx_t_19 = 0;
    __pyx_t_20 = 0;
    __pyx_t_21 = 0;
    __pyx_t_22 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_23))) __PYX_ERR(0, 1497, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;

    /* "km3pipe/dataclasses.pyx":1512
 *             row['tot'],
 *             row['triggered'],
 *         ) for row in table], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(1512,0,__PYX_ERR(0, 1512, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1497
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['channel_id'],
 *             row['dir_x'],
 */
  __Pyx_TraceLine(1497,0,__PYX_ERR(0, 1497, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1512
 *             row['tot'],
 *             row['triggered'],
 *         ) for row in table], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1512,0,__PYX_ERR(0, 1512, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_23);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_23) < 0) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;

  /* "km3pipe/dataclasses.pyx":1497
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['channel_id'],
 *             row['dir_x'],
 */
  __Pyx_TraceLine(1497,0,__PYX_ERR(0, 1497, __pyx_L1_error))
  __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_23);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1512
 *             row['tot'],
 *             row['triggered'],
 *         ) for row in table], dtype=cls.dtype), event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1512,0,__PYX_ERR(0, 1512, __pyx_L1_error))
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_3 = __pyx_v_cls; __pyx_t_6 = NULL;
  __pyx_t_24 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_24 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_23, __pyx_v_event_id};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1497, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_23, __pyx_v_event_id};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1497, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_24); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_23);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_24, __pyx_t_23);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_24, __pyx_v_event_id);
    __pyx_t_23 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1494
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_event_id);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1515
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_13deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_12deserialise[] = "HitSeries.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_13deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_13deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_12deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_13deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 1515, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1515, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_12deserialise(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_12deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__145)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 1515, 0, __PYX_ERR(0, 1515, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1516
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(1516,0,__PYX_ERR(0, 1516, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1515
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1518
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_15serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_14serialise[] = "HitSeries.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_15serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_15serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_14serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_15serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 1518, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1518, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_14serialise(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_14serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__146)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 1518, 0, __PYX_ERR(0, 1518, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1519
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1519,0,__PYX_ERR(0, 1519, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1518
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1522
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_17conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_16conv_from[] = "HitSeries.conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_17conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_17conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_16conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_17conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_event_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, 1); __PYX_ERR(0, 1522, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 1522, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1522, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_16conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_event_id, __pyx_v_fmt, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_16conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__147)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 1522, 0, __PYX_ERR(0, 1522, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1524
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         # what is event_id doing here?
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls(data)
 *         if fmt == 'pandas':
 */
  __Pyx_TraceLine(1524,0,__PYX_ERR(0, 1524, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1524, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1525
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 *             return cls(data)             # <<<<<<<<<<<<<<
 *         if fmt == 'pandas':
 *             return cls(data.to_records(index=False))
 */
    __Pyx_TraceLine(1525,0,__PYX_ERR(0, 1525, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_cls);
    __pyx_t_3 = __pyx_v_cls; __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1525, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_data};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1525, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_data};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1525, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1525, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_data);
        __Pyx_GIVEREF(__pyx_v_data);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1525, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1524
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         # what is event_id doing here?
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls(data)
 *         if fmt == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":1526
 *         if fmt == 'numpy':
 *             return cls(data)
 *         if fmt == 'pandas':             # <<<<<<<<<<<<<<
 *             return cls(data.to_records(index=False))
 * 
 */
  __Pyx_TraceLine(1526,0,__PYX_ERR(0, 1526, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1526, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1527
 *             return cls(data)
 *         if fmt == 'pandas':
 *             return cls(data.to_records(index=False))             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(1527,0,__PYX_ERR(0, 1527, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_to_records); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 1527, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_v_cls);
    __pyx_t_5 = __pyx_v_cls; __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1527, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1527, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1527, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1527, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1527, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1526
 *         if fmt == 'numpy':
 *             return cls(data)
 *         if fmt == 'pandas':             # <<<<<<<<<<<<<<
 *             return cls(data.to_records(index=False))
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1522
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1529
 *             return cls(data.to_records(index=False))
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_19conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_18conv_to[] = "HitSeries.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_19conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_19conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_18conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_19conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 1529, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1529, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_18conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_18conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__148)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 1529, 0, __PYX_ERR(0, 1529, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1530
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  __Pyx_TraceLine(1530,0,__PYX_ERR(0, 1530, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1530, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1531
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return self.__array__()             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(1531,0,__PYX_ERR(0, 1531, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1531, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1531, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1530
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":1532
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(1532,0,__PYX_ERR(0, 1532, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1532, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1533
 *             return self.__array__()
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(1533,0,__PYX_ERR(0, 1533, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 1533, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_t_3) < 0) __PYX_ERR(0, 1533, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1532
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1529
 *             return cls(data.to_records(index=False))
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1535
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_21__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_20__array__[] = "HitSeries.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_21__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_21__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_20__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_21__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_20__array__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_20__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__149)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 1535, 0, __PYX_ERR(0, 1535, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1536
 * 
 *     def __array__(self):
 *         return self._arr             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_TraceLine(1536,0,__PYX_ERR(0, 1536, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1535
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1538
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_23__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_22__iter__[] = "HitSeries.__iter__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_23__iter__ = {"__iter__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_23__iter__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_22__iter__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_23__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_22__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_22__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__150)
  __Pyx_RefNannySetupContext("__iter__", 0);
  __Pyx_TraceCall("__iter__", __pyx_f[0], 1538, 0, __PYX_ERR(0, 1538, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1539
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1539,0,__PYX_ERR(0, 1539, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1538
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1542
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return HitSeries(self._arr[self._arr['triggered'] == True])     # noqa
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_25triggered_hits(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_24triggered_hits[] = "HitSeries.triggered_hits(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_25triggered_hits = {"triggered_hits", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_25triggered_hits, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_24triggered_hits};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_25triggered_hits(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("triggered_hits (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_24triggered_hits(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_24triggered_hits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__151)
  __Pyx_RefNannySetupContext("triggered_hits", 0);
  __Pyx_TraceCall("triggered_hits", __pyx_f[0], 1542, 0, __PYX_ERR(0, 1542, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1543
 *     @property
 *     def triggered_hits(self):
 *         return HitSeries(self._arr[self._arr['triggered'] == True])     # noqa             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1543,0,__PYX_ERR(0, 1543, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HitSeries); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_triggered); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1543, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1543, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1543, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1542
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return HitSeries(self._arr[self._arr['triggered'] == True])     # noqa
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.triggered_hits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1546
 * 
 *     @property
 *     def first_hits(self):             # <<<<<<<<<<<<<<
 *         h = self.conv_to(to='pandas')
 *         h.sort_values('time', inplace=True)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_27first_hits(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_26first_hits[] = "HitSeries.first_hits(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_27first_hits = {"first_hits", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_27first_hits, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_26first_hits};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_27first_hits(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("first_hits (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_26first_hits(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_26first_hits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_h = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__152)
  __Pyx_RefNannySetupContext("first_hits", 0);
  __Pyx_TraceCall("first_hits", __pyx_f[0], 1546, 0, __PYX_ERR(0, 1546, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1547
 *     @property
 *     def first_hits(self):
 *         h = self.conv_to(to='pandas')             # <<<<<<<<<<<<<<
 *         h.sort_values('time', inplace=True)
 *         h = h.drop_duplicates(subset='dom_id')
 */
  __Pyx_TraceLine(1547,0,__PYX_ERR(0, 1547, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_to, __pyx_n_s_pandas) < 0) __PYX_ERR(0, 1547, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_h = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1548
 *     def first_hits(self):
 *         h = self.conv_to(to='pandas')
 *         h.sort_values('time', inplace=True)             # <<<<<<<<<<<<<<
 *         h = h.drop_duplicates(subset='dom_id')
 *         return HitSeries(h.to_records(index=False))
 */
  __Pyx_TraceLine(1548,0,__PYX_ERR(0, 1548, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1548, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__153, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1549
 *         h = self.conv_to(to='pandas')
 *         h.sort_values('time', inplace=True)
 *         h = h.drop_duplicates(subset='dom_id')             # <<<<<<<<<<<<<<
 *         return HitSeries(h.to_records(index=False))
 * 
 */
  __Pyx_TraceLine(1549,0,__PYX_ERR(0, 1549, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_drop_duplicates); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_subset, __pyx_n_s_dom_id) < 0) __PYX_ERR(0, 1549, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_h, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1550
 *         h.sort_values('time', inplace=True)
 *         h = h.drop_duplicates(subset='dom_id')
 *         return HitSeries(h.to_records(index=False))             # <<<<<<<<<<<<<<
 * 
 *     def next(self):
 */
  __Pyx_TraceLine(1550,0,__PYX_ERR(0, 1550, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HitSeries); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_n_s_to_records); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 1550, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1546
 * 
 *     @property
 *     def first_hits(self):             # <<<<<<<<<<<<<<
 *         h = self.conv_to(to='pandas')
 *         h.sort_values('time', inplace=True)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.first_hits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_h);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1552
 *         return HitSeries(h.to_records(index=False))
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_29next(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_28next[] = "HitSeries.next(self)\nPython 2/3 compatibility for iterators";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_29next = {"next", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_29next, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_28next};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_29next(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_28next(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_28next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__154)
  __Pyx_RefNannySetupContext("next", 0);
  __Pyx_TraceCall("next", __pyx_f[0], 1552, 0, __PYX_ERR(0, 1552, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1554
 *     def next(self):
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_TraceLine(1554,0,__PYX_ERR(0, 1554, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1554, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1554, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1552
 *         return HitSeries(h.to_records(index=False))
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1556
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_31__next__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_30__next__[] = "HitSeries.__next__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_31__next__ = {"__next__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_31__next__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_30__next__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_31__next__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_30__next__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_30__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_hit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_TraceFrameInit(__pyx_codeobj__155)
  __Pyx_RefNannySetupContext("__next__", 0);
  __Pyx_TraceCall("__next__", __pyx_f[0], 1556, 0, __PYX_ERR(0, 1556, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1557
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  __Pyx_TraceLine(1557,0,__PYX_ERR(0, 1557, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1557, __pyx_L1_error)
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1557, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1557, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "km3pipe/dataclasses.pyx":1558
 *     def __next__(self):
 *         if self._index >= len(self):
 *             self._index = 0             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         hit = self[self._index]
 */
    __Pyx_TraceLine(1558,0,__PYX_ERR(0, 1558, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_int_0) < 0) __PYX_ERR(0, 1558, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1559
 *         if self._index >= len(self):
 *             self._index = 0
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         hit = self[self._index]
 *         self._index += 1
 */
    __Pyx_TraceLine(1559,0,__PYX_ERR(0, 1559, __pyx_L1_error))
    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
    __PYX_ERR(0, 1559, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1557
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  }

  /* "km3pipe/dataclasses.pyx":1560
 *             self._index = 0
 *             raise StopIteration
 *         hit = self[self._index]             # <<<<<<<<<<<<<<
 *         self._index += 1
 *         return hit
 */
  __Pyx_TraceLine(1560,0,__PYX_ERR(0, 1560, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_GetItem(__pyx_v_self, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_hit = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1561
 *             raise StopIteration
 *         hit = self[self._index]
 *         self._index += 1             # <<<<<<<<<<<<<<
 *         return hit
 * 
 */
  __Pyx_TraceLine(1561,0,__PYX_ERR(0, 1561, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_t_4) < 0) __PYX_ERR(0, 1561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1562
 *         hit = self[self._index]
 *         self._index += 1
 *         return hit             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(1562,0,__PYX_ERR(0, 1562, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_hit);
  __pyx_r = __pyx_v_hit;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1556
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_hit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1564
 *         return hit
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_33__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_32__len__[] = "HitSeries.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_33__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_33__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_32__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_33__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_32__len__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_32__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__156)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 1564, 0, __PYX_ERR(0, 1564, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1565
 * 
 *     def __len__(self):
 *         return self._arr.shape[0]             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index):
 */
  __Pyx_TraceLine(1565,0,__PYX_ERR(0, 1565, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1564
 *         return hit
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1567
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return Hit(*self._arr[index])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_35__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_34__getitem__[] = "HitSeries.__getitem__(self, index)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_35__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_35__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_34__getitem__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_35__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 1567, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 1567, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1567, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_34__getitem__(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_34__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__157)
  __Pyx_RefNannySetupContext("__getitem__", 0);
  __Pyx_TraceCall("__getitem__", __pyx_f[0], 1567, 0, __PYX_ERR(0, 1567, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1568
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return Hit(*self._arr[index])
 *         return self.__class__(self._arr[index])
 */
  __Pyx_TraceLine(1568,0,__PYX_ERR(0, 1568, __pyx_L1_error))
  __pyx_t_1 = PyInt_Check(__pyx_v_index); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":1569
 *     def __getitem__(self, index):
 *         if isinstance(index, int):
 *             return Hit(*self._arr[index])             # <<<<<<<<<<<<<<
 *         return self.__class__(self._arr[index])
 * 
 */
    __Pyx_TraceLine(1569,0,__PYX_ERR(0, 1569, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_Hit), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1568
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return Hit(*self._arr[index])
 *         return self.__class__(self._arr[index])
 */
  }

  /* "km3pipe/dataclasses.pyx":1570
 *         if isinstance(index, int):
 *             return Hit(*self._arr[index])
 *         return self.__class__(self._arr[index])             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(1570,0,__PYX_ERR(0, 1570, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_v_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1570, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1570, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1570, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1567
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return Hit(*self._arr[index])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1572
 *         return self.__class__(self._arr[index])
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_37__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_36__str__[] = "HitSeries.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_37__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_37__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_36__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_37__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_36__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_36__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_v_n_hits;
  PyObject *__pyx_v_plural = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__158)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 1572, 0, __PYX_ERR(0, 1572, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1573
 * 
 *     def __str__(self):
 *         n_hits = len(self)             # <<<<<<<<<<<<<<
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 *         return("HitSeries with {0} hit{1}.".format(len(self), plural))
 */
  __Pyx_TraceLine(1573,0,__PYX_ERR(0, 1573, __pyx_L1_error))
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1573, __pyx_L1_error)
  __pyx_v_n_hits = __pyx_t_1;

  /* "km3pipe/dataclasses.pyx":1574
 *     def __str__(self):
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''             # <<<<<<<<<<<<<<
 *         return("HitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 */
  __Pyx_TraceLine(1574,0,__PYX_ERR(0, 1574, __pyx_L1_error))
  __pyx_t_4 = ((__pyx_v_n_hits > 1) != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_4 = ((__pyx_v_n_hits == 0) != 0);
  __pyx_t_3 = __pyx_t_4;
  __pyx_L3_bool_binop_done:;
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_n_s_s);
    __pyx_t_2 = __pyx_n_s_s;
  } else {
    __Pyx_INCREF(__pyx_kp_s__88);
    __pyx_t_2 = __pyx_kp_s__88;
  }
  __pyx_v_plural = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1575
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 *         return("HitSeries with {0} hit{1}.".format(len(self), plural))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(1575,0,__PYX_ERR(0, 1575, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_HitSeries_with_0_hit_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1575, __pyx_L1_error)
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1575, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1575, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_plural);
    __Pyx_GIVEREF(__pyx_v_plural);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_plural);
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1572
 *         return self.__class__(self._arr[index])
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_plural);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1577
 *         return("HitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_39__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_38__repr__[] = "HitSeries.__repr__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_39__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_39__repr__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_38__repr__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_39__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_38__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_38__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__159)
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 1577, 0, __PYX_ERR(0, 1577, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1578
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(1578,0,__PYX_ERR(0, 1578, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1577
 *         return("HitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1580
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_41__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_9HitSeries_40__insp__[] = "HitSeries.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_9HitSeries_41__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_9HitSeries_41__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_9HitSeries_40__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_9HitSeries_41__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_9HitSeries_40__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_9HitSeries_40__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_hit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__160)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 1580, 0, __PYX_ERR(0, 1580, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1581
 * 
 *     def __insp__(self):
 *         return '\n'.join([str(hit) for hit in self._hits])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(1581,0,__PYX_ERR(0, 1581, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hits); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1581, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1581, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1581, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1581, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1581, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1581, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_hit, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_hit);
    __Pyx_GIVEREF(__pyx_v_hit);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_hit);
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1581, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__91, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1580
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.HitSeries.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_hit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1595
 *     ])
 * 
 *     def __init__(self, arr, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries___init__[] = "TimesliceHitSeries.__init__(self, arr, slice_id, frame_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_slice_id = 0;
  PyObject *__pyx_v_frame_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_arr_2,&__pyx_n_s_slice_id,&__pyx_n_s_frame_id,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 1595, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 1595, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 1595, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1595, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_arr = values[1];
    __pyx_v_slice_id = values[2];
    __pyx_v_frame_id = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1595, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries___init__(__pyx_self, __pyx_v_self, __pyx_v_arr, __pyx_v_slice_id, __pyx_v_frame_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__161)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1595, 0, __PYX_ERR(0, 1595, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1596
 * 
 *     def __init__(self, arr, slice_id, frame_id):
 *         self._arr = arr             # <<<<<<<<<<<<<<
 *         self._index = 0
 *         self._hits = None
 */
  __Pyx_TraceLine(1596,0,__PYX_ERR(0, 1596, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_arr, __pyx_v_arr) < 0) __PYX_ERR(0, 1596, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1597
 *     def __init__(self, arr, slice_id, frame_id):
 *         self._arr = arr
 *         self._index = 0             # <<<<<<<<<<<<<<
 *         self._hits = None
 *         self.slice_id = slice_id
 */
  __Pyx_TraceLine(1597,0,__PYX_ERR(0, 1597, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_int_0) < 0) __PYX_ERR(0, 1597, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1598
 *         self._arr = arr
 *         self._index = 0
 *         self._hits = None             # <<<<<<<<<<<<<<
 *         self.slice_id = slice_id
 *         self.frame_id = frame_id
 */
  __Pyx_TraceLine(1598,0,__PYX_ERR(0, 1598, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_hits, Py_None) < 0) __PYX_ERR(0, 1598, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1599
 *         self._index = 0
 *         self._hits = None
 *         self.slice_id = slice_id             # <<<<<<<<<<<<<<
 *         self.frame_id = frame_id
 * 
 */
  __Pyx_TraceLine(1599,0,__PYX_ERR(0, 1599, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_slice_id, __pyx_v_slice_id) < 0) __PYX_ERR(0, 1599, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1600
 *         self._hits = None
 *         self.slice_id = slice_id
 *         self.frame_id = frame_id             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1600,0,__PYX_ERR(0, 1600, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_frame_id, __pyx_v_frame_id) < 0) __PYX_ERR(0, 1600, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1595
 *     ])
 * 
 *     def __init__(self, arr, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1603
 * 
 *     @property
 *     def h5loc(self):             # <<<<<<<<<<<<<<
 *         return "/timeslices/slice_{0}".format(self.slice_id)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_3h5loc(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_2h5loc[] = "TimesliceHitSeries.h5loc(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_3h5loc = {"h5loc", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_3h5loc, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_2h5loc};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_3h5loc(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("h5loc (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_2h5loc(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_2h5loc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__162)
  __Pyx_RefNannySetupContext("h5loc", 0);
  __Pyx_TraceCall("h5loc", __pyx_f[0], 1603, 0, __PYX_ERR(0, 1603, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1604
 *     @property
 *     def h5loc(self):
 *         return "/timeslices/slice_{0}".format(self.slice_id)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1604,0,__PYX_ERR(0, 1604, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_timeslices_slice__0, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1604, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1604, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1604, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1604, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1604, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1603
 * 
 *     @property
 *     def h5loc(self):             # <<<<<<<<<<<<<<
 *         return "/timeslices/slice_{0}".format(self.slice_id)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.h5loc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1607
 * 
 *     @property
 *     def tabname(self):             # <<<<<<<<<<<<<<
 *         return "frame_{0}".format(self.frame_id)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_5tabname(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_4tabname[] = "TimesliceHitSeries.tabname(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_5tabname = {"tabname", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_5tabname, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_4tabname};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_5tabname(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tabname (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_4tabname(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_4tabname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__163)
  __Pyx_RefNannySetupContext("tabname", 0);
  __Pyx_TraceCall("tabname", __pyx_f[0], 1607, 0, __PYX_ERR(0, 1607, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1608
 *     @property
 *     def tabname(self):
 *         return "frame_{0}".format(self.frame_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1608,0,__PYX_ERR(0, 1608, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_frame__0, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1608, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1607
 * 
 *     @property
 *     def tabname(self):             # <<<<<<<<<<<<<<
 *         return "frame_{0}".format(self.frame_id)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.tabname", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1611
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dom_ids, times, tots, slice_id,             # <<<<<<<<<<<<<<
 *                     frame_id):
 *         len = channel_ids.shape[0]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_7from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_6from_arrays[] = "TimesliceHitSeries.from_arrays(cls, channel_ids, dom_ids, times, tots, slice_id, frame_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_7from_arrays = {"from_arrays", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_7from_arrays, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_6from_arrays};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_7from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_channel_ids = 0;
  PyObject *__pyx_v_dom_ids = 0;
  PyObject *__pyx_v_times = 0;
  PyObject *__pyx_v_tots = 0;
  PyObject *__pyx_v_slice_id = 0;
  PyObject *__pyx_v_frame_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_channel_ids,&__pyx_n_s_dom_ids,&__pyx_n_s_times,&__pyx_n_s_tots,&__pyx_n_s_slice_id,&__pyx_n_s_frame_id,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_channel_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 1); __PYX_ERR(0, 1611, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dom_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 2); __PYX_ERR(0, 1611, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_times)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 3); __PYX_ERR(0, 1611, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tots)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 4); __PYX_ERR(0, 1611, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 5); __PYX_ERR(0, 1611, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, 6); __PYX_ERR(0, 1611, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_arrays") < 0)) __PYX_ERR(0, 1611, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
    }
    __pyx_v_cls = values[0];
    __pyx_v_channel_ids = values[1];
    __pyx_v_dom_ids = values[2];
    __pyx_v_times = values[3];
    __pyx_v_tots = values[4];
    __pyx_v_slice_id = values[5];
    __pyx_v_frame_id = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1611, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_6from_arrays(__pyx_self, __pyx_v_cls, __pyx_v_channel_ids, __pyx_v_dom_ids, __pyx_v_times, __pyx_v_tots, __pyx_v_slice_id, __pyx_v_frame_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_6from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_channel_ids, PyObject *__pyx_v_dom_ids, PyObject *__pyx_v_times, PyObject *__pyx_v_tots, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id) {
  PyObject *__pyx_v_len = NULL;
  PyObject *__pyx_v_hits = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__164)
  __Pyx_RefNannySetupContext("from_arrays", 0);
  __Pyx_TraceCall("from_arrays", __pyx_f[0], 1611, 0, __PYX_ERR(0, 1611, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1613
 *     def from_arrays(cls, channel_ids, dom_ids, times, tots, slice_id,
 *                     frame_id):
 *         len = channel_ids.shape[0]             # <<<<<<<<<<<<<<
 *         hits = np.empty(len, cls.dtype)
 *         hits['channel_id'] = channel_ids
 */
  __Pyx_TraceLine(1613,0,__PYX_ERR(0, 1613, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_channel_ids, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_len = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1614
 *                     frame_id):
 *         len = channel_ids.shape[0]
 *         hits = np.empty(len, cls.dtype)             # <<<<<<<<<<<<<<
 *         hits['channel_id'] = channel_ids
 *         hits['dom_id'] = dom_ids
 */
  __Pyx_TraceLine(1614,0,__PYX_ERR(0, 1614, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_len, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1614, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_len, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1614, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_len);
    __Pyx_GIVEREF(__pyx_v_len);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_len);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_hits = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1615
 *         len = channel_ids.shape[0]
 *         hits = np.empty(len, cls.dtype)
 *         hits['channel_id'] = channel_ids             # <<<<<<<<<<<<<<
 *         hits['dom_id'] = dom_ids
 *         hits['time'] = times
 */
  __Pyx_TraceLine(1615,0,__PYX_ERR(0, 1615, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_channel_id, __pyx_v_channel_ids) < 0)) __PYX_ERR(0, 1615, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1616
 *         hits = np.empty(len, cls.dtype)
 *         hits['channel_id'] = channel_ids
 *         hits['dom_id'] = dom_ids             # <<<<<<<<<<<<<<
 *         hits['time'] = times
 *         hits['tot'] = tots
 */
  __Pyx_TraceLine(1616,0,__PYX_ERR(0, 1616, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_dom_id, __pyx_v_dom_ids) < 0)) __PYX_ERR(0, 1616, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1617
 *         hits['channel_id'] = channel_ids
 *         hits['dom_id'] = dom_ids
 *         hits['time'] = times             # <<<<<<<<<<<<<<
 *         hits['tot'] = tots
 *         return cls(hits, slice_id, frame_id)
 */
  __Pyx_TraceLine(1617,0,__PYX_ERR(0, 1617, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_time, __pyx_v_times) < 0)) __PYX_ERR(0, 1617, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1618
 *         hits['dom_id'] = dom_ids
 *         hits['time'] = times
 *         hits['tot'] = tots             # <<<<<<<<<<<<<<
 *         return cls(hits, slice_id, frame_id)
 * 
 */
  __Pyx_TraceLine(1618,0,__PYX_ERR(0, 1618, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_hits, __pyx_n_s_tot, __pyx_v_tots) < 0)) __PYX_ERR(0, 1618, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1619
 *         hits['time'] = times
 *         hits['tot'] = tots
 *         return cls(hits, slice_id, frame_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1619,0,__PYX_ERR(0, 1619, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_3 = __pyx_v_cls; __pyx_t_6 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_hits, __pyx_v_slice_id, __pyx_v_frame_id};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1619, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_hits, __pyx_v_slice_id, __pyx_v_frame_id};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1619, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_1 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_hits);
    __Pyx_GIVEREF(__pyx_v_hits);
    PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_5, __pyx_v_hits);
    __Pyx_INCREF(__pyx_v_slice_id);
    __Pyx_GIVEREF(__pyx_v_slice_id);
    PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_5, __pyx_v_slice_id);
    __Pyx_INCREF(__pyx_v_frame_id);
    __Pyx_GIVEREF(__pyx_v_frame_id);
    PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_5, __pyx_v_frame_id);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1611
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dom_ids, times, tots, slice_id,             # <<<<<<<<<<<<<<
 *                     frame_id):
 *         len = channel_ids.shape[0]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_len);
  __Pyx_XDECREF(__pyx_v_hits);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1622
 * 
 *     @classmethod
 *     def from_dict(cls, map, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         return cls.from_arrays(
 *             map['channel_id'],
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_9from_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_8from_dict[] = "TimesliceHitSeries.from_dict(cls, map, slice_id, frame_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_9from_dict = {"from_dict", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_9from_dict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_8from_dict};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_9from_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_map = 0;
  PyObject *__pyx_v_slice_id = 0;
  PyObject *__pyx_v_frame_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_dict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_map,&__pyx_n_s_slice_id,&__pyx_n_s_frame_id,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_map)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_dict", 1, 4, 4, 1); __PYX_ERR(0, 1622, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_dict", 1, 4, 4, 2); __PYX_ERR(0, 1622, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_dict", 1, 4, 4, 3); __PYX_ERR(0, 1622, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_dict") < 0)) __PYX_ERR(0, 1622, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_cls = values[0];
    __pyx_v_map = values[1];
    __pyx_v_slice_id = values[2];
    __pyx_v_frame_id = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_dict", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1622, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_8from_dict(__pyx_self, __pyx_v_cls, __pyx_v_map, __pyx_v_slice_id, __pyx_v_frame_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_8from_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_map, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__165)
  __Pyx_RefNannySetupContext("from_dict", 0);
  __Pyx_TraceCall("from_dict", __pyx_f[0], 1622, 0, __PYX_ERR(0, 1622, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1623
 *     @classmethod
 *     def from_dict(cls, map, slice_id, frame_id):
 *         return cls.from_arrays(             # <<<<<<<<<<<<<<
 *             map['channel_id'],
 *             map['dom_id'],
 */
  __Pyx_TraceLine(1623,0,__PYX_ERR(0, 1623, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_arrays); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "km3pipe/dataclasses.pyx":1624
 *     def from_dict(cls, map, slice_id, frame_id):
 *         return cls.from_arrays(
 *             map['channel_id'],             # <<<<<<<<<<<<<<
 *             map['dom_id'],
 *             map['time'],
 */
  __Pyx_TraceLine(1624,0,__PYX_ERR(0, 1624, __pyx_L1_error))
  __pyx_t_3 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_channel_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "km3pipe/dataclasses.pyx":1625
 *         return cls.from_arrays(
 *             map['channel_id'],
 *             map['dom_id'],             # <<<<<<<<<<<<<<
 *             map['time'],
 *             map['tot'],
 */
  __Pyx_TraceLine(1625,0,__PYX_ERR(0, 1625, __pyx_L1_error))
  __pyx_t_4 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":1626
 *             map['channel_id'],
 *             map['dom_id'],
 *             map['time'],             # <<<<<<<<<<<<<<
 *             map['tot'],
 *             slice_id,
 */
  __Pyx_TraceLine(1626,0,__PYX_ERR(0, 1626, __pyx_L1_error))
  __pyx_t_5 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":1627
 *             map['dom_id'],
 *             map['time'],
 *             map['tot'],             # <<<<<<<<<<<<<<
 *             slice_id,
 *             frame_id,
 */
  __Pyx_TraceLine(1627,0,__PYX_ERR(0, 1627, __pyx_L1_error))
  __pyx_t_6 = PyObject_GetItem(__pyx_v_map, __pyx_n_s_tot); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1629
 *             map['tot'],
 *             slice_id,
 *             frame_id,             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __Pyx_TraceLine(1629,0,__PYX_ERR(0, 1629, __pyx_L1_error))
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_v_slice_id, __pyx_v_frame_id};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1623, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[7] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_v_slice_id, __pyx_v_frame_id};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1623, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(6+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_slice_id);
    __Pyx_GIVEREF(__pyx_v_slice_id);
    PyTuple_SET_ITEM(__pyx_t_9, 4+__pyx_t_8, __pyx_v_slice_id);
    __Pyx_INCREF(__pyx_v_frame_id);
    __Pyx_GIVEREF(__pyx_v_frame_id);
    PyTuple_SET_ITEM(__pyx_t_9, 5+__pyx_t_8, __pyx_v_frame_id);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1622
 * 
 *     @classmethod
 *     def from_dict(cls, map, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         return cls.from_arrays(
 *             map['channel_id'],
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1632
 *         )
 * 
 *     def from_table(cls, table, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             row['channel_id'],
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_11from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_10from_table[] = "TimesliceHitSeries.from_table(cls, table, slice_id, frame_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_11from_table = {"from_table", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_11from_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_10from_table};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_11from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_table = 0;
  PyObject *__pyx_v_slice_id = 0;
  PyObject *__pyx_v_frame_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_table,&__pyx_n_s_slice_id,&__pyx_n_s_frame_id,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_table)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 4, 4, 1); __PYX_ERR(0, 1632, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 4, 4, 2); __PYX_ERR(0, 1632, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 4, 4, 3); __PYX_ERR(0, 1632, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_table") < 0)) __PYX_ERR(0, 1632, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_cls = values[0];
    __pyx_v_table = values[1];
    __pyx_v_slice_id = values[2];
    __pyx_v_frame_id = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_table", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1632, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_10from_table(__pyx_self, __pyx_v_cls, __pyx_v_table, __pyx_v_slice_id, __pyx_v_frame_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_10from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id) {
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  __Pyx_TraceFrameInit(__pyx_codeobj__166)
  __Pyx_RefNannySetupContext("from_table", 0);
  __Pyx_TraceCall("from_table", __pyx_f[0], 1632, 0, __PYX_ERR(0, 1632, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1633
 * 
 *     def from_table(cls, table, slice_id, frame_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['channel_id'],
 *             row['dom_id'],
 */
  __Pyx_TraceLine(1633,0,__PYX_ERR(0, 1633, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "km3pipe/dataclasses.pyx":1638
 *             row['time'],
 *             row['tot'],
 *         ) for row in table], dtype=cls.dtype), slice_id, frame_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1638,0,__PYX_ERR(0, 1638, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_table)) || PyTuple_CheckExact(__pyx_v_table)) {
    __pyx_t_4 = __pyx_v_table; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_table); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1638, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1638, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1638, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1638, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1638, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1638, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":1634
 *     def from_table(cls, table, slice_id, frame_id):
 *         return cls(np.array([(
 *             row['channel_id'],             # <<<<<<<<<<<<<<
 *             row['dom_id'],
 *             row['time'],
 */
    __Pyx_TraceLine(1634,0,__PYX_ERR(0, 1634, __pyx_L1_error))
    __pyx_t_7 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_channel_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "km3pipe/dataclasses.pyx":1635
 *         return cls(np.array([(
 *             row['channel_id'],
 *             row['dom_id'],             # <<<<<<<<<<<<<<
 *             row['time'],
 *             row['tot'],
 */
    __Pyx_TraceLine(1635,0,__PYX_ERR(0, 1635, __pyx_L1_error))
    __pyx_t_8 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1635, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "km3pipe/dataclasses.pyx":1636
 *             row['channel_id'],
 *             row['dom_id'],
 *             row['time'],             # <<<<<<<<<<<<<<
 *             row['tot'],
 *         ) for row in table], dtype=cls.dtype), slice_id, frame_id)
 */
    __Pyx_TraceLine(1636,0,__PYX_ERR(0, 1636, __pyx_L1_error))
    __pyx_t_9 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "km3pipe/dataclasses.pyx":1637
 *             row['dom_id'],
 *             row['time'],
 *             row['tot'],             # <<<<<<<<<<<<<<
 *         ) for row in table], dtype=cls.dtype), slice_id, frame_id)
 * 
 */
    __Pyx_TraceLine(1637,0,__PYX_ERR(0, 1637, __pyx_L1_error))
    __pyx_t_10 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_tot); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "km3pipe/dataclasses.pyx":1634
 *     def from_table(cls, table, slice_id, frame_id):
 *         return cls(np.array([(
 *             row['channel_id'],             # <<<<<<<<<<<<<<
 *             row['dom_id'],
 *             row['time'],
 */
    __Pyx_TraceLine(1634,0,__PYX_ERR(0, 1634, __pyx_L1_error))
    __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_10);
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 1633, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "km3pipe/dataclasses.pyx":1638
 *             row['time'],
 *             row['tot'],
 *         ) for row in table], dtype=cls.dtype), slice_id, frame_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(1638,0,__PYX_ERR(0, 1638, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1633
 * 
 *     def from_table(cls, table, slice_id, frame_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['channel_id'],
 *             row['dom_id'],
 */
  __Pyx_TraceLine(1633,0,__PYX_ERR(0, 1633, __pyx_L1_error))
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1638
 *             row['time'],
 *             row['tot'],
 *         ) for row in table], dtype=cls.dtype), slice_id, frame_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1638,0,__PYX_ERR(0, 1638, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_11) < 0) __PYX_ERR(0, 1638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "km3pipe/dataclasses.pyx":1633
 * 
 *     def from_table(cls, table, slice_id, frame_id):
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['channel_id'],
 *             row['dom_id'],
 */
  __Pyx_TraceLine(1633,0,__PYX_ERR(0, 1633, __pyx_L1_error))
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1638
 *             row['time'],
 *             row['tot'],
 *         ) for row in table], dtype=cls.dtype), slice_id, frame_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1638,0,__PYX_ERR(0, 1638, __pyx_L1_error))
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_2 = __pyx_v_cls; __pyx_t_4 = NULL;
  __pyx_t_12 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_12 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_11, __pyx_v_slice_id, __pyx_v_frame_id};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1633, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_11, __pyx_v_slice_id, __pyx_v_frame_id};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1633, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_12, __pyx_t_11);
    __Pyx_INCREF(__pyx_v_slice_id);
    __Pyx_GIVEREF(__pyx_v_slice_id);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_12, __pyx_v_slice_id);
    __Pyx_INCREF(__pyx_v_frame_id);
    __Pyx_GIVEREF(__pyx_v_frame_id);
    PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_12, __pyx_v_frame_id);
    __pyx_t_11 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1632
 *         )
 * 
 *     def from_table(cls, table, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             row['channel_id'],
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1641
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_13deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_12deserialise[] = "TimesliceHitSeries.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_13deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_13deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_12deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_13deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 1641, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1641, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_12deserialise(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_12deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__167)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 1641, 0, __PYX_ERR(0, 1641, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1642
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(1642,0,__PYX_ERR(0, 1642, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1641
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1644
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_15serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_14serialise[] = "TimesliceHitSeries.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_15serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_15serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_14serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_15serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 1644, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1644, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_14serialise(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_14serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__168)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 1644, 0, __PYX_ERR(0, 1644, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1645
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1645,0,__PYX_ERR(0, 1645, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1644
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1648
 * 
 *     @classmethod
 *     def conv_from(cls, data, slice_id, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, frame_id)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_17conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_16conv_from[] = "TimesliceHitSeries.conv_from(cls, data, slice_id, frame_id, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_17conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_17conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_16conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_17conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_slice_id = 0;
  PyObject *__pyx_v_frame_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_slice_id,&__pyx_n_s_frame_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[4] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[5] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 4, 6, 1); __PYX_ERR(0, 1648, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 4, 6, 2); __PYX_ERR(0, 1648, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 4, 6, 3); __PYX_ERR(0, 1648, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 1648, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_slice_id = values[2];
    __pyx_v_frame_id = values[3];
    __pyx_v_fmt = values[4];
    __pyx_v_h5loc = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 4, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1648, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_16conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_slice_id, __pyx_v_frame_id, __pyx_v_fmt, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_16conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_slice_id, PyObject *__pyx_v_frame_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__169)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 1648, 0, __PYX_ERR(0, 1648, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1649
 *     @classmethod
 *     def conv_from(cls, data, slice_id, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             # return cls.from_table(data, frame_id)
 *             return cls(data, slice_id, frame_id)
 */
  __Pyx_TraceLine(1649,0,__PYX_ERR(0, 1649, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1649, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1651
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, frame_id)
 *             return cls(data, slice_id, frame_id)             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(1651,0,__PYX_ERR(0, 1651, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_cls);
    __pyx_t_3 = __pyx_v_cls; __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_data, __pyx_v_slice_id, __pyx_v_frame_id};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1651, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_data, __pyx_v_slice_id, __pyx_v_frame_id};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1651, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1651, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
      __Pyx_INCREF(__pyx_v_slice_id);
      __Pyx_GIVEREF(__pyx_v_slice_id);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_slice_id);
      __Pyx_INCREF(__pyx_v_frame_id);
      __Pyx_GIVEREF(__pyx_v_frame_id);
      PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_frame_id);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1651, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1649
 *     @classmethod
 *     def conv_from(cls, data, slice_id, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             # return cls.from_table(data, frame_id)
 *             return cls(data, slice_id, frame_id)
 */
  }

  /* "km3pipe/dataclasses.pyx":1648
 * 
 *     @classmethod
 *     def conv_from(cls, data, slice_id, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, frame_id)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1653
 *             return cls(data, slice_id, frame_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_19conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_18conv_to[] = "TimesliceHitSeries.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_19conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_19conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_18conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_19conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 1653, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1653, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_18conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_18conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__170)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 1653, 0, __PYX_ERR(0, 1653, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1654
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  __Pyx_TraceLine(1654,0,__PYX_ERR(0, 1654, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1654, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1655
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return self.__array__()             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(1655,0,__PYX_ERR(0, 1655, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1655, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1655, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1654
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":1656
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(1656,0,__PYX_ERR(0, 1656, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1656, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1657
 *             return self.__array__()
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(1657,0,__PYX_ERR(0, 1657, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 1657, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_t_3) < 0) __PYX_ERR(0, 1657, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1656
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1653
 *             return cls(data, slice_id, frame_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1659
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_21__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_20__array__[] = "TimesliceHitSeries.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_21__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_21__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_20__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_21__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_20__array__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_20__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__171)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 1659, 0, __PYX_ERR(0, 1659, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1660
 * 
 *     def __array__(self):
 *         return self._arr             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_TraceLine(1660,0,__PYX_ERR(0, 1660, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1659
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1662
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_23__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_22__iter__[] = "TimesliceHitSeries.__iter__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_23__iter__ = {"__iter__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_23__iter__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_22__iter__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_23__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_22__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_22__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__172)
  __Pyx_RefNannySetupContext("__iter__", 0);
  __Pyx_TraceCall("__iter__", __pyx_f[0], 1662, 0, __PYX_ERR(0, 1662, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1663
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def next(self):
 */
  __Pyx_TraceLine(1663,0,__PYX_ERR(0, 1663, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1662
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1665
 *         return self
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_25next(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_24next[] = "TimesliceHitSeries.next(self)\nPython 2/3 compatibility for iterators";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_25next = {"next", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_25next, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_24next};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_25next(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_24next(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_24next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__173)
  __Pyx_RefNannySetupContext("next", 0);
  __Pyx_TraceCall("next", __pyx_f[0], 1665, 0, __PYX_ERR(0, 1665, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1667
 *     def next(self):
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_TraceLine(1667,0,__PYX_ERR(0, 1667, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1667, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1667, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1665
 *         return self
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1669
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_27__next__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_26__next__[] = "TimesliceHitSeries.__next__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_27__next__ = {"__next__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_27__next__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_26__next__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_27__next__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_26__next__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_26__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *__pyx_v_hits = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_TraceFrameInit(__pyx_codeobj__174)
  __Pyx_RefNannySetupContext("__next__", 0);
  __Pyx_TraceCall("__next__", __pyx_f[0], 1669, 0, __PYX_ERR(0, 1669, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1670
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  __Pyx_TraceLine(1670,0,__PYX_ERR(0, 1670, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1670, __pyx_L1_error)
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1670, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1670, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "km3pipe/dataclasses.pyx":1671
 *     def __next__(self):
 *         if self._index >= len(self):
 *             self._index = 0             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         hits = TimesliceHit(*self._arr[self._index])
 */
    __Pyx_TraceLine(1671,0,__PYX_ERR(0, 1671, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_int_0) < 0) __PYX_ERR(0, 1671, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1672
 *         if self._index >= len(self):
 *             self._index = 0
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         hits = TimesliceHit(*self._arr[self._index])
 *         self._index += 1
 */
    __Pyx_TraceLine(1672,0,__PYX_ERR(0, 1672, __pyx_L1_error))
    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
    __PYX_ERR(0, 1672, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1670
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  }

  /* "km3pipe/dataclasses.pyx":1673
 *             self._index = 0
 *             raise StopIteration
 *         hits = TimesliceHit(*self._arr[self._index])             # <<<<<<<<<<<<<<
 *         self._index += 1
 *         return hits
 */
  __Pyx_TraceLine(1673,0,__PYX_ERR(0, 1673, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetItem(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_TimesliceHit), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_hits = ((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1674
 *             raise StopIteration
 *         hits = TimesliceHit(*self._arr[self._index])
 *         self._index += 1             # <<<<<<<<<<<<<<
 *         return hits
 * 
 */
  __Pyx_TraceLine(1674,0,__PYX_ERR(0, 1674, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_t_3) < 0) __PYX_ERR(0, 1674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1675
 *         hits = TimesliceHit(*self._arr[self._index])
 *         self._index += 1
 *         return hits             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(1675,0,__PYX_ERR(0, 1675, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_hits));
  __pyx_r = ((PyObject *)__pyx_v_hits);
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1669
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_hits);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1677
 *         return hits
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_29__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_28__len__[] = "TimesliceHitSeries.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_29__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_29__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_28__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_29__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_28__len__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_28__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__175)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 1677, 0, __PYX_ERR(0, 1677, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1678
 * 
 *     def __len__(self):
 *         return self._arr.shape[0]             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index):
 */
  __Pyx_TraceLine(1678,0,__PYX_ERR(0, 1678, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1677
 *         return hits
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1680
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return TimesliceHit(*self._arr[index])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_31__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_30__getitem__[] = "TimesliceHitSeries.__getitem__(self, index)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_31__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_31__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_30__getitem__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_31__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 1680, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 1680, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1680, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_30__getitem__(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_30__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__176)
  __Pyx_RefNannySetupContext("__getitem__", 0);
  __Pyx_TraceCall("__getitem__", __pyx_f[0], 1680, 0, __PYX_ERR(0, 1680, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1681
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return TimesliceHit(*self._arr[index])
 *         return self.__class__(self._arr[index], self.slice_id, self.frame_id)
 */
  __Pyx_TraceLine(1681,0,__PYX_ERR(0, 1681, __pyx_L1_error))
  __pyx_t_1 = PyInt_Check(__pyx_v_index); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":1682
 *     def __getitem__(self, index):
 *         if isinstance(index, int):
 *             return TimesliceHit(*self._arr[index])             # <<<<<<<<<<<<<<
 *         return self.__class__(self._arr[index], self.slice_id, self.frame_id)
 * 
 */
    __Pyx_TraceLine(1682,0,__PYX_ERR(0, 1682, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_TimesliceHit), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1681
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return TimesliceHit(*self._arr[index])
 *         return self.__class__(self._arr[index], self.slice_id, self.frame_id)
 */
  }

  /* "km3pipe/dataclasses.pyx":1683
 *         if isinstance(index, int):
 *             return TimesliceHit(*self._arr[index])
 *         return self.__class__(self._arr[index], self.slice_id, self.frame_id)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_TraceLine(1683,0,__PYX_ERR(0, 1683, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_v_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_frame_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_6, __pyx_t_5, __pyx_t_7};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1683, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_6, __pyx_t_5, __pyx_t_7};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1683, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_7);
    __pyx_t_6 = 0;
    __pyx_t_5 = 0;
    __pyx_t_7 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1680
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return TimesliceHit(*self._arr[index])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1685
 *         return self.__class__(self._arr[index], self.slice_id, self.frame_id)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_33__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_32__str__[] = "TimesliceHitSeries.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_33__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_33__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_32__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_33__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_32__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_32__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_v_n_hits;
  PyObject *__pyx_v_plural = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__177)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 1685, 0, __PYX_ERR(0, 1685, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1686
 * 
 *     def __str__(self):
 *         n_hits = len(self)             # <<<<<<<<<<<<<<
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 *         return("TimesliceHitSeries with {0} hit{1}.".format(len(self), plural))
 */
  __Pyx_TraceLine(1686,0,__PYX_ERR(0, 1686, __pyx_L1_error))
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1686, __pyx_L1_error)
  __pyx_v_n_hits = __pyx_t_1;

  /* "km3pipe/dataclasses.pyx":1687
 *     def __str__(self):
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''             # <<<<<<<<<<<<<<
 *         return("TimesliceHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 */
  __Pyx_TraceLine(1687,0,__PYX_ERR(0, 1687, __pyx_L1_error))
  __pyx_t_4 = ((__pyx_v_n_hits > 1) != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_4 = ((__pyx_v_n_hits == 0) != 0);
  __pyx_t_3 = __pyx_t_4;
  __pyx_L3_bool_binop_done:;
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_n_s_s);
    __pyx_t_2 = __pyx_n_s_s;
  } else {
    __Pyx_INCREF(__pyx_kp_s__88);
    __pyx_t_2 = __pyx_kp_s__88;
  }
  __pyx_v_plural = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1688
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 *         return("TimesliceHitSeries with {0} hit{1}.".format(len(self), plural))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(1688,0,__PYX_ERR(0, 1688, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_TimesliceHitSeries_with_0_hit_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1688, __pyx_L1_error)
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1688, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1688, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_plural);
    __Pyx_GIVEREF(__pyx_v_plural);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_plural);
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1685
 *         return self.__class__(self._arr[index], self.slice_id, self.frame_id)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_plural);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1690
 *         return("TimesliceHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_35__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_34__repr__[] = "TimesliceHitSeries.__repr__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_35__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_35__repr__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_34__repr__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_35__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_34__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_34__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__178)
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 1690, 0, __PYX_ERR(0, 1690, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1691
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(1691,0,__PYX_ERR(0, 1691, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1691, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1691, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1690
 *         return("TimesliceHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1693
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_37__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_36__insp__[] = "TimesliceHitSeries.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_37__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_37__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18TimesliceHitSeries_36__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18TimesliceHitSeries_37__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_36__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18TimesliceHitSeries_36__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_hit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__179)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 1693, 0, __PYX_ERR(0, 1693, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1694
 * 
 *     def __insp__(self):
 *         return '\n'.join([str(hit) for hit in self._hits])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(1694,0,__PYX_ERR(0, 1694, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hits); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1694, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1694, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1694, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1694, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1694, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_hit, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_hit);
    __Pyx_GIVEREF(__pyx_v_hit);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_hit);
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1694, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__91, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1693
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TimesliceHitSeries.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_hit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1723
 *     ])
 * 
 *     def __init__(self, tracks, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._bjorkeny = None
 *         self._dir = None
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries___init__[] = "McTrackSeries.__init__(self, tracks, event_id, h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_tracks = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_tracks,&__pyx_n_s_event_id,&__pyx_n_s_h5loc,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tracks)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); __PYX_ERR(0, 1723, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); __PYX_ERR(0, 1723, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1723, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_tracks = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_h5loc = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1723, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries___init__(__pyx_self, __pyx_v_self, __pyx_v_tracks, __pyx_v_event_id, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tracks, PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__180)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 1723, 0, __PYX_ERR(0, 1723, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1724
 * 
 *     def __init__(self, tracks, event_id, h5loc='/'):
 *         self._bjorkeny = None             # <<<<<<<<<<<<<<
 *         self._dir = None
 *         self._energy = None
 */
  __Pyx_TraceLine(1724,0,__PYX_ERR(0, 1724, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_bjorkeny_2, Py_None) < 0) __PYX_ERR(0, 1724, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1725
 *     def __init__(self, tracks, event_id, h5loc='/'):
 *         self._bjorkeny = None
 *         self._dir = None             # <<<<<<<<<<<<<<
 *         self._energy = None
 *         self._highest_energetic_muon = None
 */
  __Pyx_TraceLine(1725,0,__PYX_ERR(0, 1725, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dir_2, Py_None) < 0) __PYX_ERR(0, 1725, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1726
 *         self._bjorkeny = None
 *         self._dir = None
 *         self._energy = None             # <<<<<<<<<<<<<<
 *         self._highest_energetic_muon = None
 *         self._id = None
 */
  __Pyx_TraceLine(1726,0,__PYX_ERR(0, 1726, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_energy_2, Py_None) < 0) __PYX_ERR(0, 1726, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1727
 *         self._dir = None
 *         self._energy = None
 *         self._highest_energetic_muon = None             # <<<<<<<<<<<<<<
 *         self._id = None
 *         self._index = 0
 */
  __Pyx_TraceLine(1727,0,__PYX_ERR(0, 1727, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_highest_energetic_muon, Py_None) < 0) __PYX_ERR(0, 1727, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1728
 *         self._energy = None
 *         self._highest_energetic_muon = None
 *         self._id = None             # <<<<<<<<<<<<<<
 *         self._index = 0
 *         self._interaction_channel = None
 */
  __Pyx_TraceLine(1728,0,__PYX_ERR(0, 1728, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_id_2, Py_None) < 0) __PYX_ERR(0, 1728, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1729
 *         self._highest_energetic_muon = None
 *         self._id = None
 *         self._index = 0             # <<<<<<<<<<<<<<
 *         self._interaction_channel = None
 *         self._is_cc = None
 */
  __Pyx_TraceLine(1729,0,__PYX_ERR(0, 1729, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_int_0) < 0) __PYX_ERR(0, 1729, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1730
 *         self._id = None
 *         self._index = 0
 *         self._interaction_channel = None             # <<<<<<<<<<<<<<
 *         self._is_cc = None
 *         self._length = None
 */
  __Pyx_TraceLine(1730,0,__PYX_ERR(0, 1730, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_interaction_channel_2, Py_None) < 0) __PYX_ERR(0, 1730, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1731
 *         self._index = 0
 *         self._interaction_channel = None
 *         self._is_cc = None             # <<<<<<<<<<<<<<
 *         self._length = None
 *         self._pos = None
 */
  __Pyx_TraceLine(1731,0,__PYX_ERR(0, 1731, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_is_cc_2, Py_None) < 0) __PYX_ERR(0, 1731, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1732
 *         self._interaction_channel = None
 *         self._is_cc = None
 *         self._length = None             # <<<<<<<<<<<<<<
 *         self._pos = None
 *         self._time = None
 */
  __Pyx_TraceLine(1732,0,__PYX_ERR(0, 1732, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_length_2, Py_None) < 0) __PYX_ERR(0, 1732, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1733
 *         self._is_cc = None
 *         self._length = None
 *         self._pos = None             # <<<<<<<<<<<<<<
 *         self._time = None
 *         self._tracks = tracks
 */
  __Pyx_TraceLine(1733,0,__PYX_ERR(0, 1733, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pos_2, Py_None) < 0) __PYX_ERR(0, 1733, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1734
 *         self._length = None
 *         self._pos = None
 *         self._time = None             # <<<<<<<<<<<<<<
 *         self._tracks = tracks
 *         self._type = None
 */
  __Pyx_TraceLine(1734,0,__PYX_ERR(0, 1734, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_time_2, Py_None) < 0) __PYX_ERR(0, 1734, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1735
 *         self._pos = None
 *         self._time = None
 *         self._tracks = tracks             # <<<<<<<<<<<<<<
 *         self._type = None
 *         self.event_id = event_id
 */
  __Pyx_TraceLine(1735,0,__PYX_ERR(0, 1735, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2, __pyx_v_tracks) < 0) __PYX_ERR(0, 1735, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1736
 *         self._time = None
 *         self._tracks = tracks
 *         self._type = None             # <<<<<<<<<<<<<<
 *         self.event_id = event_id
 *         self.h5loc = h5loc
 */
  __Pyx_TraceLine(1736,0,__PYX_ERR(0, 1736, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_type_2, Py_None) < 0) __PYX_ERR(0, 1736, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1737
 *         self._tracks = tracks
 *         self._type = None
 *         self.event_id = event_id             # <<<<<<<<<<<<<<
 *         self.h5loc = h5loc
 * 
 */
  __Pyx_TraceLine(1737,0,__PYX_ERR(0, 1737, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_event_id, __pyx_v_event_id) < 0) __PYX_ERR(0, 1737, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1738
 *         self._type = None
 *         self.event_id = event_id
 *         self.h5loc = h5loc             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1738,0,__PYX_ERR(0, 1738, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 1738, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1723
 *     ])
 * 
 *     def __init__(self, tracks, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._bjorkeny = None
 *         self._dir = None
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1741
 * 
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):             # <<<<<<<<<<<<<<
 *         return cls([McTrack(cls.get_usr_name(t, str('by'), 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_3from_aanet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_2from_aanet[] = "McTrackSeries.from_aanet(cls, tracks, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_3from_aanet = {"from_aanet", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_3from_aanet, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_2from_aanet};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_3from_aanet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_tracks = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_aanet (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_tracks,&__pyx_n_s_event_id,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tracks)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, 1); __PYX_ERR(0, 1741, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, 2); __PYX_ERR(0, 1741, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_aanet") < 0)) __PYX_ERR(0, 1741, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_cls = values[0];
    __pyx_v_tracks = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1741, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.from_aanet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_2from_aanet(__pyx_self, __pyx_v_cls, __pyx_v_tracks, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_2from_aanet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_tracks, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__181)
  __Pyx_RefNannySetupContext("from_aanet", 0);
  __Pyx_TraceCall("from_aanet", __pyx_f[0], 1741, 0, __PYX_ERR(0, 1741, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1742
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):
 *         return cls([McTrack(cls.get_usr_name(t, str('by'), 1),               # bjorkeny             # <<<<<<<<<<<<<<
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 *                           t.E,
 */
  __Pyx_TraceLine(1742,0,__PYX_ERR(0, 1742, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "km3pipe/dataclasses.pyx":1763
 *                           t.type,
 *                           )
 *                     for t in tracks], event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1763,0,__PYX_ERR(0, 1763, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_tracks)) || PyTuple_CheckExact(__pyx_v_tracks)) {
    __pyx_t_3 = __pyx_v_tracks; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_tracks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1763, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1763, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1763, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1763, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1763, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1763, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":1742
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):
 *         return cls([McTrack(cls.get_usr_name(t, str('by'), 1),               # bjorkeny             # <<<<<<<<<<<<<<
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 *                           t.E,
 */
    __Pyx_TraceLine(1742,0,__PYX_ERR(0, 1742, __pyx_L1_error))
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_get_usr_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_tuple__182, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_t, __pyx_t_8, __pyx_int_1};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1742, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_t, __pyx_t_8, __pyx_int_1};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1742, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_11 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1742, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (__pyx_t_9) {
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
      }
      __Pyx_INCREF(__pyx_v_t);
      __Pyx_GIVEREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_t);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_int_1);
      __pyx_t_8 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1742, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":1743
 *     def from_aanet(cls, tracks, event_id):
 *         return cls([McTrack(cls.get_usr_name(t, str('by'), 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),             # <<<<<<<<<<<<<<
 *                           t.E,
 *                           t.id,
 */
    __Pyx_TraceLine(1743,0,__PYX_ERR(0, 1743, __pyx_L1_error))
    __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_Direction); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_x); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_y); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_z); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_13);
    __pyx_t_9 = 0;
    __pyx_t_12 = 0;
    __pyx_t_13 = 0;
    __pyx_t_13 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_11, function);
      }
    }
    if (!__pyx_t_13) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1743, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_11)) {
        PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_8};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1743, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
        PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_8};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1743, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1743, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __pyx_t_13 = NULL;
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1743, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "km3pipe/dataclasses.pyx":1744
 *         return cls([McTrack(cls.get_usr_name(t, str('by'), 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 *                           t.E,             # <<<<<<<<<<<<<<
 *                           t.id,
 *                           cls.get_usr_name(t, str('ichan'), 2),               # ichan
 */
    __Pyx_TraceLine(1744,0,__PYX_ERR(0, 1744, __pyx_L1_error))
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_E); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);

    /* "km3pipe/dataclasses.pyx":1745
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 *                           t.E,
 *                           t.id,             # <<<<<<<<<<<<<<
 *                           cls.get_usr_name(t, str('ichan'), 2),               # ichan
 *                           IS_CC[cls.get_usr_name(t, str('cc'), 0)],        # is_cc
 */
    __Pyx_TraceLine(1745,0,__PYX_ERR(0, 1745, __pyx_L1_error))
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_id); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);

    /* "km3pipe/dataclasses.pyx":1746
 *                           t.E,
 *                           t.id,
 *                           cls.get_usr_name(t, str('ichan'), 2),               # ichan             # <<<<<<<<<<<<<<
 *                           IS_CC[cls.get_usr_name(t, str('cc'), 0)],        # is_cc
 *                           cls.get_len(t),
 */
    __Pyx_TraceLine(1746,0,__PYX_ERR(0, 1746, __pyx_L1_error))
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_get_usr_name); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_tuple__183, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_14 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
      __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
      if (likely(__pyx_t_14)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_13, function);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_13)) {
      PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_v_t, __pyx_t_9, __pyx_int_2};
      __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1746, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
      PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_v_t, __pyx_t_9, __pyx_int_2};
      __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1746, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_15 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1746, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      if (__pyx_t_14) {
        __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __pyx_t_14 = NULL;
      }
      __Pyx_INCREF(__pyx_v_t);
      __Pyx_GIVEREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_10, __pyx_v_t);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_10, __pyx_t_9);
      __Pyx_INCREF(__pyx_int_2);
      __Pyx_GIVEREF(__pyx_int_2);
      PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_10, __pyx_int_2);
      __pyx_t_9 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_15, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1746, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    }
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "km3pipe/dataclasses.pyx":1747
 *                           t.id,
 *                           cls.get_usr_name(t, str('ichan'), 2),               # ichan
 *                           IS_CC[cls.get_usr_name(t, str('cc'), 0)],        # is_cc             # <<<<<<<<<<<<<<
 *                           cls.get_len(t),
 *                           Position((t.pos.x, t.pos.y, t.pos.z)),
 */
    __Pyx_TraceLine(1747,0,__PYX_ERR(0, 1747, __pyx_L1_error))
    __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_IS_CC); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_get_usr_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_tuple__184, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_16 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_16)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_16);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_v_t, __pyx_t_14, __pyx_int_0};
      __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1747, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_v_t, __pyx_t_14, __pyx_int_0};
      __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1747, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    } else
    #endif
    {
      __pyx_t_17 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1747, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      if (__pyx_t_16) {
        __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL;
      }
      __Pyx_INCREF(__pyx_v_t);
      __Pyx_GIVEREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_10, __pyx_v_t);
      __Pyx_GIVEREF(__pyx_t_14);
      PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_10, __pyx_t_14);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_17, 2+__pyx_t_10, __pyx_int_0);
      __pyx_t_14 = 0;
      __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_17, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1747, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_GetItem(__pyx_t_13, __pyx_t_15); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

    /* "km3pipe/dataclasses.pyx":1748
 *                           cls.get_usr_name(t, str('ichan'), 2),               # ichan
 *                           IS_CC[cls.get_usr_name(t, str('cc'), 0)],        # is_cc
 *                           cls.get_len(t),             # <<<<<<<<<<<<<<
 *                           Position((t.pos.x, t.pos.y, t.pos.z)),
 *                           t.t,
 */
    __Pyx_TraceLine(1748,0,__PYX_ERR(0, 1748, __pyx_L1_error))
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_get_len); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_17 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
      __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_13);
      if (likely(__pyx_t_17)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_13, function);
      }
    }
    if (!__pyx_t_17) {
      __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_v_t); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1748, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_13)) {
        PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_v_t};
        __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1748, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_GOTREF(__pyx_t_15);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
        PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_v_t};
        __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1748, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_GOTREF(__pyx_t_15);
      } else
      #endif
      {
        __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1748, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_17); __pyx_t_17 = NULL;
        __Pyx_INCREF(__pyx_v_t);
        __Pyx_GIVEREF(__pyx_v_t);
        PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_v_t);
        __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_14, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1748, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "km3pipe/dataclasses.pyx":1749
 *                           IS_CC[cls.get_usr_name(t, str('cc'), 0)],        # is_cc
 *                           cls.get_len(t),
 *                           Position((t.pos.x, t.pos.y, t.pos.z)),             # <<<<<<<<<<<<<<
 *                           t.t,
 *                           # This is a nasty bug. It is not completely clear
 */
    __Pyx_TraceLine(1749,0,__PYX_ERR(0, 1749, __pyx_L1_error))
    __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_Position); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_x); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_y); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_z); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_17 = PyTuple_New(3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_19);
    PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_t_19);
    __pyx_t_16 = 0;
    __pyx_t_18 = 0;
    __pyx_t_19 = 0;
    __pyx_t_19 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
      __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_14);
      if (likely(__pyx_t_19)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_19);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_14, function);
      }
    }
    if (!__pyx_t_19) {
      __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_17); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1749, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_GOTREF(__pyx_t_13);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_14)) {
        PyObject *__pyx_temp[2] = {__pyx_t_19, __pyx_t_17};
        __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1749, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
        PyObject *__pyx_temp[2] = {__pyx_t_19, __pyx_t_17};
        __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1749, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      } else
      #endif
      {
        __pyx_t_18 = PyTuple_New(1+1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1749, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_19); __pyx_t_19 = NULL;
        __Pyx_GIVEREF(__pyx_t_17);
        PyTuple_SET_ITEM(__pyx_t_18, 0+1, __pyx_t_17);
        __pyx_t_17 = 0;
        __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_18, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1749, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

    /* "km3pipe/dataclasses.pyx":1750
 *                           cls.get_len(t),
 *                           Position((t.pos.x, t.pos.y, t.pos.z)),
 *                           t.t,             # <<<<<<<<<<<<<<
 *                           # This is a nasty bug. It is not completely clear
 *                           # if this is supposed to be PDG or Geant convention.
 */
    __Pyx_TraceLine(1750,0,__PYX_ERR(0, 1750, __pyx_L1_error))
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_t); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);

    /* "km3pipe/dataclasses.pyx":1761
 *                           #
 *                           # geant2pdg(t.type))
 *                           t.type,             # <<<<<<<<<<<<<<
 *                           )
 *                     for t in tracks], event_id)
 */
    __Pyx_TraceLine(1761,0,__PYX_ERR(0, 1761, __pyx_L1_error))
    __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_type); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);

    /* "km3pipe/dataclasses.pyx":1742
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):
 *         return cls([McTrack(cls.get_usr_name(t, str('by'), 1),               # bjorkeny             # <<<<<<<<<<<<<<
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 *                           t.E,
 */
    __Pyx_TraceLine(1742,0,__PYX_ERR(0, 1742, __pyx_L1_error))
    __pyx_t_17 = PyTuple_New(10); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_17, 3, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_17, 4, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_17, 5, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_17, 6, __pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_17, 7, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_17, 8, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_17, 9, __pyx_t_18);
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_11 = 0;
    __pyx_t_12 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_15 = 0;
    __pyx_t_13 = 0;
    __pyx_t_14 = 0;
    __pyx_t_18 = 0;
    __pyx_t_18 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_McTrack), __pyx_t_17, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_18))) __PYX_ERR(0, 1742, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

    /* "km3pipe/dataclasses.pyx":1763
 *                           t.type,
 *                           )
 *                     for t in tracks], event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(1763,0,__PYX_ERR(0, 1763, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_3 = __pyx_v_cls; __pyx_t_18 = NULL;
  __pyx_t_10 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_18)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_18);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_10 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_18, __pyx_t_2, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1742, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_18, __pyx_t_2, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1742, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_17 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    if (__pyx_t_18) {
      __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_18); __pyx_t_18 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_10, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_10, __pyx_v_event_id);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1741
 * 
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):             # <<<<<<<<<<<<<<
 *         return cls([McTrack(cls.get_usr_name(t, str('by'), 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.from_aanet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1766
 * 
 *     @classmethod
 *     def from_arrays(cls,             # <<<<<<<<<<<<<<
 *                     bjorkenys,
 *                     directions_x,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_5from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_4from_arrays[] = "McTrackSeries.from_arrays(cls, bjorkenys, directions_x, directions_y, directions_z, energies, ids, interaction_channels, is_ccs, lengths, positions_x, positions_y, positions_z, times, types, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_5from_arrays = {"from_arrays", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_5from_arrays, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_4from_arrays};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_5from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_bjorkenys = 0;
  PyObject *__pyx_v_directions_x = 0;
  PyObject *__pyx_v_directions_y = 0;
  PyObject *__pyx_v_directions_z = 0;
  PyObject *__pyx_v_energies = 0;
  PyObject *__pyx_v_ids = 0;
  PyObject *__pyx_v_interaction_channels = 0;
  PyObject *__pyx_v_is_ccs = 0;
  PyObject *__pyx_v_lengths = 0;
  PyObject *__pyx_v_positions_x = 0;
  PyObject *__pyx_v_positions_y = 0;
  PyObject *__pyx_v_positions_z = 0;
  PyObject *__pyx_v_times = 0;
  PyObject *__pyx_v_types = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_bjorkenys,&__pyx_n_s_directions_x,&__pyx_n_s_directions_y,&__pyx_n_s_directions_z,&__pyx_n_s_energies,&__pyx_n_s_ids,&__pyx_n_s_interaction_channels,&__pyx_n_s_is_ccs,&__pyx_n_s_lengths,&__pyx_n_s_positions_x,&__pyx_n_s_positions_y,&__pyx_n_s_positions_z,&__pyx_n_s_times,&__pyx_n_s_types,&__pyx_n_s_event_id,0};
    PyObject* values[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        CYTHON_FALLTHROUGH;
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bjorkenys)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 1); __PYX_ERR(0, 1766, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_directions_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 2); __PYX_ERR(0, 1766, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_directions_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 3); __PYX_ERR(0, 1766, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_directions_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 4); __PYX_ERR(0, 1766, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_energies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 5); __PYX_ERR(0, 1766, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 6); __PYX_ERR(0, 1766, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_interaction_channels)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 7); __PYX_ERR(0, 1766, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_is_ccs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 8); __PYX_ERR(0, 1766, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lengths)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 9); __PYX_ERR(0, 1766, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (likely((values[10] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_positions_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 10); __PYX_ERR(0, 1766, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 11:
        if (likely((values[11] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_positions_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 11); __PYX_ERR(0, 1766, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 12:
        if (likely((values[12] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_positions_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 12); __PYX_ERR(0, 1766, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 13:
        if (likely((values[13] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_times)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 13); __PYX_ERR(0, 1766, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 14:
        if (likely((values[14] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_types)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 14); __PYX_ERR(0, 1766, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 15:
        if (likely((values[15] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 15); __PYX_ERR(0, 1766, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_arrays") < 0)) __PYX_ERR(0, 1766, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 16) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
      values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
      values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
      values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
      values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
      values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
      values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
      values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
    }
    __pyx_v_cls = values[0];
    __pyx_v_bjorkenys = values[1];
    __pyx_v_directions_x = values[2];
    __pyx_v_directions_y = values[3];
    __pyx_v_directions_z = values[4];
    __pyx_v_energies = values[5];
    __pyx_v_ids = values[6];
    __pyx_v_interaction_channels = values[7];
    __pyx_v_is_ccs = values[8];
    __pyx_v_lengths = values[9];
    __pyx_v_positions_x = values[10];
    __pyx_v_positions_y = values[11];
    __pyx_v_positions_z = values[12];
    __pyx_v_times = values[13];
    __pyx_v_types = values[14];
    __pyx_v_event_id = values[15];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1766, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_4from_arrays(__pyx_self, __pyx_v_cls, __pyx_v_bjorkenys, __pyx_v_directions_x, __pyx_v_directions_y, __pyx_v_directions_z, __pyx_v_energies, __pyx_v_ids, __pyx_v_interaction_channels, __pyx_v_is_ccs, __pyx_v_lengths, __pyx_v_positions_x, __pyx_v_positions_y, __pyx_v_positions_z, __pyx_v_times, __pyx_v_types, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_4from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_bjorkenys, PyObject *__pyx_v_directions_x, PyObject *__pyx_v_directions_y, PyObject *__pyx_v_directions_z, PyObject *__pyx_v_energies, PyObject *__pyx_v_ids, PyObject *__pyx_v_interaction_channels, PyObject *__pyx_v_is_ccs, PyObject *__pyx_v_lengths, PyObject *__pyx_v_positions_x, PyObject *__pyx_v_positions_y, PyObject *__pyx_v_positions_z, PyObject *__pyx_v_times, PyObject *__pyx_v_types, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_directions = NULL;
  PyObject *__pyx_v_positions = NULL;
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_tracks = NULL;
  PyObject *__pyx_v_track_args = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  __Pyx_TraceFrameInit(__pyx_codeobj__185)
  __Pyx_RefNannySetupContext("from_arrays", 0);
  __Pyx_TraceCall("from_arrays", __pyx_f[0], 1766, 0, __PYX_ERR(0, 1766, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1783
 *                     event_id,
 *                     ):
 *         directions = np.column_stack((directions_x, directions_y,             # <<<<<<<<<<<<<<
 *                                       directions_z))
 *         positions = np.column_stack((positions_x, positions_y,
 */
  __Pyx_TraceLine(1783,0,__PYX_ERR(0, 1783, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_column_stack); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1784
 *                     ):
 *         directions = np.column_stack((directions_x, directions_y,
 *                                       directions_z))             # <<<<<<<<<<<<<<
 *         positions = np.column_stack((positions_x, positions_y,
 *                                      positions_z))
 */
  __Pyx_TraceLine(1784,0,__PYX_ERR(0, 1784, __pyx_L1_error))
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_directions_x);
  __Pyx_GIVEREF(__pyx_v_directions_x);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_directions_x);
  __Pyx_INCREF(__pyx_v_directions_y);
  __Pyx_GIVEREF(__pyx_v_directions_y);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_directions_y);
  __Pyx_INCREF(__pyx_v_directions_z);
  __Pyx_GIVEREF(__pyx_v_directions_z);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_directions_z);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1783, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1783, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1783, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_directions = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1785
 *         directions = np.column_stack((directions_x, directions_y,
 *                                       directions_z))
 *         positions = np.column_stack((positions_x, positions_y,             # <<<<<<<<<<<<<<
 *                                      positions_z))
 *         args = bjorkenys, directions, energies, \
 */
  __Pyx_TraceLine(1785,0,__PYX_ERR(0, 1785, __pyx_L1_error))
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_column_stack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1786
 *                                       directions_z))
 *         positions = np.column_stack((positions_x, positions_y,
 *                                      positions_z))             # <<<<<<<<<<<<<<
 *         args = bjorkenys, directions, energies, \
 *             ids, interaction_channels, is_ccs, lengths, positions, \
 */
  __Pyx_TraceLine(1786,0,__PYX_ERR(0, 1786, __pyx_L1_error))
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_positions_x);
  __Pyx_GIVEREF(__pyx_v_positions_x);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_positions_x);
  __Pyx_INCREF(__pyx_v_positions_y);
  __Pyx_GIVEREF(__pyx_v_positions_y);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_positions_y);
  __Pyx_INCREF(__pyx_v_positions_z);
  __Pyx_GIVEREF(__pyx_v_positions_z);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_positions_z);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1785, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1785, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1785, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_positions = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1787
 *         positions = np.column_stack((positions_x, positions_y,
 *                                      positions_z))
 *         args = bjorkenys, directions, energies, \             # <<<<<<<<<<<<<<
 *             ids, interaction_channels, is_ccs, lengths, positions, \
 *             times, types
 */
  __Pyx_TraceLine(1787,0,__PYX_ERR(0, 1787, __pyx_L1_error))
  __pyx_t_1 = PyTuple_New(10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_bjorkenys);
  __Pyx_GIVEREF(__pyx_v_bjorkenys);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_bjorkenys);
  __Pyx_INCREF(__pyx_v_directions);
  __Pyx_GIVEREF(__pyx_v_directions);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_directions);
  __Pyx_INCREF(__pyx_v_energies);
  __Pyx_GIVEREF(__pyx_v_energies);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_energies);
  __Pyx_INCREF(__pyx_v_ids);
  __Pyx_GIVEREF(__pyx_v_ids);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_ids);
  __Pyx_INCREF(__pyx_v_interaction_channels);
  __Pyx_GIVEREF(__pyx_v_interaction_channels);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_interaction_channels);
  __Pyx_INCREF(__pyx_v_is_ccs);
  __Pyx_GIVEREF(__pyx_v_is_ccs);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_is_ccs);
  __Pyx_INCREF(__pyx_v_lengths);
  __Pyx_GIVEREF(__pyx_v_lengths);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_v_lengths);
  __Pyx_INCREF(__pyx_v_positions);
  __Pyx_GIVEREF(__pyx_v_positions);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_v_positions);
  __Pyx_INCREF(__pyx_v_times);
  __Pyx_GIVEREF(__pyx_v_times);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_v_times);
  __Pyx_INCREF(__pyx_v_types);
  __Pyx_GIVEREF(__pyx_v_types);
  PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_v_types);
  __pyx_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1790
 *             ids, interaction_channels, is_ccs, lengths, positions, \
 *             times, types
 *         tracks = cls([McTrack(*track_args) for track_args in zip(*args)],             # <<<<<<<<<<<<<<
 *                      event_id)
 *         tracks._bjorkeny = bjorkenys
 */
  __Pyx_TraceLine(1790,0,__PYX_ERR(0, 1790, __pyx_L1_error))
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1790, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1790, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1790, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1790, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1790, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_7(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1790, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_track_args, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_track_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_McTrack), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1790, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1791
 *             times, types
 *         tracks = cls([McTrack(*track_args) for track_args in zip(*args)],
 *                      event_id)             # <<<<<<<<<<<<<<
 *         tracks._bjorkeny = bjorkenys
 *         tracks._dir = zip(directions_x, directions_y, directions_z)
 */
  __Pyx_TraceLine(1791,0,__PYX_ERR(0, 1791, __pyx_L1_error))
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_3 = __pyx_v_cls; __pyx_t_2 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1790, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1790, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_8, __pyx_t_5);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_8, __pyx_v_event_id);
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_tracks = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1792
 *         tracks = cls([McTrack(*track_args) for track_args in zip(*args)],
 *                      event_id)
 *         tracks._bjorkeny = bjorkenys             # <<<<<<<<<<<<<<
 *         tracks._dir = zip(directions_x, directions_y, directions_z)
 *         tracks._energy = energies
 */
  __Pyx_TraceLine(1792,0,__PYX_ERR(0, 1792, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_bjorkeny_2, __pyx_v_bjorkenys) < 0) __PYX_ERR(0, 1792, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1793
 *                      event_id)
 *         tracks._bjorkeny = bjorkenys
 *         tracks._dir = zip(directions_x, directions_y, directions_z)             # <<<<<<<<<<<<<<
 *         tracks._energy = energies
 *         tracks._id = ids
 */
  __Pyx_TraceLine(1793,0,__PYX_ERR(0, 1793, __pyx_L1_error))
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_directions_x);
  __Pyx_GIVEREF(__pyx_v_directions_x);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_directions_x);
  __Pyx_INCREF(__pyx_v_directions_y);
  __Pyx_GIVEREF(__pyx_v_directions_y);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_directions_y);
  __Pyx_INCREF(__pyx_v_directions_z);
  __Pyx_GIVEREF(__pyx_v_directions_z);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_directions_z);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_dir_2, __pyx_t_3) < 0) __PYX_ERR(0, 1793, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1794
 *         tracks._bjorkeny = bjorkenys
 *         tracks._dir = zip(directions_x, directions_y, directions_z)
 *         tracks._energy = energies             # <<<<<<<<<<<<<<
 *         tracks._id = ids
 *         tracks._interaction_channel = interaction_channels
 */
  __Pyx_TraceLine(1794,0,__PYX_ERR(0, 1794, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_energy_2, __pyx_v_energies) < 0) __PYX_ERR(0, 1794, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1795
 *         tracks._dir = zip(directions_x, directions_y, directions_z)
 *         tracks._energy = energies
 *         tracks._id = ids             # <<<<<<<<<<<<<<
 *         tracks._interaction_channel = interaction_channels
 *         tracks._is_cc = is_ccs
 */
  __Pyx_TraceLine(1795,0,__PYX_ERR(0, 1795, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_id_2, __pyx_v_ids) < 0) __PYX_ERR(0, 1795, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1796
 *         tracks._energy = energies
 *         tracks._id = ids
 *         tracks._interaction_channel = interaction_channels             # <<<<<<<<<<<<<<
 *         tracks._is_cc = is_ccs
 *         tracks._length = lengths
 */
  __Pyx_TraceLine(1796,0,__PYX_ERR(0, 1796, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_interaction_channel_2, __pyx_v_interaction_channels) < 0) __PYX_ERR(0, 1796, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1797
 *         tracks._id = ids
 *         tracks._interaction_channel = interaction_channels
 *         tracks._is_cc = is_ccs             # <<<<<<<<<<<<<<
 *         tracks._length = lengths
 *         tracks._pos = zip(positions_x, positions_y, positions_z)
 */
  __Pyx_TraceLine(1797,0,__PYX_ERR(0, 1797, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_is_cc_2, __pyx_v_is_ccs) < 0) __PYX_ERR(0, 1797, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1798
 *         tracks._interaction_channel = interaction_channels
 *         tracks._is_cc = is_ccs
 *         tracks._length = lengths             # <<<<<<<<<<<<<<
 *         tracks._pos = zip(positions_x, positions_y, positions_z)
 *         tracks._time = times
 */
  __Pyx_TraceLine(1798,0,__PYX_ERR(0, 1798, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_length_2, __pyx_v_lengths) < 0) __PYX_ERR(0, 1798, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1799
 *         tracks._is_cc = is_ccs
 *         tracks._length = lengths
 *         tracks._pos = zip(positions_x, positions_y, positions_z)             # <<<<<<<<<<<<<<
 *         tracks._time = times
 *         tracks._type = types
 */
  __Pyx_TraceLine(1799,0,__PYX_ERR(0, 1799, __pyx_L1_error))
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_positions_x);
  __Pyx_GIVEREF(__pyx_v_positions_x);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_positions_x);
  __Pyx_INCREF(__pyx_v_positions_y);
  __Pyx_GIVEREF(__pyx_v_positions_y);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_positions_y);
  __Pyx_INCREF(__pyx_v_positions_z);
  __Pyx_GIVEREF(__pyx_v_positions_z);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_positions_z);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_pos_2, __pyx_t_1) < 0) __PYX_ERR(0, 1799, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1800
 *         tracks._length = lengths
 *         tracks._pos = zip(positions_x, positions_y, positions_z)
 *         tracks._time = times             # <<<<<<<<<<<<<<
 *         tracks._type = types
 *         return tracks
 */
  __Pyx_TraceLine(1800,0,__PYX_ERR(0, 1800, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_time_2, __pyx_v_times) < 0) __PYX_ERR(0, 1800, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1801
 *         tracks._pos = zip(positions_x, positions_y, positions_z)
 *         tracks._time = times
 *         tracks._type = types             # <<<<<<<<<<<<<<
 *         return tracks
 * 
 */
  __Pyx_TraceLine(1801,0,__PYX_ERR(0, 1801, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_type_2, __pyx_v_types) < 0) __PYX_ERR(0, 1801, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1802
 *         tracks._time = times
 *         tracks._type = types
 *         return tracks             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1802,0,__PYX_ERR(0, 1802, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_tracks);
  __pyx_r = __pyx_v_tracks;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1766
 * 
 *     @classmethod
 *     def from_arrays(cls,             # <<<<<<<<<<<<<<
 *                     bjorkenys,
 *                     directions_x,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_directions);
  __Pyx_XDECREF(__pyx_v_positions);
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_tracks);
  __Pyx_XDECREF(__pyx_v_track_args);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1805
 * 
 *     @classmethod
 *     def from_km3df(cls, km3df):             # <<<<<<<<<<<<<<
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 *                               event_id=int(km3df['event_id']))
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_7from_km3df(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_6from_km3df[] = "McTrackSeries.from_km3df(cls, km3df)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_7from_km3df = {"from_km3df", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_7from_km3df, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_6from_km3df};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_7from_km3df(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_km3df = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_km3df (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_km3df,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_km3df)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_km3df", 1, 2, 2, 1); __PYX_ERR(0, 1805, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_km3df") < 0)) __PYX_ERR(0, 1805, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_cls = values[0];
    __pyx_v_km3df = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_km3df", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1805, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.from_km3df", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_6from_km3df(__pyx_self, __pyx_v_cls, __pyx_v_km3df);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_6from_km3df(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_km3df) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__186)
  __Pyx_RefNannySetupContext("from_km3df", 0);
  __Pyx_TraceCall("from_km3df", __pyx_f[0], 1805, 0, __PYX_ERR(0, 1805, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1806
 *     @classmethod
 *     def from_km3df(cls, km3df):
 *         return cls.from_table(km3df.conv_to(to='numpy'),             # <<<<<<<<<<<<<<
 *                               event_id=int(km3df['event_id']))
 * 
 */
  __Pyx_TraceLine(1806,0,__PYX_ERR(0, 1806, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_km3df, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 1806, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1807
 *     def from_km3df(cls, km3df):
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 *                               event_id=int(km3df['event_id']))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1807,0,__PYX_ERR(0, 1807, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_GetItem(__pyx_v_km3df, __pyx_n_s_event_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_event_id, __pyx_t_5) < 0) __PYX_ERR(0, 1807, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":1806
 *     @classmethod
 *     def from_km3df(cls, km3df):
 *         return cls.from_table(km3df.conv_to(to='numpy'),             # <<<<<<<<<<<<<<
 *                               event_id=int(km3df['event_id']))
 * 
 */
  __Pyx_TraceLine(1806,0,__PYX_ERR(0, 1806, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1805
 * 
 *     @classmethod
 *     def from_km3df(cls, km3df):             # <<<<<<<<<<<<<<
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 *                               event_id=int(km3df['event_id']))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.from_km3df", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1810
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         return cls([McTrack(
 *             row['bjorkeny'],
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_9from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_8from_table[] = "McTrackSeries.from_table(cls, table, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_9from_table = {"from_table", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_9from_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_8from_table};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_9from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_table = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_table,&__pyx_n_s_event_id,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_table)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, 1); __PYX_ERR(0, 1810, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, 2); __PYX_ERR(0, 1810, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_table") < 0)) __PYX_ERR(0, 1810, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_cls = values[0];
    __pyx_v_table = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1810, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_8from_table(__pyx_self, __pyx_v_cls, __pyx_v_table, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_8from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_t_19;
  __Pyx_TraceFrameInit(__pyx_codeobj__187)
  __Pyx_RefNannySetupContext("from_table", 0);
  __Pyx_TraceCall("from_table", __pyx_f[0], 1810, 0, __PYX_ERR(0, 1810, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1811
 *     @classmethod
 *     def from_table(cls, table, event_id):
 *         return cls([McTrack(             # <<<<<<<<<<<<<<
 *             row['bjorkeny'],
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),
 */
  __Pyx_TraceLine(1811,0,__PYX_ERR(0, 1811, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "km3pipe/dataclasses.pyx":1822
 *             row['time'],
 *             row['type']
 *         ) for row in table], event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1822,0,__PYX_ERR(0, 1822, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_table)) || PyTuple_CheckExact(__pyx_v_table)) {
    __pyx_t_3 = __pyx_v_table; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_table); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1822, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1822, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1822, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1822, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1822, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1822, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":1812
 *     def from_table(cls, table, event_id):
 *         return cls([McTrack(
 *             row['bjorkeny'],             # <<<<<<<<<<<<<<
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),
 *             row['energy'],
 */
    __Pyx_TraceLine(1812,0,__PYX_ERR(0, 1812, __pyx_L1_error))
    __pyx_t_6 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_bjorkeny); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);

    /* "km3pipe/dataclasses.pyx":1813
 *         return cls([McTrack(
 *             row['bjorkeny'],
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),             # <<<<<<<<<<<<<<
 *             row['energy'],
 *             row['id'],
 */
    __Pyx_TraceLine(1813,0,__PYX_ERR(0, 1813, __pyx_L1_error))
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dir_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dir_y); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dir_z); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_11);
    __pyx_t_8 = 0;
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    __pyx_t_11 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    if (!__pyx_t_11) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1813, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_12};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1813, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_12};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1813, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1813, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL;
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_12);
        __pyx_t_12 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1813, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "km3pipe/dataclasses.pyx":1814
 *             row['bjorkeny'],
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),
 *             row['energy'],             # <<<<<<<<<<<<<<
 *             row['id'],
 *             row['interaction_channel'],
 */
    __Pyx_TraceLine(1814,0,__PYX_ERR(0, 1814, __pyx_L1_error))
    __pyx_t_9 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_energy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "km3pipe/dataclasses.pyx":1815
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),
 *             row['energy'],
 *             row['id'],             # <<<<<<<<<<<<<<
 *             row['interaction_channel'],
 *             row['is_cc'],
 */
    __Pyx_TraceLine(1815,0,__PYX_ERR(0, 1815, __pyx_L1_error))
    __pyx_t_10 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_id); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "km3pipe/dataclasses.pyx":1816
 *             row['energy'],
 *             row['id'],
 *             row['interaction_channel'],             # <<<<<<<<<<<<<<
 *             row['is_cc'],
 *             row['length'],
 */
    __Pyx_TraceLine(1816,0,__PYX_ERR(0, 1816, __pyx_L1_error))
    __pyx_t_12 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_interaction_channel); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);

    /* "km3pipe/dataclasses.pyx":1817
 *             row['id'],
 *             row['interaction_channel'],
 *             row['is_cc'],             # <<<<<<<<<<<<<<
 *             row['length'],
 *             np.array((row['pos_x'], row['pos_y'], row['pos_z'],)),
 */
    __Pyx_TraceLine(1817,0,__PYX_ERR(0, 1817, __pyx_L1_error))
    __pyx_t_11 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_is_cc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);

    /* "km3pipe/dataclasses.pyx":1818
 *             row['interaction_channel'],
 *             row['is_cc'],
 *             row['length'],             # <<<<<<<<<<<<<<
 *             np.array((row['pos_x'], row['pos_y'], row['pos_z'],)),
 *             row['time'],
 */
    __Pyx_TraceLine(1818,0,__PYX_ERR(0, 1818, __pyx_L1_error))
    __pyx_t_8 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_length); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "km3pipe/dataclasses.pyx":1819
 *             row['is_cc'],
 *             row['length'],
 *             np.array((row['pos_x'], row['pos_y'], row['pos_z'],)),             # <<<<<<<<<<<<<<
 *             row['time'],
 *             row['type']
 */
    __Pyx_TraceLine(1819,0,__PYX_ERR(0, 1819, __pyx_L1_error))
    __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_array_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pos_x); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_16 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pos_y); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_17 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pos_z); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_18 = PyTuple_New(3); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_17);
    __pyx_t_14 = 0;
    __pyx_t_16 = 0;
    __pyx_t_17 = 0;
    __pyx_t_17 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
      __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_15);
      if (likely(__pyx_t_17)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_15, function);
      }
    }
    if (!__pyx_t_17) {
      __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_18); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1819, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_GOTREF(__pyx_t_13);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_15)) {
        PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_t_18};
        __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1819, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
        PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_t_18};
        __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1819, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      } else
      #endif
      {
        __pyx_t_16 = PyTuple_New(1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1819, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_17); __pyx_t_17 = NULL;
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_16, 0+1, __pyx_t_18);
        __pyx_t_18 = 0;
        __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_16, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1819, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

    /* "km3pipe/dataclasses.pyx":1820
 *             row['length'],
 *             np.array((row['pos_x'], row['pos_y'], row['pos_z'],)),
 *             row['time'],             # <<<<<<<<<<<<<<
 *             row['type']
 *         ) for row in table], event_id)
 */
    __Pyx_TraceLine(1820,0,__PYX_ERR(0, 1820, __pyx_L1_error))
    __pyx_t_15 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_time); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);

    /* "km3pipe/dataclasses.pyx":1821
 *             np.array((row['pos_x'], row['pos_y'], row['pos_z'],)),
 *             row['time'],
 *             row['type']             # <<<<<<<<<<<<<<
 *         ) for row in table], event_id)
 * 
 */
    __Pyx_TraceLine(1821,0,__PYX_ERR(0, 1821, __pyx_L1_error))
    __pyx_t_16 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_type); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);

    /* "km3pipe/dataclasses.pyx":1811
 *     @classmethod
 *     def from_table(cls, table, event_id):
 *         return cls([McTrack(             # <<<<<<<<<<<<<<
 *             row['bjorkeny'],
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),
 */
    __Pyx_TraceLine(1811,0,__PYX_ERR(0, 1811, __pyx_L1_error))
    __pyx_t_18 = PyTuple_New(10); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_18, 4, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_18, 5, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_18, 6, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_18, 7, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_18, 8, __pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_18, 9, __pyx_t_16);
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_12 = 0;
    __pyx_t_11 = 0;
    __pyx_t_8 = 0;
    __pyx_t_13 = 0;
    __pyx_t_15 = 0;
    __pyx_t_16 = 0;
    __pyx_t_16 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_McTrack), __pyx_t_18, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_16))) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

    /* "km3pipe/dataclasses.pyx":1822
 *             row['time'],
 *             row['type']
 *         ) for row in table], event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(1822,0,__PYX_ERR(0, 1822, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_3 = __pyx_v_cls; __pyx_t_16 = NULL;
  __pyx_t_19 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_16)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_16);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_19 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_2, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_2, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_18 = PyTuple_New(2+__pyx_t_19); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    if (__pyx_t_16) {
      __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_16); __pyx_t_16 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_19, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_19, __pyx_v_event_id);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1810
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         return cls([McTrack(
 *             row['bjorkeny'],
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1825
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_11deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_10deserialise[] = "McTrackSeries.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_11deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_11deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_10deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_11deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 1825, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1825, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_10deserialise(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_10deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__188)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 1825, 0, __PYX_ERR(0, 1825, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1826
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(1826,0,__PYX_ERR(0, 1826, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1825
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1828
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_13serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_12serialise[] = "McTrackSeries.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_13serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_13serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_12serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_13serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 1828, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1828, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_12serialise(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_12serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__189)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 1828, 0, __PYX_ERR(0, 1828, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1829
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1829,0,__PYX_ERR(0, 1829, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1828
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1832
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data, event_id)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_15conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_14conv_from[] = "McTrackSeries.conv_from(cls, data, event_id, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_15conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_15conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_14conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_15conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_event_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 1); __PYX_ERR(0, 1832, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 2); __PYX_ERR(0, 1832, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 1832, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1832, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_14conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_event_id, __pyx_v_fmt, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_14conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__190)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 1832, 0, __PYX_ERR(0, 1832, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1833
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data, event_id)
 * 
 */
  __Pyx_TraceLine(1833,0,__PYX_ERR(0, 1833, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1833, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1834
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 *             return cls.from_table(data, event_id)             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(1834,0,__PYX_ERR(0, 1834, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_table); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_event_id};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1834, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_event_id};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1834, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
      __Pyx_INCREF(__pyx_v_event_id);
      __Pyx_GIVEREF(__pyx_v_event_id);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_event_id);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1833
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data, event_id)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1832
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data, event_id)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1836
 *             return cls.from_table(data, event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_17conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_16conv_to[] = "McTrackSeries.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_17conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_17conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_16conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_17conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 1836, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1836, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_16conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_16conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__191)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 1836, 0, __PYX_ERR(0, 1836, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1837
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  __Pyx_TraceLine(1837,0,__PYX_ERR(0, 1837, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1837, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1838
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return self.__array__()             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(1838,0,__PYX_ERR(0, 1838, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1838, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1838, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1837
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":1839
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(1839,0,__PYX_ERR(0, 1839, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1839, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1840
 *             return self.__array__()
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(1840,0,__PYX_ERR(0, 1840, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 1840, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_t_3) < 0) __PYX_ERR(0, 1840, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1839
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":1836
 *             return cls.from_table(data, event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1842
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_19__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_18__array__[] = "McTrackSeries.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_19__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_19__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_18__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_19__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_18__array__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_18__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__192)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 1842, 0, __PYX_ERR(0, 1842, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1843
 * 
 *     def __array__(self):
 *         return np.array([(             # <<<<<<<<<<<<<<
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 *             t.id, t.interaction_channel, t.is_cc,
 */
  __Pyx_TraceLine(1843,0,__PYX_ERR(0, 1843, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "km3pipe/dataclasses.pyx":1848
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 *             self.event_id,
 *         ) for t in self._tracks], dtype=self.dtype)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1848,0,__PYX_ERR(0, 1848, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1848, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1848, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1848, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1848, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1848, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1848, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "km3pipe/dataclasses.pyx":1844
 *     def __array__(self):
 *         return np.array([(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,             # <<<<<<<<<<<<<<
 *             t.id, t.interaction_channel, t.is_cc,
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 */
    __Pyx_TraceLine(1844,0,__PYX_ERR(0, 1844, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_bjorkeny); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_7, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_energy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "km3pipe/dataclasses.pyx":1845
 *         return np.array([(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 *             t.id, t.interaction_channel, t.is_cc,             # <<<<<<<<<<<<<<
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 *             self.event_id,
 */
    __Pyx_TraceLine(1845,0,__PYX_ERR(0, 1845, __pyx_L1_error))
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_id); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_interaction_channel); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_is_cc); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);

    /* "km3pipe/dataclasses.pyx":1846
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 *             t.id, t.interaction_channel, t.is_cc,
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,             # <<<<<<<<<<<<<<
 *             self.event_id,
 *         ) for t in self._tracks], dtype=self.dtype)
 */
    __Pyx_TraceLine(1846,0,__PYX_ERR(0, 1846, __pyx_L1_error))
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_length); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_15, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_17 = __Pyx_GetItemInt(__pyx_t_15, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_15, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_time); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_type); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);

    /* "km3pipe/dataclasses.pyx":1847
 *             t.id, t.interaction_channel, t.is_cc,
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 *             self.event_id,             # <<<<<<<<<<<<<<
 *         ) for t in self._tracks], dtype=self.dtype)
 * 
 */
    __Pyx_TraceLine(1847,0,__PYX_ERR(0, 1847, __pyx_L1_error))
    __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_event_id); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);

    /* "km3pipe/dataclasses.pyx":1844
 *     def __array__(self):
 *         return np.array([(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,             # <<<<<<<<<<<<<<
 *             t.id, t.interaction_channel, t.is_cc,
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 */
    __Pyx_TraceLine(1844,0,__PYX_ERR(0, 1844, __pyx_L1_error))
    __pyx_t_21 = PyTuple_New(15); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_21, 2, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_21, 3, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_21, 4, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_21, 5, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_21, 6, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_21, 7, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_21, 8, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_21, 9, __pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_21, 10, __pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_21, 11, __pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_21, 12, __pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_19);
    PyTuple_SET_ITEM(__pyx_t_21, 13, __pyx_t_19);
    __Pyx_GIVEREF(__pyx_t_20);
    PyTuple_SET_ITEM(__pyx_t_21, 14, __pyx_t_20);
    __pyx_t_3 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_7 = 0;
    __pyx_t_11 = 0;
    __pyx_t_12 = 0;
    __pyx_t_13 = 0;
    __pyx_t_14 = 0;
    __pyx_t_16 = 0;
    __pyx_t_17 = 0;
    __pyx_t_18 = 0;
    __pyx_t_15 = 0;
    __pyx_t_19 = 0;
    __pyx_t_20 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_21))) __PYX_ERR(0, 1843, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

    /* "km3pipe/dataclasses.pyx":1848
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 *             self.event_id,
 *         ) for t in self._tracks], dtype=self.dtype)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(1848,0,__PYX_ERR(0, 1848, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1843
 * 
 *     def __array__(self):
 *         return np.array([(             # <<<<<<<<<<<<<<
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 *             t.id, t.interaction_channel, t.is_cc,
 */
  __Pyx_TraceLine(1843,0,__PYX_ERR(0, 1843, __pyx_L1_error))
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1848
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 *             self.event_id,
 *         ) for t in self._tracks], dtype=self.dtype)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1848,0,__PYX_ERR(0, 1848, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_21) < 0) __PYX_ERR(0, 1848, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "km3pipe/dataclasses.pyx":1843
 * 
 *     def __array__(self):
 *         return np.array([(             # <<<<<<<<<<<<<<
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 *             t.id, t.interaction_channel, t.is_cc,
 */
  __Pyx_TraceLine(1843,0,__PYX_ERR(0, 1843, __pyx_L1_error))
  __pyx_t_21 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_21;
  __pyx_t_21 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1842
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1851
 * 
 *     @classmethod
 *     def get_len(cls, track):             # <<<<<<<<<<<<<<
 *         try:
 *             return track.len
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_21get_len(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_20get_len[] = "McTrackSeries.get_len(cls, track)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_21get_len = {"get_len", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_21get_len, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_20get_len};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_21get_len(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_track = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_len (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_track,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_track)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_len", 1, 2, 2, 1); __PYX_ERR(0, 1851, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_len") < 0)) __PYX_ERR(0, 1851, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_cls = values[0];
    __pyx_v_track = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_len", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1851, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.get_len", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_20get_len(__pyx_self, __pyx_v_cls, __pyx_v_track);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_20get_len(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_track) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__193)
  __Pyx_RefNannySetupContext("get_len", 0);
  __Pyx_TraceCall("get_len", __pyx_f[0], 1851, 0, __PYX_ERR(0, 1851, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1852
 *     @classmethod
 *     def get_len(cls, track):
 *         try:             # <<<<<<<<<<<<<<
 *             return track.len
 *         except AttributeError:
 */
  __Pyx_TraceLine(1852,0,__PYX_ERR(0, 1852, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":1853
 *     def get_len(cls, track):
 *         try:
 *             return track.len             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             return 0
 */
      __Pyx_TraceLine(1853,0,__PYX_ERR(0, 1853, __pyx_L3_error))
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_track, __pyx_n_s_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1853, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "km3pipe/dataclasses.pyx":1852
 *     @classmethod
 *     def get_len(cls, track):
 *         try:             # <<<<<<<<<<<<<<
 *             return track.len
 *         except AttributeError:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":1854
 *         try:
 *             return track.len
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             return 0
 * 
 */
    __Pyx_TraceLine(1854,0,__PYX_ERR(0, 1854, __pyx_L5_except_error))
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.get_len", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1854, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "km3pipe/dataclasses.pyx":1855
 *             return track.len
 *         except AttributeError:
 *             return 0             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
      __Pyx_TraceLine(1855,0,__PYX_ERR(0, 1855, __pyx_L5_except_error))
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_int_0);
      __pyx_r = __pyx_int_0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "km3pipe/dataclasses.pyx":1852
 *     @classmethod
 *     def get_len(cls, track):
 *         try:             # <<<<<<<<<<<<<<
 *             return track.len
 *         except AttributeError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "km3pipe/dataclasses.pyx":1851
 * 
 *     @classmethod
 *     def get_len(cls, track):             # <<<<<<<<<<<<<<
 *         try:
 *             return track.len
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.get_len", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1858
 * 
 *     @classmethod
 *     def get_usr_item(cls, track, index=None):             # <<<<<<<<<<<<<<
 *         try:
 *             item = track.usr[index]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_23get_usr_item(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_22get_usr_item[] = "McTrackSeries.get_usr_item(cls, track, index=None)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_23get_usr_item = {"get_usr_item", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_23get_usr_item, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_22get_usr_item};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_23get_usr_item(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_track = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_usr_item (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_track,&__pyx_n_s_index,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_track)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_usr_item", 0, 2, 3, 1); __PYX_ERR(0, 1858, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_usr_item") < 0)) __PYX_ERR(0, 1858, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_track = values[1];
    __pyx_v_index = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_usr_item", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1858, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.get_usr_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_22get_usr_item(__pyx_self, __pyx_v_cls, __pyx_v_track, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_22get_usr_item(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_track, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__194)
  __Pyx_RefNannySetupContext("get_usr_item", 0);
  __Pyx_TraceCall("get_usr_item", __pyx_f[0], 1858, 0, __PYX_ERR(0, 1858, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1859
 *     @classmethod
 *     def get_usr_item(cls, track, index=None):
 *         try:             # <<<<<<<<<<<<<<
 *             item = track.usr[index]
 *         except IndexError:
 */
  __Pyx_TraceLine(1859,0,__PYX_ERR(0, 1859, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":1860
 *     def get_usr_item(cls, track, index=None):
 *         try:
 *             item = track.usr[index]             # <<<<<<<<<<<<<<
 *         except IndexError:
 *             item = 0.
 */
      __Pyx_TraceLine(1860,0,__PYX_ERR(0, 1860, __pyx_L3_error))
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_track, __pyx_n_s_usr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1860, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_v_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1860, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_item = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "km3pipe/dataclasses.pyx":1859
 *     @classmethod
 *     def get_usr_item(cls, track, index=None):
 *         try:             # <<<<<<<<<<<<<<
 *             item = track.usr[index]
 *         except IndexError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":1861
 *         try:
 *             item = track.usr[index]
 *         except IndexError:             # <<<<<<<<<<<<<<
 *             item = 0.
 *         return item
 */
    __Pyx_TraceLine(1861,0,__PYX_ERR(0, 1861, __pyx_L5_except_error))
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.get_usr_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 1861, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);

      /* "km3pipe/dataclasses.pyx":1862
 *             item = track.usr[index]
 *         except IndexError:
 *             item = 0.             # <<<<<<<<<<<<<<
 *         return item
 * 
 */
      __Pyx_TraceLine(1862,0,__PYX_ERR(0, 1862, __pyx_L5_except_error))
      __Pyx_INCREF(__pyx_float_0_);
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_float_0_);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "km3pipe/dataclasses.pyx":1859
 *     @classmethod
 *     def get_usr_item(cls, track, index=None):
 *         try:             # <<<<<<<<<<<<<<
 *             item = track.usr[index]
 *         except IndexError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "km3pipe/dataclasses.pyx":1863
 *         except IndexError:
 *             item = 0.
 *         return item             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(1863,0,__PYX_ERR(0, 1863, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_item);
  __pyx_r = __pyx_v_item;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1858
 * 
 *     @classmethod
 *     def get_usr_item(cls, track, index=None):             # <<<<<<<<<<<<<<
 *         try:
 *             item = track.usr[index]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.get_usr_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1866
 * 
 *     @classmethod
 *     def get_usr_name(cls, track, name, index=None):             # <<<<<<<<<<<<<<
 *         """Try to retrieve item based on name from aanet.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_25get_usr_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_24get_usr_name[] = "McTrackSeries.get_usr_name(cls, track, name, index=None)\nTry to retrieve item based on name from aanet.\n\n        If that fails (old aanet), try getting it via index.\n        ";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_25get_usr_name = {"get_usr_name", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_25get_usr_name, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_24get_usr_name};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_25get_usr_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_track = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_usr_name (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_track,&__pyx_n_s_name,&__pyx_n_s_index,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_track)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_usr_name", 0, 3, 4, 1); __PYX_ERR(0, 1866, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_usr_name", 0, 3, 4, 2); __PYX_ERR(0, 1866, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_usr_name") < 0)) __PYX_ERR(0, 1866, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_track = values[1];
    __pyx_v_name = values[2];
    __pyx_v_index = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_usr_name", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1866, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.get_usr_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_24get_usr_name(__pyx_self, __pyx_v_cls, __pyx_v_track, __pyx_v_name, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_24get_usr_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_track, PyObject *__pyx_v_name, PyObject *__pyx_v_index) {
  Py_ssize_t __pyx_v_name_len;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__195)
  __Pyx_RefNannySetupContext("get_usr_name", 0);
  __Pyx_TraceCall("get_usr_name", __pyx_f[0], 1866, 0, __PYX_ERR(0, 1866, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1871
 *         If that fails (old aanet), try getting it via index.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             name_len = len(track.usr_names)
 *         except AttributeError:
 */
  __Pyx_TraceLine(1871,0,__PYX_ERR(0, 1871, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":1872
 *         """
 *         try:
 *             name_len = len(track.usr_names)             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             name_len = 0
 */
      __Pyx_TraceLine(1872,0,__PYX_ERR(0, 1872, __pyx_L3_error))
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_track, __pyx_n_s_usr_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1872, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1872, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_name_len = __pyx_t_5;

      /* "km3pipe/dataclasses.pyx":1871
 *         If that fails (old aanet), try getting it via index.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             name_len = len(track.usr_names)
 *         except AttributeError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":1873
 *         try:
 *             name_len = len(track.usr_names)
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             name_len = 0
 *             if len(track.usr) > name_len:
 */
    __Pyx_TraceLine(1873,0,__PYX_ERR(0, 1873, __pyx_L5_except_error))
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.get_usr_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 1873, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "km3pipe/dataclasses.pyx":1874
 *             name_len = len(track.usr_names)
 *         except AttributeError:
 *             name_len = 0             # <<<<<<<<<<<<<<
 *             if len(track.usr) > name_len:
 *                 return cls.get_usr_item(track, index)
 */
      __Pyx_TraceLine(1874,0,__PYX_ERR(0, 1874, __pyx_L5_except_error))
      __pyx_v_name_len = 0;

      /* "km3pipe/dataclasses.pyx":1875
 *         except AttributeError:
 *             name_len = 0
 *             if len(track.usr) > name_len:             # <<<<<<<<<<<<<<
 *                 return cls.get_usr_item(track, index)
 *         try:
 */
      __Pyx_TraceLine(1875,0,__PYX_ERR(0, 1875, __pyx_L5_except_error))
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_track, __pyx_n_s_usr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1875, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_5 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1875, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = ((__pyx_t_5 > __pyx_v_name_len) != 0);
      if (__pyx_t_10) {

        /* "km3pipe/dataclasses.pyx":1876
 *             name_len = 0
 *             if len(track.usr) > name_len:
 *                 return cls.get_usr_item(track, index)             # <<<<<<<<<<<<<<
 *         try:
 *             out = track.getusr(name)
 */
        __Pyx_TraceLine(1876,0,__PYX_ERR(0, 1876, __pyx_L5_except_error))
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_get_usr_item); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1876, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = NULL;
        __pyx_t_6 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
            __pyx_t_6 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_11)) {
          PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_track, __pyx_v_index};
          __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1876, __pyx_L5_except_error)
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_GOTREF(__pyx_t_9);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
          PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_track, __pyx_v_index};
          __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1876, __pyx_L5_except_error)
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_GOTREF(__pyx_t_9);
        } else
        #endif
        {
          __pyx_t_13 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1876, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_13);
          if (__pyx_t_12) {
            __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
          }
          __Pyx_INCREF(__pyx_v_track);
          __Pyx_GIVEREF(__pyx_v_track);
          PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_6, __pyx_v_track);
          __Pyx_INCREF(__pyx_v_index);
          __Pyx_GIVEREF(__pyx_v_index);
          PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_6, __pyx_v_index);
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1876, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_r = __pyx_t_9;
        __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L6_except_return;

        /* "km3pipe/dataclasses.pyx":1875
 *         except AttributeError:
 *             name_len = 0
 *             if len(track.usr) > name_len:             # <<<<<<<<<<<<<<
 *                 return cls.get_usr_item(track, index)
 *         try:
 */
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "km3pipe/dataclasses.pyx":1871
 *         If that fails (old aanet), try getting it via index.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             name_len = len(track.usr_names)
 *         except AttributeError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "km3pipe/dataclasses.pyx":1877
 *             if len(track.usr) > name_len:
 *                 return cls.get_usr_item(track, index)
 *         try:             # <<<<<<<<<<<<<<
 *             out = track.getusr(name)
 *         except (AttributeError, KeyError):
 */
  __Pyx_TraceLine(1877,0,__PYX_ERR(0, 1877, __pyx_L12_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_1);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":1878
 *                 return cls.get_usr_item(track, index)
 *         try:
 *             out = track.getusr(name)             # <<<<<<<<<<<<<<
 *         except (AttributeError, KeyError):
 *             out = 0
 */
      __Pyx_TraceLine(1878,0,__PYX_ERR(0, 1878, __pyx_L12_error))
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_track, __pyx_n_s_getusr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1878, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1878, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_8);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_name};
          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1878, __pyx_L12_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_8);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_name};
          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1878, __pyx_L12_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_8);
        } else
        #endif
        {
          __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1878, __pyx_L12_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_name);
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1878, __pyx_L12_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_out = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "km3pipe/dataclasses.pyx":1877
 *             if len(track.usr) > name_len:
 *                 return cls.get_usr_item(track, index)
 *         try:             # <<<<<<<<<<<<<<
 *             out = track.getusr(name)
 *         except (AttributeError, KeyError):
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L17_try_end;
    __pyx_L12_error:;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "km3pipe/dataclasses.pyx":1879
 *         try:
 *             out = track.getusr(name)
 *         except (AttributeError, KeyError):             # <<<<<<<<<<<<<<
 *             out = 0
 *             return out
 */
    __Pyx_TraceLine(1879,0,__PYX_ERR(0, 1879, __pyx_L14_except_error))
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.get_usr_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_9) < 0) __PYX_ERR(0, 1879, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_9);

      /* "km3pipe/dataclasses.pyx":1880
 *             out = track.getusr(name)
 *         except (AttributeError, KeyError):
 *             out = 0             # <<<<<<<<<<<<<<
 *             return out
 * 
 */
      __Pyx_TraceLine(1880,0,__PYX_ERR(0, 1880, __pyx_L14_except_error))
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_XDECREF_SET(__pyx_v_out, __pyx_int_0);

      /* "km3pipe/dataclasses.pyx":1881
 *         except (AttributeError, KeyError):
 *             out = 0
 *             return out             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
      __Pyx_TraceLine(1881,0,__PYX_ERR(0, 1881, __pyx_L14_except_error))
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_out);
      __pyx_r = __pyx_v_out;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L15_except_return;
    }
    goto __pyx_L14_except_error;
    __pyx_L14_except_error:;

    /* "km3pipe/dataclasses.pyx":1877
 *             if len(track.usr) > name_len:
 *                 return cls.get_usr_item(track, index)
 *         try:             # <<<<<<<<<<<<<<
 *             out = track.getusr(name)
 *         except (AttributeError, KeyError):
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    goto __pyx_L1_error;
    __pyx_L15_except_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    goto __pyx_L0;
    __pyx_L17_try_end:;
  }

  /* "km3pipe/dataclasses.pyx":1866
 * 
 *     @classmethod
 *     def get_usr_name(cls, track, name, index=None):             # <<<<<<<<<<<<<<
 *         """Try to retrieve item based on name from aanet.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.get_usr_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1884
 * 
 *     @property
 *     def highest_energetic_muon(self):             # <<<<<<<<<<<<<<
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_27highest_energetic_muon(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_26highest_energetic_muon[] = "McTrackSeries.highest_energetic_muon(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_27highest_energetic_muon = {"highest_energetic_muon", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_27highest_energetic_muon, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_26highest_energetic_muon};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_27highest_energetic_muon(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("highest_energetic_muon (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_26highest_energetic_muon(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1889
 *             if len(muons) == 0:
 *                 raise AttributeError("No muon found")
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)             # <<<<<<<<<<<<<<
 *         return self._highest_energetic_muon
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_22highest_energetic_muon_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_m); /*proto*/
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_22highest_energetic_muon_lambda1 = {"lambda1", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_22highest_energetic_muon_lambda1, METH_O, 0};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_22highest_energetic_muon_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_m) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, ((PyObject *)__pyx_v_m));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_m) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("lambda1", 0);
  __Pyx_TraceCall("lambda1", __pyx_f[0], 1889, 0, __PYX_ERR(0, 1889, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_energy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.highest_energetic_muon.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1884
 * 
 *     @property
 *     def highest_energetic_muon(self):             # <<<<<<<<<<<<<<
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 */

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_26highest_energetic_muon(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_muons = NULL;
  PyObject *__pyx_v_track = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__196)
  __Pyx_RefNannySetupContext("highest_energetic_muon", 0);
  __Pyx_TraceCall("highest_energetic_muon", __pyx_f[0], 1884, 0, __PYX_ERR(0, 1884, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1885
 *     @property
 *     def highest_energetic_muon(self):
 *         if self._highest_energetic_muon is None:             # <<<<<<<<<<<<<<
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:
 */
  __Pyx_TraceLine(1885,0,__PYX_ERR(0, 1885, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_highest_energetic_muon); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1886
 *     def highest_energetic_muon(self):
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]             # <<<<<<<<<<<<<<
 *             if len(muons) == 0:
 *                 raise AttributeError("No muon found")
 */
    __Pyx_TraceLine(1886,0,__PYX_ERR(0, 1886, __pyx_L1_error))
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_self)) || PyTuple_CheckExact(__pyx_v_self)) {
      __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1886, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1886, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1886, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1886, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1886, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1886, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        }
      } else {
        __pyx_t_7 = __pyx_t_6(__pyx_t_4);
        if (unlikely(!__pyx_t_7)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1886, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF_SET(__pyx_v_track, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_track, __pyx_n_s_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1886, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyNumber_Absolute(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1886, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyInt_EqObjC(__pyx_t_8, __pyx_int_13, 13, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1886, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1886, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_3) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_track))) __PYX_ERR(0, 1886, __pyx_L1_error)
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_muons = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1887
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:             # <<<<<<<<<<<<<<
 *                 raise AttributeError("No muon found")
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)
 */
    __Pyx_TraceLine(1887,0,__PYX_ERR(0, 1887, __pyx_L1_error))
    __pyx_t_5 = PyList_GET_SIZE(__pyx_v_muons); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1887, __pyx_L1_error)
    __pyx_t_3 = ((__pyx_t_5 == 0) != 0);
    if (__pyx_t_3) {

      /* "km3pipe/dataclasses.pyx":1888
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:
 *                 raise AttributeError("No muon found")             # <<<<<<<<<<<<<<
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)
 *         return self._highest_energetic_muon
 */
      __Pyx_TraceLine(1888,0,__PYX_ERR(0, 1888, __pyx_L1_error))
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__197, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 1888, __pyx_L1_error)

      /* "km3pipe/dataclasses.pyx":1887
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:             # <<<<<<<<<<<<<<
 *                 raise AttributeError("No muon found")
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)
 */
    }

    /* "km3pipe/dataclasses.pyx":1889
 *             if len(muons) == 0:
 *                 raise AttributeError("No muon found")
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)             # <<<<<<<<<<<<<<
 *         return self._highest_energetic_muon
 * 
 */
    __Pyx_TraceLine(1889,0,__PYX_ERR(0, 1889, __pyx_L1_error))
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_muons);
    __Pyx_GIVEREF(__pyx_v_muons);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_muons);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_22highest_energetic_muon_lambda1, 0, __pyx_n_s_McTrackSeries_highest_energetic, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_key, __pyx_t_7) < 0) __PYX_ERR(0, 1889, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_max, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_highest_energetic_muon, __pyx_t_7) < 0) __PYX_ERR(0, 1889, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":1885
 *     @property
 *     def highest_energetic_muon(self):
 *         if self._highest_energetic_muon is None:             # <<<<<<<<<<<<<<
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:
 */
  }

  /* "km3pipe/dataclasses.pyx":1890
 *                 raise AttributeError("No muon found")
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)
 *         return self._highest_energetic_muon             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_TraceLine(1890,0,__PYX_ERR(0, 1890, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_highest_energetic_muon); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1884
 * 
 *     @property
 *     def highest_energetic_muon(self):             # <<<<<<<<<<<<<<
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.highest_energetic_muon", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_muons);
  __Pyx_XDECREF(__pyx_v_track);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1892
 *         return self._highest_energetic_muon
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_29__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_28__iter__[] = "McTrackSeries.__iter__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_29__iter__ = {"__iter__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_29__iter__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_28__iter__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_29__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_28__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_28__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__198)
  __Pyx_RefNannySetupContext("__iter__", 0);
  __Pyx_TraceCall("__iter__", __pyx_f[0], 1892, 0, __PYX_ERR(0, 1892, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1893
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_TraceLine(1893,0,__PYX_ERR(0, 1893, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1892
 *         return self._highest_energetic_muon
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1895
 *         return self
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_31__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_30__iter__[] = "McTrackSeries.__iter__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_31__iter__ = {"__iter__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_31__iter__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_30__iter__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_31__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_30__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_30__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__199)
  __Pyx_RefNannySetupContext("__iter__", 0);
  __Pyx_TraceCall("__iter__", __pyx_f[0], 1895, 0, __PYX_ERR(0, 1895, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1896
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1896,0,__PYX_ERR(0, 1896, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1895
 *         return self
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1899
 * 
 *     @property
 *     def bjorkeny(self):             # <<<<<<<<<<<<<<
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_33bjorkeny(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_32bjorkeny[] = "McTrackSeries.bjorkeny(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_33bjorkeny = {"bjorkeny", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_33bjorkeny, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_32bjorkeny};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_33bjorkeny(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bjorkeny (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_32bjorkeny(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_32bjorkeny(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__200)
  __Pyx_RefNannySetupContext("bjorkeny", 0);
  __Pyx_TraceCall("bjorkeny", __pyx_f[0], 1899, 0, __PYX_ERR(0, 1899, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1900
 *     @property
 *     def bjorkeny(self):
 *         if self._bjorkeny is None:             # <<<<<<<<<<<<<<
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 *         return self._bjorkeny
 */
  __Pyx_TraceLine(1900,0,__PYX_ERR(0, 1900, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_bjorkeny_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1901
 *     def bjorkeny(self):
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._bjorkeny
 * 
 */
    __Pyx_TraceLine(1901,0,__PYX_ERR(0, 1901, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1901, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1901, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1901, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1901, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1901, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1901, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_bjorkeny); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1901, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1901, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1901, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1901, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1901, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1901, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_bjorkeny_2, __pyx_t_1) < 0) __PYX_ERR(0, 1901, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1900
 *     @property
 *     def bjorkeny(self):
 *         if self._bjorkeny is None:             # <<<<<<<<<<<<<<
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 *         return self._bjorkeny
 */
  }

  /* "km3pipe/dataclasses.pyx":1902
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 *         return self._bjorkeny             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1902,0,__PYX_ERR(0, 1902, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_bjorkeny_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1899
 * 
 *     @property
 *     def bjorkeny(self):             # <<<<<<<<<<<<<<
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.bjorkeny", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1905
 * 
 *     @property
 *     def is_cc(self):             # <<<<<<<<<<<<<<
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_35is_cc(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_34is_cc[] = "McTrackSeries.is_cc(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_35is_cc = {"is_cc", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_35is_cc, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_34is_cc};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_35is_cc(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_cc (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_34is_cc(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_34is_cc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__201)
  __Pyx_RefNannySetupContext("is_cc", 0);
  __Pyx_TraceCall("is_cc", __pyx_f[0], 1905, 0, __PYX_ERR(0, 1905, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1906
 *     @property
 *     def is_cc(self):
 *         if self._is_cc is None:             # <<<<<<<<<<<<<<
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 *         return self._is_cc
 */
  __Pyx_TraceLine(1906,0,__PYX_ERR(0, 1906, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_is_cc_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1907
 *     def is_cc(self):
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._is_cc
 * 
 */
    __Pyx_TraceLine(1907,0,__PYX_ERR(0, 1907, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1907, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1907, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1907, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1907, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1907, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1907, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1907, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_is_cc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1907, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1907, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1907, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_is_cc_2, __pyx_t_1) < 0) __PYX_ERR(0, 1907, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1906
 *     @property
 *     def is_cc(self):
 *         if self._is_cc is None:             # <<<<<<<<<<<<<<
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 *         return self._is_cc
 */
  }

  /* "km3pipe/dataclasses.pyx":1908
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 *         return self._is_cc             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1908,0,__PYX_ERR(0, 1908, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_is_cc_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1905
 * 
 *     @property
 *     def is_cc(self):             # <<<<<<<<<<<<<<
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.is_cc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1911
 * 
 *     @property
 *     def interaction_channel(self):             # <<<<<<<<<<<<<<
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_37interaction_channel(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_36interaction_channel[] = "McTrackSeries.interaction_channel(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_37interaction_channel = {"interaction_channel", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_37interaction_channel, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_36interaction_channel};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_37interaction_channel(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("interaction_channel (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_36interaction_channel(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_36interaction_channel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__202)
  __Pyx_RefNannySetupContext("interaction_channel", 0);
  __Pyx_TraceCall("interaction_channel", __pyx_f[0], 1911, 0, __PYX_ERR(0, 1911, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1912
 *     @property
 *     def interaction_channel(self):
 *         if self._interaction_channel is None:             # <<<<<<<<<<<<<<
 *             self._interaction_channel = np.array([t.interaction_channel for
 *                                                   t in self._tracks])
 */
  __Pyx_TraceLine(1912,0,__PYX_ERR(0, 1912, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interaction_channel_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1913
 *     def interaction_channel(self):
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for             # <<<<<<<<<<<<<<
 *                                                   t in self._tracks])
 *         return self._interaction_channel
 */
    __Pyx_TraceLine(1913,0,__PYX_ERR(0, 1913, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "km3pipe/dataclasses.pyx":1914
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for
 *                                                   t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._interaction_channel
 * 
 */
    __Pyx_TraceLine(1914,0,__PYX_ERR(0, 1914, __pyx_L1_error))
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1914, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1914, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1914, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1914, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1914, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1914, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1914, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "km3pipe/dataclasses.pyx":1913
 *     def interaction_channel(self):
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for             # <<<<<<<<<<<<<<
 *                                                   t in self._tracks])
 *         return self._interaction_channel
 */
      __Pyx_TraceLine(1913,0,__PYX_ERR(0, 1913, __pyx_L1_error))
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_interaction_channel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1913, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1913, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1913, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_interaction_channel_2, __pyx_t_1) < 0) __PYX_ERR(0, 1913, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1912
 *     @property
 *     def interaction_channel(self):
 *         if self._interaction_channel is None:             # <<<<<<<<<<<<<<
 *             self._interaction_channel = np.array([t.interaction_channel for
 *                                                   t in self._tracks])
 */
  }

  /* "km3pipe/dataclasses.pyx":1915
 *             self._interaction_channel = np.array([t.interaction_channel for
 *                                                   t in self._tracks])
 *         return self._interaction_channel             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1915,0,__PYX_ERR(0, 1915, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interaction_channel_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1911
 * 
 *     @property
 *     def interaction_channel(self):             # <<<<<<<<<<<<<<
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.interaction_channel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1918
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_39id(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_38id[] = "McTrackSeries.id(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_39id = {"id", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_39id, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_38id};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_39id(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("id (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_38id(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_38id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__203)
  __Pyx_RefNannySetupContext("id", 0);
  __Pyx_TraceCall("id", __pyx_f[0], 1918, 0, __PYX_ERR(0, 1918, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1919
 *     @property
 *     def id(self):
 *         if self._id is None:             # <<<<<<<<<<<<<<
 *             self._id = np.array([t.id for t in self._tracks])
 *         return self._id
 */
  __Pyx_TraceLine(1919,0,__PYX_ERR(0, 1919, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_id_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1920
 *     def id(self):
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._id
 * 
 */
    __Pyx_TraceLine(1920,0,__PYX_ERR(0, 1920, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1920, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1920, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1920, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1920, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1920, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1920, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1920, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_id); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1920, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1920, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1920, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1920, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1920, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1920, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1920, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_id_2, __pyx_t_1) < 0) __PYX_ERR(0, 1920, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1919
 *     @property
 *     def id(self):
 *         if self._id is None:             # <<<<<<<<<<<<<<
 *             self._id = np.array([t.id for t in self._tracks])
 *         return self._id
 */
  }

  /* "km3pipe/dataclasses.pyx":1921
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])
 *         return self._id             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1921,0,__PYX_ERR(0, 1921, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_id_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1918
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1924
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_41time(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_40time[] = "McTrackSeries.time(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_41time = {"time", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_41time, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_40time};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_41time(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_40time(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_40time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__204)
  __Pyx_RefNannySetupContext("time", 0);
  __Pyx_TraceCall("time", __pyx_f[0], 1924, 0, __PYX_ERR(0, 1924, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1925
 *     @property
 *     def time(self):
 *         if self._time is None:             # <<<<<<<<<<<<<<
 *             self._time = np.array([t.time for t in self._tracks])
 *         return self._time
 */
  __Pyx_TraceLine(1925,0,__PYX_ERR(0, 1925, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_time_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1926
 *     def time(self):
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._time
 * 
 */
    __Pyx_TraceLine(1926,0,__PYX_ERR(0, 1926, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1926, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1926, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1926, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1926, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1926, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1926, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1926, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1926, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1926, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1926, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_time_2, __pyx_t_1) < 0) __PYX_ERR(0, 1926, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1925
 *     @property
 *     def time(self):
 *         if self._time is None:             # <<<<<<<<<<<<<<
 *             self._time = np.array([t.time for t in self._tracks])
 *         return self._time
 */
  }

  /* "km3pipe/dataclasses.pyx":1927
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])
 *         return self._time             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1927,0,__PYX_ERR(0, 1927, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_time_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1924
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1930
 * 
 *     @property
 *     def energy(self):             # <<<<<<<<<<<<<<
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_43energy(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_42energy[] = "McTrackSeries.energy(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_43energy = {"energy", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_43energy, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_42energy};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_43energy(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("energy (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_42energy(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_42energy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__205)
  __Pyx_RefNannySetupContext("energy", 0);
  __Pyx_TraceCall("energy", __pyx_f[0], 1930, 0, __PYX_ERR(0, 1930, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1931
 *     @property
 *     def energy(self):
 *         if self._energy is None:             # <<<<<<<<<<<<<<
 *             self._energy = np.array([t.energy for t in self._tracks])
 *         return self._energy
 */
  __Pyx_TraceLine(1931,0,__PYX_ERR(0, 1931, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_energy_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1932
 *     def energy(self):
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._energy
 * 
 */
    __Pyx_TraceLine(1932,0,__PYX_ERR(0, 1932, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1932, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1932, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1932, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1932, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1932, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1932, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1932, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_energy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1932, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1932, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1932, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1932, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1932, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1932, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1932, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_energy_2, __pyx_t_1) < 0) __PYX_ERR(0, 1932, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1931
 *     @property
 *     def energy(self):
 *         if self._energy is None:             # <<<<<<<<<<<<<<
 *             self._energy = np.array([t.energy for t in self._tracks])
 *         return self._energy
 */
  }

  /* "km3pipe/dataclasses.pyx":1933
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])
 *         return self._energy             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1933,0,__PYX_ERR(0, 1933, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_energy_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1930
 * 
 *     @property
 *     def energy(self):             # <<<<<<<<<<<<<<
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.energy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1936
 * 
 *     @property
 *     def length(self):             # <<<<<<<<<<<<<<
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_45length(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_44length[] = "McTrackSeries.length(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_45length = {"length", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_45length, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_44length};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_45length(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("length (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_44length(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_44length(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__206)
  __Pyx_RefNannySetupContext("length", 0);
  __Pyx_TraceCall("length", __pyx_f[0], 1936, 0, __PYX_ERR(0, 1936, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1937
 *     @property
 *     def length(self):
 *         if self._length is None:             # <<<<<<<<<<<<<<
 *             self._length = np.array([t.length for t in self._tracks])
 *         return self._length
 */
  __Pyx_TraceLine(1937,0,__PYX_ERR(0, 1937, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1938
 *     def length(self):
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._length
 * 
 */
    __Pyx_TraceLine(1938,0,__PYX_ERR(0, 1938, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1938, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1938, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1938, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1938, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1938, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1938, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1938, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1938, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1938, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1938, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1938, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1938, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1938, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1938, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_length_2, __pyx_t_1) < 0) __PYX_ERR(0, 1938, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1937
 *     @property
 *     def length(self):
 *         if self._length is None:             # <<<<<<<<<<<<<<
 *             self._length = np.array([t.length for t in self._tracks])
 *         return self._length
 */
  }

  /* "km3pipe/dataclasses.pyx":1939
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])
 *         return self._length             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1939,0,__PYX_ERR(0, 1939, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1936
 * 
 *     @property
 *     def length(self):             # <<<<<<<<<<<<<<
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.length", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1942
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_47type(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_46type[] = "McTrackSeries.type(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_47type = {"type", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_47type, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_46type};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_47type(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("type (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_46type(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_46type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__207)
  __Pyx_RefNannySetupContext("type", 0);
  __Pyx_TraceCall("type", __pyx_f[0], 1942, 0, __PYX_ERR(0, 1942, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1943
 *     @property
 *     def type(self):
 *         if self._type is None:             # <<<<<<<<<<<<<<
 *             self._type = np.array([t.type for t in self._tracks])
 *         return self._type
 */
  __Pyx_TraceLine(1943,0,__PYX_ERR(0, 1943, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_type_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1944
 *     def type(self):
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._type
 * 
 */
    __Pyx_TraceLine(1944,0,__PYX_ERR(0, 1944, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1944, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1944, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1944, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1944, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1944, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1944, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1944, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1944, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1944, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1944, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1944, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1944, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1944, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1944, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_type_2, __pyx_t_1) < 0) __PYX_ERR(0, 1944, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1943
 *     @property
 *     def type(self):
 *         if self._type is None:             # <<<<<<<<<<<<<<
 *             self._type = np.array([t.type for t in self._tracks])
 *         return self._type
 */
  }

  /* "km3pipe/dataclasses.pyx":1945
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])
 *         return self._type             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1945,0,__PYX_ERR(0, 1945, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_type_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1942
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1948
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_49pos(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_48pos[] = "McTrackSeries.pos(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_49pos = {"pos", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_49pos, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_48pos};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_49pos(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pos (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_48pos(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_48pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__208)
  __Pyx_RefNannySetupContext("pos", 0);
  __Pyx_TraceCall("pos", __pyx_f[0], 1948, 0, __PYX_ERR(0, 1948, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1949
 *     @property
 *     def pos(self):
 *         if self._pos is None:             # <<<<<<<<<<<<<<
 *             self._pos = np.array([t.pos for t in self._tracks])
 *         return self._pos
 */
  __Pyx_TraceLine(1949,0,__PYX_ERR(0, 1949, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pos_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1950
 *     def pos(self):
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._pos
 * 
 */
    __Pyx_TraceLine(1950,0,__PYX_ERR(0, 1950, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1950, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1950, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1950, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1950, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1950, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1950, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1950, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1950, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1950, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1950, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1950, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1950, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1950, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1950, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pos_2, __pyx_t_1) < 0) __PYX_ERR(0, 1950, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1949
 *     @property
 *     def pos(self):
 *         if self._pos is None:             # <<<<<<<<<<<<<<
 *             self._pos = np.array([t.pos for t in self._tracks])
 *         return self._pos
 */
  }

  /* "km3pipe/dataclasses.pyx":1951
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])
 *         return self._pos             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(1951,0,__PYX_ERR(0, 1951, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pos_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1948
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1954
 * 
 *     @property
 *     def dir(self):             # <<<<<<<<<<<<<<
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_51dir(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_50dir[] = "McTrackSeries.dir(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_51dir = {"dir", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_51dir, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_50dir};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_51dir(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dir (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_50dir(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_50dir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__209)
  __Pyx_RefNannySetupContext("dir", 0);
  __Pyx_TraceCall("dir", __pyx_f[0], 1954, 0, __PYX_ERR(0, 1954, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1955
 *     @property
 *     def dir(self):
 *         if self._dir is None:             # <<<<<<<<<<<<<<
 *             self._dir = np.array([t.dir for t in self._tracks])
 *         return self._dir
 */
  __Pyx_TraceLine(1955,0,__PYX_ERR(0, 1955, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dir_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":1956
 *     def dir(self):
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._dir
 * 
 */
    __Pyx_TraceLine(1956,0,__PYX_ERR(0, 1956, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1956, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1956, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1956, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1956, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1956, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1956, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1956, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1956, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1956, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1956, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1956, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1956, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1956, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1956, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dir_2, __pyx_t_1) < 0) __PYX_ERR(0, 1956, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":1955
 *     @property
 *     def dir(self):
 *         if self._dir is None:             # <<<<<<<<<<<<<<
 *             self._dir = np.array([t.dir for t in self._tracks])
 *         return self._dir
 */
  }

  /* "km3pipe/dataclasses.pyx":1957
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])
 *         return self._dir             # <<<<<<<<<<<<<<
 * 
 *     def next(self):
 */
  __Pyx_TraceLine(1957,0,__PYX_ERR(0, 1957, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dir_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1954
 * 
 *     @property
 *     def dir(self):             # <<<<<<<<<<<<<<
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.dir", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1959
 *         return self._dir
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_53next(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_52next[] = "McTrackSeries.next(self)\nPython 2/3 compatibility for iterators";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_53next = {"next", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_53next, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_52next};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_53next(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_52next(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_52next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__210)
  __Pyx_RefNannySetupContext("next", 0);
  __Pyx_TraceCall("next", __pyx_f[0], 1959, 0, __PYX_ERR(0, 1959, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1961
 *     def next(self):
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_TraceLine(1961,0,__PYX_ERR(0, 1961, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1961, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1961, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1959
 *         return self._dir
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1963
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_55__next__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_54__next__[] = "McTrackSeries.__next__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_55__next__ = {"__next__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_55__next__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_54__next__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_55__next__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_54__next__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_54__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_TraceFrameInit(__pyx_codeobj__211)
  __Pyx_RefNannySetupContext("__next__", 0);
  __Pyx_TraceCall("__next__", __pyx_f[0], 1963, 0, __PYX_ERR(0, 1963, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1964
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  __Pyx_TraceLine(1964,0,__PYX_ERR(0, 1964, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1964, __pyx_L1_error)
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1964, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1964, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "km3pipe/dataclasses.pyx":1965
 *     def __next__(self):
 *         if self._index >= len(self):
 *             self._index = 0             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         item = self._tracks[self._index]
 */
    __Pyx_TraceLine(1965,0,__PYX_ERR(0, 1965, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_int_0) < 0) __PYX_ERR(0, 1965, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1966
 *         if self._index >= len(self):
 *             self._index = 0
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         item = self._tracks[self._index]
 *         self._index += 1
 */
    __Pyx_TraceLine(1966,0,__PYX_ERR(0, 1966, __pyx_L1_error))
    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
    __PYX_ERR(0, 1966, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1964
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  }

  /* "km3pipe/dataclasses.pyx":1967
 *             self._index = 0
 *             raise StopIteration
 *         item = self._tracks[self._index]             # <<<<<<<<<<<<<<
 *         self._index += 1
 *         return item
 */
  __Pyx_TraceLine(1967,0,__PYX_ERR(0, 1967, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetItem(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_item = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1968
 *             raise StopIteration
 *         item = self._tracks[self._index]
 *         self._index += 1             # <<<<<<<<<<<<<<
 *         return item
 * 
 */
  __Pyx_TraceLine(1968,0,__PYX_ERR(0, 1968, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_t_3) < 0) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":1969
 *         item = self._tracks[self._index]
 *         self._index += 1
 *         return item             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(1969,0,__PYX_ERR(0, 1969, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_item);
  __pyx_r = __pyx_v_item;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1963
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1971
 *         return item
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return len(self._tracks)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_57__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_56__len__[] = "McTrackSeries.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_57__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_57__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_56__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_57__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_56__len__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_56__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  __Pyx_TraceFrameInit(__pyx_codeobj__212)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 1971, 0, __PYX_ERR(0, 1971, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1972
 * 
 *     def __len__(self):
 *         return len(self._tracks)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index):
 */
  __Pyx_TraceLine(1972,0,__PYX_ERR(0, 1972, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1972, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1971
 *         return item
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return len(self._tracks)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1974
 *         return len(self._tracks)
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._tracks[index]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_59__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_58__getitem__[] = "McTrackSeries.__getitem__(self, index)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_59__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_59__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_58__getitem__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_59__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 1974, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 1974, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1974, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_58__getitem__(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_58__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__213)
  __Pyx_RefNannySetupContext("__getitem__", 0);
  __Pyx_TraceCall("__getitem__", __pyx_f[0], 1974, 0, __PYX_ERR(0, 1974, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1975
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return self._tracks[index]
 *         elif isinstance(index, slice):
 */
  __Pyx_TraceLine(1975,0,__PYX_ERR(0, 1975, __pyx_L1_error))
  __pyx_t_1 = PyInt_Check(__pyx_v_index); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":1976
 *     def __getitem__(self, index):
 *         if isinstance(index, int):
 *             return self._tracks[index]             # <<<<<<<<<<<<<<
 *         elif isinstance(index, slice):
 *             return self._slice_generator(index)
 */
    __Pyx_TraceLine(1976,0,__PYX_ERR(0, 1976, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1975
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return self._tracks[index]
 *         elif isinstance(index, slice):
 */
  }

  /* "km3pipe/dataclasses.pyx":1977
 *         if isinstance(index, int):
 *             return self._tracks[index]
 *         elif isinstance(index, slice):             # <<<<<<<<<<<<<<
 *             return self._slice_generator(index)
 *         else:
 */
  __Pyx_TraceLine(1977,0,__PYX_ERR(0, 1977, __pyx_L1_error))
  __pyx_t_2 = PySlice_Check(__pyx_v_index); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":1978
 *             return self._tracks[index]
 *         elif isinstance(index, slice):
 *             return self._slice_generator(index)             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("index must be int or slice")
 */
    __Pyx_TraceLine(1978,0,__PYX_ERR(0, 1978, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_generator); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1978, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_index};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1978, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_index};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1978, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1978, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_index);
        __Pyx_GIVEREF(__pyx_v_index);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_index);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1978, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":1977
 *         if isinstance(index, int):
 *             return self._tracks[index]
 *         elif isinstance(index, slice):             # <<<<<<<<<<<<<<
 *             return self._slice_generator(index)
 *         else:
 */
  }

  /* "km3pipe/dataclasses.pyx":1980
 *             return self._slice_generator(index)
 *         else:
 *             raise TypeError("index must be int or slice")             # <<<<<<<<<<<<<<
 * 
 *     def _slice_generator(self, index):
 */
  __Pyx_TraceLine(1980,0,__PYX_ERR(0, 1980, __pyx_L1_error))
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__214, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1980, __pyx_L1_error)
  }

  /* "km3pipe/dataclasses.pyx":1974
 *         return len(self._tracks)
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._tracks[index]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7km3pipe_11dataclasses_13McTrackSeries_62generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "km3pipe/dataclasses.pyx":1982
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_61_slice_generator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_60_slice_generator[] = "McTrackSeries._slice_generator(self, index)\nA simple slice generator for iterations";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_61_slice_generator = {"_slice_generator", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_61_slice_generator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_60_slice_generator};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_61_slice_generator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_slice_generator (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_slice_generator", 1, 2, 2, 1); __PYX_ERR(0, 1982, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_slice_generator") < 0)) __PYX_ERR(0, 1982, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_slice_generator", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1982, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries._slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_60_slice_generator(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_60_slice_generator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_slice_generator", 0);
  __pyx_cur_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *)__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator(__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1982, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_index = __pyx_v_index;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_index);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_index);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7km3pipe_11dataclasses_13McTrackSeries_62generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_slice_generator, __pyx_n_s_McTrackSeries__slice_generator, __pyx_n_s_km3pipe_dataclasses); if (unlikely(!gen)) __PYX_ERR(0, 1982, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries._slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7km3pipe_11dataclasses_13McTrackSeries_62generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *__pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *(*__pyx_t_8)(PyObject *);
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_slice_generator", 0);
  __Pyx_TraceCall("_slice_generator", __pyx_f[0], 1982, 0, __PYX_ERR(0, 1982, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1982, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1984
 *     def _slice_generator(self, index):
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))             # <<<<<<<<<<<<<<
 *         for i in range(start, stop, step):
 *             yield self._tracks[i]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_index, __pyx_n_s_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_cur_scope->__pyx_v_self); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1984, __pyx_L1_error)
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1984, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1984, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1984, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if !CYTHON_COMPILING_IN_PYPY
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1984, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 2; __pyx_t_4 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_5), 3) < 0) __PYX_ERR(0, 1984, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1984, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_start = __pyx_t_2;
  __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_cur_scope->__pyx_v_stop = __pyx_t_6;
  __pyx_t_6 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_cur_scope->__pyx_v_step = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":1985
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):             # <<<<<<<<<<<<<<
 *             yield self._tracks[i]
 * 
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_start);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_start);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_start);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stop);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stop);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_stop);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_step);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_step);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_cur_scope->__pyx_v_step);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1985, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1985, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1985, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1985, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1985, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_8(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1985, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":1986
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):
 *             yield self._tracks[i]             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyObject_GetItem(__pyx_t_4, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_8;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_TraceReturn(__pyx_r, 0);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L8_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_8 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1986, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":1985
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):             # <<<<<<<<<<<<<<
 *             yield self._tracks[i]
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "km3pipe/dataclasses.pyx":1982
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("_slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1988
 *             yield self._tracks[i]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_64__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_63__str__[] = "McTrackSeries.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_64__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_64__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_63__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_64__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_63__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_63__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_v_n_tracks;
  PyObject *__pyx_v_plural = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__215)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 1988, 0, __PYX_ERR(0, 1988, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1989
 * 
 *     def __str__(self):
 *         n_tracks = len(self)             # <<<<<<<<<<<<<<
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 *         return("McTrackSeries with {0} track{1}.".format(len(self), plural))
 */
  __Pyx_TraceLine(1989,0,__PYX_ERR(0, 1989, __pyx_L1_error))
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1989, __pyx_L1_error)
  __pyx_v_n_tracks = __pyx_t_1;

  /* "km3pipe/dataclasses.pyx":1990
 *     def __str__(self):
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''             # <<<<<<<<<<<<<<
 *         return("McTrackSeries with {0} track{1}.".format(len(self), plural))
 * 
 */
  __Pyx_TraceLine(1990,0,__PYX_ERR(0, 1990, __pyx_L1_error))
  __pyx_t_4 = ((__pyx_v_n_tracks > 1) != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_4 = ((__pyx_v_n_tracks == 0) != 0);
  __pyx_t_3 = __pyx_t_4;
  __pyx_L3_bool_binop_done:;
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_n_s_s);
    __pyx_t_2 = __pyx_n_s_s;
  } else {
    __Pyx_INCREF(__pyx_kp_s__88);
    __pyx_t_2 = __pyx_kp_s__88;
  }
  __pyx_v_plural = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1991
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 *         return("McTrackSeries with {0} track{1}.".format(len(self), plural))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(1991,0,__PYX_ERR(0, 1991, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_McTrackSeries_with_0_track_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1991, __pyx_L1_error)
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1991, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1991, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_plural);
    __Pyx_GIVEREF(__pyx_v_plural);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_plural);
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1988
 *             yield self._tracks[i]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_plural);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1993
 *         return("McTrackSeries with {0} track{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_66__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_65__repr__[] = "McTrackSeries.__repr__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_66__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_66__repr__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_65__repr__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_66__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_65__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_65__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__216)
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 1993, 0, __PYX_ERR(0, 1993, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1994
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(1994,0,__PYX_ERR(0, 1994, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1994, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1994, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1993
 *         return("McTrackSeries with {0} track{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":1996
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(track) for track in self._tracks])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_68__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_67__insp__[] = "McTrackSeries.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_68__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_68__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_13McTrackSeries_67__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_13McTrackSeries_68__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_67__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_13McTrackSeries_67__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_track = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__217)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 1996, 0, __PYX_ERR(0, 1996, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":1997
 * 
 *     def __insp__(self):
 *         return '\n'.join([str(track) for track in self._tracks])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(1997,0,__PYX_ERR(0, 1997, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1997, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1997, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1997, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1997, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1997, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1997, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_track, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_track);
    __Pyx_GIVEREF(__pyx_v_track);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_track);
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1997, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__91, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":1996
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(track) for track in self._tracks])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.McTrackSeries.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_track);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2026
 *     ])
 * 
 *     def __init__(self, tracks, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._bjorkeny = None
 *         self._dir = None
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries___init__[] = "TrackSeries.__init__(self, tracks, event_id, h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_tracks = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_tracks,&__pyx_n_s_event_id,&__pyx_n_s_h5loc,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tracks)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); __PYX_ERR(0, 2026, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); __PYX_ERR(0, 2026, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2026, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_tracks = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_h5loc = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2026, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries___init__(__pyx_self, __pyx_v_self, __pyx_v_tracks, __pyx_v_event_id, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tracks, PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__218)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 2026, 0, __PYX_ERR(0, 2026, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2027
 * 
 *     def __init__(self, tracks, event_id, h5loc='/'):
 *         self._bjorkeny = None             # <<<<<<<<<<<<<<
 *         self._dir = None
 *         self._energy = None
 */
  __Pyx_TraceLine(2027,0,__PYX_ERR(0, 2027, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_bjorkeny_2, Py_None) < 0) __PYX_ERR(0, 2027, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2028
 *     def __init__(self, tracks, event_id, h5loc='/'):
 *         self._bjorkeny = None
 *         self._dir = None             # <<<<<<<<<<<<<<
 *         self._energy = None
 *         self._highest_energetic_muon = None
 */
  __Pyx_TraceLine(2028,0,__PYX_ERR(0, 2028, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dir_2, Py_None) < 0) __PYX_ERR(0, 2028, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2029
 *         self._bjorkeny = None
 *         self._dir = None
 *         self._energy = None             # <<<<<<<<<<<<<<
 *         self._highest_energetic_muon = None
 *         self._id = None
 */
  __Pyx_TraceLine(2029,0,__PYX_ERR(0, 2029, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_energy_2, Py_None) < 0) __PYX_ERR(0, 2029, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2030
 *         self._dir = None
 *         self._energy = None
 *         self._highest_energetic_muon = None             # <<<<<<<<<<<<<<
 *         self._id = None
 *         self._index = 0
 */
  __Pyx_TraceLine(2030,0,__PYX_ERR(0, 2030, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_highest_energetic_muon, Py_None) < 0) __PYX_ERR(0, 2030, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2031
 *         self._energy = None
 *         self._highest_energetic_muon = None
 *         self._id = None             # <<<<<<<<<<<<<<
 *         self._index = 0
 *         self._interaction_channel = None
 */
  __Pyx_TraceLine(2031,0,__PYX_ERR(0, 2031, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_id_2, Py_None) < 0) __PYX_ERR(0, 2031, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2032
 *         self._highest_energetic_muon = None
 *         self._id = None
 *         self._index = 0             # <<<<<<<<<<<<<<
 *         self._interaction_channel = None
 *         self._is_cc = None
 */
  __Pyx_TraceLine(2032,0,__PYX_ERR(0, 2032, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_int_0) < 0) __PYX_ERR(0, 2032, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2033
 *         self._id = None
 *         self._index = 0
 *         self._interaction_channel = None             # <<<<<<<<<<<<<<
 *         self._is_cc = None
 *         self._length = None
 */
  __Pyx_TraceLine(2033,0,__PYX_ERR(0, 2033, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_interaction_channel_2, Py_None) < 0) __PYX_ERR(0, 2033, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2034
 *         self._index = 0
 *         self._interaction_channel = None
 *         self._is_cc = None             # <<<<<<<<<<<<<<
 *         self._length = None
 *         self._pos = None
 */
  __Pyx_TraceLine(2034,0,__PYX_ERR(0, 2034, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_is_cc_2, Py_None) < 0) __PYX_ERR(0, 2034, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2035
 *         self._interaction_channel = None
 *         self._is_cc = None
 *         self._length = None             # <<<<<<<<<<<<<<
 *         self._pos = None
 *         self._time = None
 */
  __Pyx_TraceLine(2035,0,__PYX_ERR(0, 2035, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_length_2, Py_None) < 0) __PYX_ERR(0, 2035, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2036
 *         self._is_cc = None
 *         self._length = None
 *         self._pos = None             # <<<<<<<<<<<<<<
 *         self._time = None
 *         self._tracks = tracks
 */
  __Pyx_TraceLine(2036,0,__PYX_ERR(0, 2036, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pos_2, Py_None) < 0) __PYX_ERR(0, 2036, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2037
 *         self._length = None
 *         self._pos = None
 *         self._time = None             # <<<<<<<<<<<<<<
 *         self._tracks = tracks
 *         self._type = None
 */
  __Pyx_TraceLine(2037,0,__PYX_ERR(0, 2037, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_time_2, Py_None) < 0) __PYX_ERR(0, 2037, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2038
 *         self._pos = None
 *         self._time = None
 *         self._tracks = tracks             # <<<<<<<<<<<<<<
 *         self._type = None
 *         self.event_id = event_id
 */
  __Pyx_TraceLine(2038,0,__PYX_ERR(0, 2038, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2, __pyx_v_tracks) < 0) __PYX_ERR(0, 2038, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2039
 *         self._time = None
 *         self._tracks = tracks
 *         self._type = None             # <<<<<<<<<<<<<<
 *         self.event_id = event_id
 *         self.h5loc = h5loc
 */
  __Pyx_TraceLine(2039,0,__PYX_ERR(0, 2039, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_type_2, Py_None) < 0) __PYX_ERR(0, 2039, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2040
 *         self._tracks = tracks
 *         self._type = None
 *         self.event_id = event_id             # <<<<<<<<<<<<<<
 *         self.h5loc = h5loc
 * 
 */
  __Pyx_TraceLine(2040,0,__PYX_ERR(0, 2040, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_event_id, __pyx_v_event_id) < 0) __PYX_ERR(0, 2040, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2041
 *         self._type = None
 *         self.event_id = event_id
 *         self.h5loc = h5loc             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2041,0,__PYX_ERR(0, 2041, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 2041, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2026
 *     ])
 * 
 *     def __init__(self, tracks, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._bjorkeny = None
 *         self._dir = None
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2044
 * 
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):             # <<<<<<<<<<<<<<
 *         return cls([Track(cls.get_usr_name(t, str('by'), 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_3from_aanet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_2from_aanet[] = "TrackSeries.from_aanet(cls, tracks, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_3from_aanet = {"from_aanet", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_3from_aanet, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_2from_aanet};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_3from_aanet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_tracks = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_aanet (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_tracks,&__pyx_n_s_event_id,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tracks)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, 1); __PYX_ERR(0, 2044, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, 2); __PYX_ERR(0, 2044, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_aanet") < 0)) __PYX_ERR(0, 2044, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_cls = values[0];
    __pyx_v_tracks = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_aanet", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2044, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.from_aanet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_2from_aanet(__pyx_self, __pyx_v_cls, __pyx_v_tracks, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_2from_aanet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_tracks, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__219)
  __Pyx_RefNannySetupContext("from_aanet", 0);
  __Pyx_TraceCall("from_aanet", __pyx_f[0], 2044, 0, __PYX_ERR(0, 2044, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2045
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):
 *         return cls([Track(cls.get_usr_name(t, str('by'), 1),               # bjorkeny             # <<<<<<<<<<<<<<
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 *                           t.E,
 */
  __Pyx_TraceLine(2045,0,__PYX_ERR(0, 2045, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "km3pipe/dataclasses.pyx":2066
 *                           t.type,
 *                           )
 *                     for t in tracks], event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2066,0,__PYX_ERR(0, 2066, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_tracks)) || PyTuple_CheckExact(__pyx_v_tracks)) {
    __pyx_t_3 = __pyx_v_tracks; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_tracks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2066, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2066, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2066, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2066, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2066, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2066, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":2045
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):
 *         return cls([Track(cls.get_usr_name(t, str('by'), 1),               # bjorkeny             # <<<<<<<<<<<<<<
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 *                           t.E,
 */
    __Pyx_TraceLine(2045,0,__PYX_ERR(0, 2045, __pyx_L1_error))
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_get_usr_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_tuple__220, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_t, __pyx_t_8, __pyx_int_1};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2045, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_t, __pyx_t_8, __pyx_int_1};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2045, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_11 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2045, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (__pyx_t_9) {
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
      }
      __Pyx_INCREF(__pyx_v_t);
      __Pyx_GIVEREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_t);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_int_1);
      __pyx_t_8 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2045, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":2046
 *     def from_aanet(cls, tracks, event_id):
 *         return cls([Track(cls.get_usr_name(t, str('by'), 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),             # <<<<<<<<<<<<<<
 *                           t.E,
 *                           t.id,
 */
    __Pyx_TraceLine(2046,0,__PYX_ERR(0, 2046, __pyx_L1_error))
    __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_Direction); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_x); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_y); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_z); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_13);
    __pyx_t_9 = 0;
    __pyx_t_12 = 0;
    __pyx_t_13 = 0;
    __pyx_t_13 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_11, function);
      }
    }
    if (!__pyx_t_13) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2046, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_11)) {
        PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_8};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2046, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
        PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_8};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2046, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2046, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __pyx_t_13 = NULL;
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2046, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "km3pipe/dataclasses.pyx":2047
 *         return cls([Track(cls.get_usr_name(t, str('by'), 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 *                           t.E,             # <<<<<<<<<<<<<<
 *                           t.id,
 *                           cls.get_usr_name(t, str('ichan'), 2),               # ichan
 */
    __Pyx_TraceLine(2047,0,__PYX_ERR(0, 2047, __pyx_L1_error))
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_E); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);

    /* "km3pipe/dataclasses.pyx":2048
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 *                           t.E,
 *                           t.id,             # <<<<<<<<<<<<<<
 *                           cls.get_usr_name(t, str('ichan'), 2),               # ichan
 *                           IS_CC[cls.get_usr_name(t, str('cc'), 0)],        # is_cc
 */
    __Pyx_TraceLine(2048,0,__PYX_ERR(0, 2048, __pyx_L1_error))
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_id); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2048, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);

    /* "km3pipe/dataclasses.pyx":2049
 *                           t.E,
 *                           t.id,
 *                           cls.get_usr_name(t, str('ichan'), 2),               # ichan             # <<<<<<<<<<<<<<
 *                           IS_CC[cls.get_usr_name(t, str('cc'), 0)],        # is_cc
 *                           cls.get_len(t),
 */
    __Pyx_TraceLine(2049,0,__PYX_ERR(0, 2049, __pyx_L1_error))
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_get_usr_name); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_tuple__221, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_14 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
      __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
      if (likely(__pyx_t_14)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_13, function);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_13)) {
      PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_v_t, __pyx_t_9, __pyx_int_2};
      __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2049, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
      PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_v_t, __pyx_t_9, __pyx_int_2};
      __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2049, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_15 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2049, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      if (__pyx_t_14) {
        __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __pyx_t_14 = NULL;
      }
      __Pyx_INCREF(__pyx_v_t);
      __Pyx_GIVEREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_10, __pyx_v_t);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_10, __pyx_t_9);
      __Pyx_INCREF(__pyx_int_2);
      __Pyx_GIVEREF(__pyx_int_2);
      PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_10, __pyx_int_2);
      __pyx_t_9 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_15, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2049, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    }
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "km3pipe/dataclasses.pyx":2050
 *                           t.id,
 *                           cls.get_usr_name(t, str('ichan'), 2),               # ichan
 *                           IS_CC[cls.get_usr_name(t, str('cc'), 0)],        # is_cc             # <<<<<<<<<<<<<<
 *                           cls.get_len(t),
 *                           Position((t.pos.x, t.pos.y, t.pos.z)),
 */
    __Pyx_TraceLine(2050,0,__PYX_ERR(0, 2050, __pyx_L1_error))
    __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_IS_CC); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_get_usr_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_tuple__222, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_16 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_16)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_16);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_v_t, __pyx_t_14, __pyx_int_0};
      __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2050, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_v_t, __pyx_t_14, __pyx_int_0};
      __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2050, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    } else
    #endif
    {
      __pyx_t_17 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2050, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      if (__pyx_t_16) {
        __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL;
      }
      __Pyx_INCREF(__pyx_v_t);
      __Pyx_GIVEREF(__pyx_v_t);
      PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_10, __pyx_v_t);
      __Pyx_GIVEREF(__pyx_t_14);
      PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_10, __pyx_t_14);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_17, 2+__pyx_t_10, __pyx_int_0);
      __pyx_t_14 = 0;
      __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_17, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2050, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_GetItem(__pyx_t_13, __pyx_t_15); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

    /* "km3pipe/dataclasses.pyx":2051
 *                           cls.get_usr_name(t, str('ichan'), 2),               # ichan
 *                           IS_CC[cls.get_usr_name(t, str('cc'), 0)],        # is_cc
 *                           cls.get_len(t),             # <<<<<<<<<<<<<<
 *                           Position((t.pos.x, t.pos.y, t.pos.z)),
 *                           t.t,
 */
    __Pyx_TraceLine(2051,0,__PYX_ERR(0, 2051, __pyx_L1_error))
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_get_len); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_17 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
      __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_13);
      if (likely(__pyx_t_17)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_13, function);
      }
    }
    if (!__pyx_t_17) {
      __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_v_t); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2051, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_13)) {
        PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_v_t};
        __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2051, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_GOTREF(__pyx_t_15);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
        PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_v_t};
        __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2051, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_GOTREF(__pyx_t_15);
      } else
      #endif
      {
        __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2051, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_17); __pyx_t_17 = NULL;
        __Pyx_INCREF(__pyx_v_t);
        __Pyx_GIVEREF(__pyx_v_t);
        PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_v_t);
        __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_14, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2051, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "km3pipe/dataclasses.pyx":2052
 *                           IS_CC[cls.get_usr_name(t, str('cc'), 0)],        # is_cc
 *                           cls.get_len(t),
 *                           Position((t.pos.x, t.pos.y, t.pos.z)),             # <<<<<<<<<<<<<<
 *                           t.t,
 *                           # This is a nasty bug. It is not completely clear
 */
    __Pyx_TraceLine(2052,0,__PYX_ERR(0, 2052, __pyx_L1_error))
    __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_Position); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_x); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_y); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_z); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_17 = PyTuple_New(3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_19);
    PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_t_19);
    __pyx_t_16 = 0;
    __pyx_t_18 = 0;
    __pyx_t_19 = 0;
    __pyx_t_19 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
      __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_14);
      if (likely(__pyx_t_19)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_19);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_14, function);
      }
    }
    if (!__pyx_t_19) {
      __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_17); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2052, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_GOTREF(__pyx_t_13);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_14)) {
        PyObject *__pyx_temp[2] = {__pyx_t_19, __pyx_t_17};
        __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2052, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
        PyObject *__pyx_temp[2] = {__pyx_t_19, __pyx_t_17};
        __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2052, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      } else
      #endif
      {
        __pyx_t_18 = PyTuple_New(1+1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2052, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_19); __pyx_t_19 = NULL;
        __Pyx_GIVEREF(__pyx_t_17);
        PyTuple_SET_ITEM(__pyx_t_18, 0+1, __pyx_t_17);
        __pyx_t_17 = 0;
        __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_18, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2052, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

    /* "km3pipe/dataclasses.pyx":2053
 *                           cls.get_len(t),
 *                           Position((t.pos.x, t.pos.y, t.pos.z)),
 *                           t.t,             # <<<<<<<<<<<<<<
 *                           # This is a nasty bug. It is not completely clear
 *                           # if this is supposed to be PDG or Geant convention.
 */
    __Pyx_TraceLine(2053,0,__PYX_ERR(0, 2053, __pyx_L1_error))
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_t); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);

    /* "km3pipe/dataclasses.pyx":2064
 *                           #
 *                           # geant2pdg(t.type))
 *                           t.type,             # <<<<<<<<<<<<<<
 *                           )
 *                     for t in tracks], event_id)
 */
    __Pyx_TraceLine(2064,0,__PYX_ERR(0, 2064, __pyx_L1_error))
    __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_type); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);

    /* "km3pipe/dataclasses.pyx":2045
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):
 *         return cls([Track(cls.get_usr_name(t, str('by'), 1),               # bjorkeny             # <<<<<<<<<<<<<<
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 *                           t.E,
 */
    __Pyx_TraceLine(2045,0,__PYX_ERR(0, 2045, __pyx_L1_error))
    __pyx_t_17 = PyTuple_New(10); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_17, 3, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_17, 4, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_17, 5, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_17, 6, __pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_17, 7, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_17, 8, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_17, 9, __pyx_t_18);
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_11 = 0;
    __pyx_t_12 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_15 = 0;
    __pyx_t_13 = 0;
    __pyx_t_14 = 0;
    __pyx_t_18 = 0;
    __pyx_t_18 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_Track), __pyx_t_17, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_18))) __PYX_ERR(0, 2045, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

    /* "km3pipe/dataclasses.pyx":2066
 *                           t.type,
 *                           )
 *                     for t in tracks], event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(2066,0,__PYX_ERR(0, 2066, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_3 = __pyx_v_cls; __pyx_t_18 = NULL;
  __pyx_t_10 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_18)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_18);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_10 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_18, __pyx_t_2, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2045, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_18, __pyx_t_2, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2045, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_17 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    if (__pyx_t_18) {
      __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_18); __pyx_t_18 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_10, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_10, __pyx_v_event_id);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2044
 * 
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):             # <<<<<<<<<<<<<<
 *         return cls([Track(cls.get_usr_name(t, str('by'), 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.from_aanet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2069
 * 
 *     @classmethod
 *     def from_arrays(cls,             # <<<<<<<<<<<<<<
 *                     bjorkenys,
 *                     directions_x,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_5from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_4from_arrays[] = "TrackSeries.from_arrays(cls, bjorkenys, directions_x, directions_y, directions_z, energies, ids, interaction_channels, is_ccs, lengths, positions_x, positions_y, positions_z, times, types, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_5from_arrays = {"from_arrays", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_5from_arrays, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_4from_arrays};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_5from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_bjorkenys = 0;
  PyObject *__pyx_v_directions_x = 0;
  PyObject *__pyx_v_directions_y = 0;
  PyObject *__pyx_v_directions_z = 0;
  PyObject *__pyx_v_energies = 0;
  PyObject *__pyx_v_ids = 0;
  PyObject *__pyx_v_interaction_channels = 0;
  PyObject *__pyx_v_is_ccs = 0;
  PyObject *__pyx_v_lengths = 0;
  PyObject *__pyx_v_positions_x = 0;
  PyObject *__pyx_v_positions_y = 0;
  PyObject *__pyx_v_positions_z = 0;
  PyObject *__pyx_v_times = 0;
  PyObject *__pyx_v_types = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_bjorkenys,&__pyx_n_s_directions_x,&__pyx_n_s_directions_y,&__pyx_n_s_directions_z,&__pyx_n_s_energies,&__pyx_n_s_ids,&__pyx_n_s_interaction_channels,&__pyx_n_s_is_ccs,&__pyx_n_s_lengths,&__pyx_n_s_positions_x,&__pyx_n_s_positions_y,&__pyx_n_s_positions_z,&__pyx_n_s_times,&__pyx_n_s_types,&__pyx_n_s_event_id,0};
    PyObject* values[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        CYTHON_FALLTHROUGH;
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bjorkenys)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 1); __PYX_ERR(0, 2069, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_directions_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 2); __PYX_ERR(0, 2069, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_directions_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 3); __PYX_ERR(0, 2069, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_directions_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 4); __PYX_ERR(0, 2069, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_energies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 5); __PYX_ERR(0, 2069, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 6); __PYX_ERR(0, 2069, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_interaction_channels)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 7); __PYX_ERR(0, 2069, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_is_ccs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 8); __PYX_ERR(0, 2069, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lengths)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 9); __PYX_ERR(0, 2069, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (likely((values[10] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_positions_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 10); __PYX_ERR(0, 2069, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 11:
        if (likely((values[11] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_positions_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 11); __PYX_ERR(0, 2069, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 12:
        if (likely((values[12] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_positions_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 12); __PYX_ERR(0, 2069, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 13:
        if (likely((values[13] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_times)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 13); __PYX_ERR(0, 2069, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 14:
        if (likely((values[14] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_types)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 14); __PYX_ERR(0, 2069, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 15:
        if (likely((values[15] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, 15); __PYX_ERR(0, 2069, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_arrays") < 0)) __PYX_ERR(0, 2069, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 16) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
      values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
      values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
      values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
      values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
      values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
      values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
      values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
    }
    __pyx_v_cls = values[0];
    __pyx_v_bjorkenys = values[1];
    __pyx_v_directions_x = values[2];
    __pyx_v_directions_y = values[3];
    __pyx_v_directions_z = values[4];
    __pyx_v_energies = values[5];
    __pyx_v_ids = values[6];
    __pyx_v_interaction_channels = values[7];
    __pyx_v_is_ccs = values[8];
    __pyx_v_lengths = values[9];
    __pyx_v_positions_x = values[10];
    __pyx_v_positions_y = values[11];
    __pyx_v_positions_z = values[12];
    __pyx_v_times = values[13];
    __pyx_v_types = values[14];
    __pyx_v_event_id = values[15];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 16, 16, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2069, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_4from_arrays(__pyx_self, __pyx_v_cls, __pyx_v_bjorkenys, __pyx_v_directions_x, __pyx_v_directions_y, __pyx_v_directions_z, __pyx_v_energies, __pyx_v_ids, __pyx_v_interaction_channels, __pyx_v_is_ccs, __pyx_v_lengths, __pyx_v_positions_x, __pyx_v_positions_y, __pyx_v_positions_z, __pyx_v_times, __pyx_v_types, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_4from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_bjorkenys, PyObject *__pyx_v_directions_x, PyObject *__pyx_v_directions_y, PyObject *__pyx_v_directions_z, PyObject *__pyx_v_energies, PyObject *__pyx_v_ids, PyObject *__pyx_v_interaction_channels, PyObject *__pyx_v_is_ccs, PyObject *__pyx_v_lengths, PyObject *__pyx_v_positions_x, PyObject *__pyx_v_positions_y, PyObject *__pyx_v_positions_z, PyObject *__pyx_v_times, PyObject *__pyx_v_types, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_directions = NULL;
  PyObject *__pyx_v_positions = NULL;
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_tracks = NULL;
  PyObject *__pyx_v_track_args = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  __Pyx_TraceFrameInit(__pyx_codeobj__223)
  __Pyx_RefNannySetupContext("from_arrays", 0);
  __Pyx_TraceCall("from_arrays", __pyx_f[0], 2069, 0, __PYX_ERR(0, 2069, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2086
 *                     event_id,
 *                     ):
 *         directions = np.column_stack((directions_x, directions_y,             # <<<<<<<<<<<<<<
 *                                       directions_z))
 *         positions = np.column_stack((positions_x, positions_y,
 */
  __Pyx_TraceLine(2086,0,__PYX_ERR(0, 2086, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_column_stack); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":2087
 *                     ):
 *         directions = np.column_stack((directions_x, directions_y,
 *                                       directions_z))             # <<<<<<<<<<<<<<
 *         positions = np.column_stack((positions_x, positions_y,
 *                                      positions_z))
 */
  __Pyx_TraceLine(2087,0,__PYX_ERR(0, 2087, __pyx_L1_error))
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_directions_x);
  __Pyx_GIVEREF(__pyx_v_directions_x);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_directions_x);
  __Pyx_INCREF(__pyx_v_directions_y);
  __Pyx_GIVEREF(__pyx_v_directions_y);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_directions_y);
  __Pyx_INCREF(__pyx_v_directions_z);
  __Pyx_GIVEREF(__pyx_v_directions_z);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_directions_z);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2086, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2086, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2086, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2086, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2086, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_directions = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2088
 *         directions = np.column_stack((directions_x, directions_y,
 *                                       directions_z))
 *         positions = np.column_stack((positions_x, positions_y,             # <<<<<<<<<<<<<<
 *                                      positions_z))
 *         args = bjorkenys, directions, energies, \
 */
  __Pyx_TraceLine(2088,0,__PYX_ERR(0, 2088, __pyx_L1_error))
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_column_stack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":2089
 *                                       directions_z))
 *         positions = np.column_stack((positions_x, positions_y,
 *                                      positions_z))             # <<<<<<<<<<<<<<
 *         args = bjorkenys, directions, energies, \
 *             ids, interaction_channels, is_ccs, lengths, positions, \
 */
  __Pyx_TraceLine(2089,0,__PYX_ERR(0, 2089, __pyx_L1_error))
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_positions_x);
  __Pyx_GIVEREF(__pyx_v_positions_x);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_positions_x);
  __Pyx_INCREF(__pyx_v_positions_y);
  __Pyx_GIVEREF(__pyx_v_positions_y);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_positions_y);
  __Pyx_INCREF(__pyx_v_positions_z);
  __Pyx_GIVEREF(__pyx_v_positions_z);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_positions_z);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2088, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2088, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2088, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2088, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2088, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_positions = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2090
 *         positions = np.column_stack((positions_x, positions_y,
 *                                      positions_z))
 *         args = bjorkenys, directions, energies, \             # <<<<<<<<<<<<<<
 *             ids, interaction_channels, is_ccs, lengths, positions, \
 *             times, types
 */
  __Pyx_TraceLine(2090,0,__PYX_ERR(0, 2090, __pyx_L1_error))
  __pyx_t_1 = PyTuple_New(10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_bjorkenys);
  __Pyx_GIVEREF(__pyx_v_bjorkenys);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_bjorkenys);
  __Pyx_INCREF(__pyx_v_directions);
  __Pyx_GIVEREF(__pyx_v_directions);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_directions);
  __Pyx_INCREF(__pyx_v_energies);
  __Pyx_GIVEREF(__pyx_v_energies);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_energies);
  __Pyx_INCREF(__pyx_v_ids);
  __Pyx_GIVEREF(__pyx_v_ids);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_ids);
  __Pyx_INCREF(__pyx_v_interaction_channels);
  __Pyx_GIVEREF(__pyx_v_interaction_channels);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_interaction_channels);
  __Pyx_INCREF(__pyx_v_is_ccs);
  __Pyx_GIVEREF(__pyx_v_is_ccs);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_is_ccs);
  __Pyx_INCREF(__pyx_v_lengths);
  __Pyx_GIVEREF(__pyx_v_lengths);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_v_lengths);
  __Pyx_INCREF(__pyx_v_positions);
  __Pyx_GIVEREF(__pyx_v_positions);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_v_positions);
  __Pyx_INCREF(__pyx_v_times);
  __Pyx_GIVEREF(__pyx_v_times);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_v_times);
  __Pyx_INCREF(__pyx_v_types);
  __Pyx_GIVEREF(__pyx_v_types);
  PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_v_types);
  __pyx_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2093
 *             ids, interaction_channels, is_ccs, lengths, positions, \
 *             times, types
 *         tracks = cls([Track(*track_args) for track_args in zip(*args)],             # <<<<<<<<<<<<<<
 *                      event_id)
 *         tracks._bjorkeny = bjorkenys
 */
  __Pyx_TraceLine(2093,0,__PYX_ERR(0, 2093, __pyx_L1_error))
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2093, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2093, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2093, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2093, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2093, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_7(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2093, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_track_args, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_track_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_Track), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 2093, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":2094
 *             times, types
 *         tracks = cls([Track(*track_args) for track_args in zip(*args)],
 *                      event_id)             # <<<<<<<<<<<<<<
 *         tracks._bjorkeny = bjorkenys
 *         tracks._dir = zip(directions_x, directions_y, directions_z)
 */
  __Pyx_TraceLine(2094,0,__PYX_ERR(0, 2094, __pyx_L1_error))
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_3 = __pyx_v_cls; __pyx_t_2 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2093, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2093, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_8, __pyx_t_5);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_8, __pyx_v_event_id);
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_tracks = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2095
 *         tracks = cls([Track(*track_args) for track_args in zip(*args)],
 *                      event_id)
 *         tracks._bjorkeny = bjorkenys             # <<<<<<<<<<<<<<
 *         tracks._dir = zip(directions_x, directions_y, directions_z)
 *         tracks._energy = energies
 */
  __Pyx_TraceLine(2095,0,__PYX_ERR(0, 2095, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_bjorkeny_2, __pyx_v_bjorkenys) < 0) __PYX_ERR(0, 2095, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2096
 *                      event_id)
 *         tracks._bjorkeny = bjorkenys
 *         tracks._dir = zip(directions_x, directions_y, directions_z)             # <<<<<<<<<<<<<<
 *         tracks._energy = energies
 *         tracks._id = ids
 */
  __Pyx_TraceLine(2096,0,__PYX_ERR(0, 2096, __pyx_L1_error))
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_directions_x);
  __Pyx_GIVEREF(__pyx_v_directions_x);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_directions_x);
  __Pyx_INCREF(__pyx_v_directions_y);
  __Pyx_GIVEREF(__pyx_v_directions_y);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_directions_y);
  __Pyx_INCREF(__pyx_v_directions_z);
  __Pyx_GIVEREF(__pyx_v_directions_z);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_directions_z);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_dir_2, __pyx_t_3) < 0) __PYX_ERR(0, 2096, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":2097
 *         tracks._bjorkeny = bjorkenys
 *         tracks._dir = zip(directions_x, directions_y, directions_z)
 *         tracks._energy = energies             # <<<<<<<<<<<<<<
 *         tracks._id = ids
 *         tracks._interaction_channel = interaction_channels
 */
  __Pyx_TraceLine(2097,0,__PYX_ERR(0, 2097, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_energy_2, __pyx_v_energies) < 0) __PYX_ERR(0, 2097, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2098
 *         tracks._dir = zip(directions_x, directions_y, directions_z)
 *         tracks._energy = energies
 *         tracks._id = ids             # <<<<<<<<<<<<<<
 *         tracks._interaction_channel = interaction_channels
 *         tracks._is_cc = is_ccs
 */
  __Pyx_TraceLine(2098,0,__PYX_ERR(0, 2098, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_id_2, __pyx_v_ids) < 0) __PYX_ERR(0, 2098, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2099
 *         tracks._energy = energies
 *         tracks._id = ids
 *         tracks._interaction_channel = interaction_channels             # <<<<<<<<<<<<<<
 *         tracks._is_cc = is_ccs
 *         tracks._length = lengths
 */
  __Pyx_TraceLine(2099,0,__PYX_ERR(0, 2099, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_interaction_channel_2, __pyx_v_interaction_channels) < 0) __PYX_ERR(0, 2099, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2100
 *         tracks._id = ids
 *         tracks._interaction_channel = interaction_channels
 *         tracks._is_cc = is_ccs             # <<<<<<<<<<<<<<
 *         tracks._length = lengths
 *         tracks._pos = zip(positions_x, positions_y, positions_z)
 */
  __Pyx_TraceLine(2100,0,__PYX_ERR(0, 2100, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_is_cc_2, __pyx_v_is_ccs) < 0) __PYX_ERR(0, 2100, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2101
 *         tracks._interaction_channel = interaction_channels
 *         tracks._is_cc = is_ccs
 *         tracks._length = lengths             # <<<<<<<<<<<<<<
 *         tracks._pos = zip(positions_x, positions_y, positions_z)
 *         tracks._time = times
 */
  __Pyx_TraceLine(2101,0,__PYX_ERR(0, 2101, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_length_2, __pyx_v_lengths) < 0) __PYX_ERR(0, 2101, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2102
 *         tracks._is_cc = is_ccs
 *         tracks._length = lengths
 *         tracks._pos = zip(positions_x, positions_y, positions_z)             # <<<<<<<<<<<<<<
 *         tracks._time = times
 *         tracks._type = types
 */
  __Pyx_TraceLine(2102,0,__PYX_ERR(0, 2102, __pyx_L1_error))
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_positions_x);
  __Pyx_GIVEREF(__pyx_v_positions_x);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_positions_x);
  __Pyx_INCREF(__pyx_v_positions_y);
  __Pyx_GIVEREF(__pyx_v_positions_y);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_positions_y);
  __Pyx_INCREF(__pyx_v_positions_z);
  __Pyx_GIVEREF(__pyx_v_positions_z);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_positions_z);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_pos_2, __pyx_t_1) < 0) __PYX_ERR(0, 2102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2103
 *         tracks._length = lengths
 *         tracks._pos = zip(positions_x, positions_y, positions_z)
 *         tracks._time = times             # <<<<<<<<<<<<<<
 *         tracks._type = types
 *         return tracks
 */
  __Pyx_TraceLine(2103,0,__PYX_ERR(0, 2103, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_time_2, __pyx_v_times) < 0) __PYX_ERR(0, 2103, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2104
 *         tracks._pos = zip(positions_x, positions_y, positions_z)
 *         tracks._time = times
 *         tracks._type = types             # <<<<<<<<<<<<<<
 *         return tracks
 * 
 */
  __Pyx_TraceLine(2104,0,__PYX_ERR(0, 2104, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_tracks, __pyx_n_s_type_2, __pyx_v_types) < 0) __PYX_ERR(0, 2104, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2105
 *         tracks._time = times
 *         tracks._type = types
 *         return tracks             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2105,0,__PYX_ERR(0, 2105, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_tracks);
  __pyx_r = __pyx_v_tracks;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2069
 * 
 *     @classmethod
 *     def from_arrays(cls,             # <<<<<<<<<<<<<<
 *                     bjorkenys,
 *                     directions_x,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_directions);
  __Pyx_XDECREF(__pyx_v_positions);
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_tracks);
  __Pyx_XDECREF(__pyx_v_track_args);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2108
 * 
 *     @classmethod
 *     def from_km3df(cls, km3df):             # <<<<<<<<<<<<<<
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 *                               event_id=int(km3df['event_id']))
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_7from_km3df(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_6from_km3df[] = "TrackSeries.from_km3df(cls, km3df)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_7from_km3df = {"from_km3df", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_7from_km3df, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_6from_km3df};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_7from_km3df(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_km3df = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_km3df (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_km3df,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_km3df)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_km3df", 1, 2, 2, 1); __PYX_ERR(0, 2108, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_km3df") < 0)) __PYX_ERR(0, 2108, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_cls = values[0];
    __pyx_v_km3df = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_km3df", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2108, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.from_km3df", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_6from_km3df(__pyx_self, __pyx_v_cls, __pyx_v_km3df);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_6from_km3df(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_km3df) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__224)
  __Pyx_RefNannySetupContext("from_km3df", 0);
  __Pyx_TraceCall("from_km3df", __pyx_f[0], 2108, 0, __PYX_ERR(0, 2108, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2109
 *     @classmethod
 *     def from_km3df(cls, km3df):
 *         return cls.from_table(km3df.conv_to(to='numpy'),             # <<<<<<<<<<<<<<
 *                               event_id=int(km3df['event_id']))
 * 
 */
  __Pyx_TraceLine(2109,0,__PYX_ERR(0, 2109, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_km3df, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 2109, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":2110
 *     def from_km3df(cls, km3df):
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 *                               event_id=int(km3df['event_id']))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2110,0,__PYX_ERR(0, 2110, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_GetItem(__pyx_v_km3df, __pyx_n_s_event_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_event_id, __pyx_t_5) < 0) __PYX_ERR(0, 2110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2109
 *     @classmethod
 *     def from_km3df(cls, km3df):
 *         return cls.from_table(km3df.conv_to(to='numpy'),             # <<<<<<<<<<<<<<
 *                               event_id=int(km3df['event_id']))
 * 
 */
  __Pyx_TraceLine(2109,0,__PYX_ERR(0, 2109, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2108
 * 
 *     @classmethod
 *     def from_km3df(cls, km3df):             # <<<<<<<<<<<<<<
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 *                               event_id=int(km3df['event_id']))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.from_km3df", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2113
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         return cls([Track(
 *             row['bjorkeny'],
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_9from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_8from_table[] = "TrackSeries.from_table(cls, table, event_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_9from_table = {"from_table", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_9from_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_8from_table};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_9from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_table = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_table,&__pyx_n_s_event_id,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_table)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, 1); __PYX_ERR(0, 2113, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, 2); __PYX_ERR(0, 2113, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_table") < 0)) __PYX_ERR(0, 2113, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_cls = values[0];
    __pyx_v_table = values[1];
    __pyx_v_event_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2113, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_8from_table(__pyx_self, __pyx_v_cls, __pyx_v_table, __pyx_v_event_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_8from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_event_id) {
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_t_19;
  __Pyx_TraceFrameInit(__pyx_codeobj__225)
  __Pyx_RefNannySetupContext("from_table", 0);
  __Pyx_TraceCall("from_table", __pyx_f[0], 2113, 0, __PYX_ERR(0, 2113, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2114
 *     @classmethod
 *     def from_table(cls, table, event_id):
 *         return cls([Track(             # <<<<<<<<<<<<<<
 *             row['bjorkeny'],
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),
 */
  __Pyx_TraceLine(2114,0,__PYX_ERR(0, 2114, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "km3pipe/dataclasses.pyx":2125
 *             row['time'],
 *             row['type']
 *         ) for row in table], event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2125,0,__PYX_ERR(0, 2125, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_table)) || PyTuple_CheckExact(__pyx_v_table)) {
    __pyx_t_3 = __pyx_v_table; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_table); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2125, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2125, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2125, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2125, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2125, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2125, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "km3pipe/dataclasses.pyx":2115
 *     def from_table(cls, table, event_id):
 *         return cls([Track(
 *             row['bjorkeny'],             # <<<<<<<<<<<<<<
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),
 *             row['energy'],
 */
    __Pyx_TraceLine(2115,0,__PYX_ERR(0, 2115, __pyx_L1_error))
    __pyx_t_6 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_bjorkeny); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);

    /* "km3pipe/dataclasses.pyx":2116
 *         return cls([Track(
 *             row['bjorkeny'],
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),             # <<<<<<<<<<<<<<
 *             row['energy'],
 *             row['id'],
 */
    __Pyx_TraceLine(2116,0,__PYX_ERR(0, 2116, __pyx_L1_error))
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dir_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dir_y); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dir_z); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_11);
    __pyx_t_8 = 0;
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    __pyx_t_11 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    if (!__pyx_t_11) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2116, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_12};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2116, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_12};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2116, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2116, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL;
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_12);
        __pyx_t_12 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2116, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "km3pipe/dataclasses.pyx":2117
 *             row['bjorkeny'],
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),
 *             row['energy'],             # <<<<<<<<<<<<<<
 *             row['id'],
 *             row['interaction_channel'],
 */
    __Pyx_TraceLine(2117,0,__PYX_ERR(0, 2117, __pyx_L1_error))
    __pyx_t_9 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_energy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "km3pipe/dataclasses.pyx":2118
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),
 *             row['energy'],
 *             row['id'],             # <<<<<<<<<<<<<<
 *             row['interaction_channel'],
 *             row['is_cc'],
 */
    __Pyx_TraceLine(2118,0,__PYX_ERR(0, 2118, __pyx_L1_error))
    __pyx_t_10 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_id); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "km3pipe/dataclasses.pyx":2119
 *             row['energy'],
 *             row['id'],
 *             row['interaction_channel'],             # <<<<<<<<<<<<<<
 *             row['is_cc'],
 *             row['length'],
 */
    __Pyx_TraceLine(2119,0,__PYX_ERR(0, 2119, __pyx_L1_error))
    __pyx_t_12 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_interaction_channel); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);

    /* "km3pipe/dataclasses.pyx":2120
 *             row['id'],
 *             row['interaction_channel'],
 *             row['is_cc'],             # <<<<<<<<<<<<<<
 *             row['length'],
 *             np.array((row['pos_x'], row['pos_y'], row['pos_z'],)),
 */
    __Pyx_TraceLine(2120,0,__PYX_ERR(0, 2120, __pyx_L1_error))
    __pyx_t_11 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_is_cc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);

    /* "km3pipe/dataclasses.pyx":2121
 *             row['interaction_channel'],
 *             row['is_cc'],
 *             row['length'],             # <<<<<<<<<<<<<<
 *             np.array((row['pos_x'], row['pos_y'], row['pos_z'],)),
 *             row['time'],
 */
    __Pyx_TraceLine(2121,0,__PYX_ERR(0, 2121, __pyx_L1_error))
    __pyx_t_8 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_length); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "km3pipe/dataclasses.pyx":2122
 *             row['is_cc'],
 *             row['length'],
 *             np.array((row['pos_x'], row['pos_y'], row['pos_z'],)),             # <<<<<<<<<<<<<<
 *             row['time'],
 *             row['type']
 */
    __Pyx_TraceLine(2122,0,__PYX_ERR(0, 2122, __pyx_L1_error))
    __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_array_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pos_x); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_16 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pos_y); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_17 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_pos_z); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_18 = PyTuple_New(3); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_17);
    __pyx_t_14 = 0;
    __pyx_t_16 = 0;
    __pyx_t_17 = 0;
    __pyx_t_17 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
      __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_15);
      if (likely(__pyx_t_17)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_15, function);
      }
    }
    if (!__pyx_t_17) {
      __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_18); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2122, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_GOTREF(__pyx_t_13);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_15)) {
        PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_t_18};
        __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2122, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
        PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_t_18};
        __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2122, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      } else
      #endif
      {
        __pyx_t_16 = PyTuple_New(1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2122, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_17); __pyx_t_17 = NULL;
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_16, 0+1, __pyx_t_18);
        __pyx_t_18 = 0;
        __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_16, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2122, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

    /* "km3pipe/dataclasses.pyx":2123
 *             row['length'],
 *             np.array((row['pos_x'], row['pos_y'], row['pos_z'],)),
 *             row['time'],             # <<<<<<<<<<<<<<
 *             row['type']
 *         ) for row in table], event_id)
 */
    __Pyx_TraceLine(2123,0,__PYX_ERR(0, 2123, __pyx_L1_error))
    __pyx_t_15 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_time); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);

    /* "km3pipe/dataclasses.pyx":2124
 *             np.array((row['pos_x'], row['pos_y'], row['pos_z'],)),
 *             row['time'],
 *             row['type']             # <<<<<<<<<<<<<<
 *         ) for row in table], event_id)
 * 
 */
    __Pyx_TraceLine(2124,0,__PYX_ERR(0, 2124, __pyx_L1_error))
    __pyx_t_16 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_type); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);

    /* "km3pipe/dataclasses.pyx":2114
 *     @classmethod
 *     def from_table(cls, table, event_id):
 *         return cls([Track(             # <<<<<<<<<<<<<<
 *             row['bjorkeny'],
 *             np.array((row['dir_x'], row['dir_y'], row['dir_z'],)),
 */
    __Pyx_TraceLine(2114,0,__PYX_ERR(0, 2114, __pyx_L1_error))
    __pyx_t_18 = PyTuple_New(10); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_18, 4, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_18, 5, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_18, 6, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_18, 7, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_18, 8, __pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_18, 9, __pyx_t_16);
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_12 = 0;
    __pyx_t_11 = 0;
    __pyx_t_8 = 0;
    __pyx_t_13 = 0;
    __pyx_t_15 = 0;
    __pyx_t_16 = 0;
    __pyx_t_16 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7km3pipe_11dataclasses_Track), __pyx_t_18, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_16))) __PYX_ERR(0, 2114, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

    /* "km3pipe/dataclasses.pyx":2125
 *             row['time'],
 *             row['type']
 *         ) for row in table], event_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(2125,0,__PYX_ERR(0, 2125, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_3 = __pyx_v_cls; __pyx_t_16 = NULL;
  __pyx_t_19 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_16)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_16);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_19 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_2, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2114, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_2, __pyx_v_event_id};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2114, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_18 = PyTuple_New(2+__pyx_t_19); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    if (__pyx_t_16) {
      __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_16); __pyx_t_16 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_19, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_event_id);
    __Pyx_GIVEREF(__pyx_v_event_id);
    PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_19, __pyx_v_event_id);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2113
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         return cls([Track(
 *             row['bjorkeny'],
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2128
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_11deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_10deserialise[] = "TrackSeries.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_11deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_11deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_10deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_11deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 2128, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2128, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_10deserialise(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_10deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__226)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 2128, 0, __PYX_ERR(0, 2128, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2129
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(2129,0,__PYX_ERR(0, 2129, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2128
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2131
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_13serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_12serialise[] = "TrackSeries.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_13serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_13serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_12serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_13serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 2131, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2131, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_12serialise(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_12serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__227)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 2131, 0, __PYX_ERR(0, 2131, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2132
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2132,0,__PYX_ERR(0, 2132, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2131
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2135
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data, event_id)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_15conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_14conv_from[] = "TrackSeries.conv_from(cls, data, event_id, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_15conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_15conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_14conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_15conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_event_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 1); __PYX_ERR(0, 2135, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 2); __PYX_ERR(0, 2135, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 2135, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2135, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_14conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_event_id, __pyx_v_fmt, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_14conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, PyObject *__pyx_v_event_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__228)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 2135, 0, __PYX_ERR(0, 2135, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2136
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data, event_id)
 * 
 */
  __Pyx_TraceLine(2136,0,__PYX_ERR(0, 2136, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2136, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":2137
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 *             return cls.from_table(data, event_id)             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(2137,0,__PYX_ERR(0, 2137, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_from_table); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_event_id};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2137, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_data, __pyx_v_event_id};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2137, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2137, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_data);
      __Pyx_INCREF(__pyx_v_event_id);
      __Pyx_GIVEREF(__pyx_v_event_id);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_event_id);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2137, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2136
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             return cls.from_table(data, event_id)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":2135
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data, event_id)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2139
 *             return cls.from_table(data, event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_17conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_16conv_to[] = "TrackSeries.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_17conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_17conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_16conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_17conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 2139, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2139, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_16conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_16conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__229)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 2139, 0, __PYX_ERR(0, 2139, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2140
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  __Pyx_TraceLine(2140,0,__PYX_ERR(0, 2140, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2140, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":2141
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return self.__array__()             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(2141,0,__PYX_ERR(0, 2141, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2141, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2141, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2140
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":2142
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(2142,0,__PYX_ERR(0, 2142, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2142, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":2143
 *             return self.__array__()
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
    __Pyx_TraceLine(2143,0,__PYX_ERR(0, 2143, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 2143, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_t_3) < 0) __PYX_ERR(0, 2143, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2142
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":2139
 *             return cls.from_table(data, event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2145
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_19__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_18__array__[] = "TrackSeries.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_19__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_19__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_18__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_19__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_18__array__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_18__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__230)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 2145, 0, __PYX_ERR(0, 2145, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2146
 * 
 *     def __array__(self):
 *         return np.array([(             # <<<<<<<<<<<<<<
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 *             t.id, t.interaction_channel, t.is_cc,
 */
  __Pyx_TraceLine(2146,0,__PYX_ERR(0, 2146, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "km3pipe/dataclasses.pyx":2151
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 *             self.event_id,
 *         ) for t in self._tracks], dtype=self.dtype)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2151,0,__PYX_ERR(0, 2151, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2151, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2151, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2151, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2151, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2151, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2151, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "km3pipe/dataclasses.pyx":2147
 *     def __array__(self):
 *         return np.array([(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,             # <<<<<<<<<<<<<<
 *             t.id, t.interaction_channel, t.is_cc,
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 */
    __Pyx_TraceLine(2147,0,__PYX_ERR(0, 2147, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_bjorkeny); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_7, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_energy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "km3pipe/dataclasses.pyx":2148
 *         return np.array([(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 *             t.id, t.interaction_channel, t.is_cc,             # <<<<<<<<<<<<<<
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 *             self.event_id,
 */
    __Pyx_TraceLine(2148,0,__PYX_ERR(0, 2148, __pyx_L1_error))
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_id); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_interaction_channel); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_is_cc); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);

    /* "km3pipe/dataclasses.pyx":2149
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 *             t.id, t.interaction_channel, t.is_cc,
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,             # <<<<<<<<<<<<<<
 *             self.event_id,
 *         ) for t in self._tracks], dtype=self.dtype)
 */
    __Pyx_TraceLine(2149,0,__PYX_ERR(0, 2149, __pyx_L1_error))
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_length); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_15, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_17 = __Pyx_GetItemInt(__pyx_t_15, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_15, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_time); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_type); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);

    /* "km3pipe/dataclasses.pyx":2150
 *             t.id, t.interaction_channel, t.is_cc,
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 *             self.event_id,             # <<<<<<<<<<<<<<
 *         ) for t in self._tracks], dtype=self.dtype)
 * 
 */
    __Pyx_TraceLine(2150,0,__PYX_ERR(0, 2150, __pyx_L1_error))
    __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_event_id); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 2150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);

    /* "km3pipe/dataclasses.pyx":2147
 *     def __array__(self):
 *         return np.array([(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,             # <<<<<<<<<<<<<<
 *             t.id, t.interaction_channel, t.is_cc,
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 */
    __Pyx_TraceLine(2147,0,__PYX_ERR(0, 2147, __pyx_L1_error))
    __pyx_t_21 = PyTuple_New(15); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_21, 2, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_21, 3, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_21, 4, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_21, 5, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_21, 6, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_21, 7, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_21, 8, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_21, 9, __pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_21, 10, __pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_18);
    PyTuple_SET_ITEM(__pyx_t_21, 11, __pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_21, 12, __pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_19);
    PyTuple_SET_ITEM(__pyx_t_21, 13, __pyx_t_19);
    __Pyx_GIVEREF(__pyx_t_20);
    PyTuple_SET_ITEM(__pyx_t_21, 14, __pyx_t_20);
    __pyx_t_3 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_7 = 0;
    __pyx_t_11 = 0;
    __pyx_t_12 = 0;
    __pyx_t_13 = 0;
    __pyx_t_14 = 0;
    __pyx_t_16 = 0;
    __pyx_t_17 = 0;
    __pyx_t_18 = 0;
    __pyx_t_15 = 0;
    __pyx_t_19 = 0;
    __pyx_t_20 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_21))) __PYX_ERR(0, 2146, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

    /* "km3pipe/dataclasses.pyx":2151
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 *             self.event_id,
 *         ) for t in self._tracks], dtype=self.dtype)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(2151,0,__PYX_ERR(0, 2151, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":2146
 * 
 *     def __array__(self):
 *         return np.array([(             # <<<<<<<<<<<<<<
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 *             t.id, t.interaction_channel, t.is_cc,
 */
  __Pyx_TraceLine(2146,0,__PYX_ERR(0, 2146, __pyx_L1_error))
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2151
 *             t.length, t.pos[0], t.pos[1], t.pos[2], t.time, t.type,
 *             self.event_id,
 *         ) for t in self._tracks], dtype=self.dtype)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2151,0,__PYX_ERR(0, 2151, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_21) < 0) __PYX_ERR(0, 2151, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "km3pipe/dataclasses.pyx":2146
 * 
 *     def __array__(self):
 *         return np.array([(             # <<<<<<<<<<<<<<
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 *             t.id, t.interaction_channel, t.is_cc,
 */
  __Pyx_TraceLine(2146,0,__PYX_ERR(0, 2146, __pyx_L1_error))
  __pyx_t_21 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_21;
  __pyx_t_21 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2145
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2154
 * 
 *     @classmethod
 *     def get_len(cls, track):             # <<<<<<<<<<<<<<
 *         try:
 *             return track.len
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_21get_len(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_20get_len[] = "TrackSeries.get_len(cls, track)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_21get_len = {"get_len", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_21get_len, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_20get_len};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_21get_len(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_track = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_len (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_track,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_track)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_len", 1, 2, 2, 1); __PYX_ERR(0, 2154, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_len") < 0)) __PYX_ERR(0, 2154, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_cls = values[0];
    __pyx_v_track = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_len", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2154, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.get_len", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_20get_len(__pyx_self, __pyx_v_cls, __pyx_v_track);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_20get_len(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_track) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__231)
  __Pyx_RefNannySetupContext("get_len", 0);
  __Pyx_TraceCall("get_len", __pyx_f[0], 2154, 0, __PYX_ERR(0, 2154, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2155
 *     @classmethod
 *     def get_len(cls, track):
 *         try:             # <<<<<<<<<<<<<<
 *             return track.len
 *         except AttributeError:
 */
  __Pyx_TraceLine(2155,0,__PYX_ERR(0, 2155, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":2156
 *     def get_len(cls, track):
 *         try:
 *             return track.len             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             return 0
 */
      __Pyx_TraceLine(2156,0,__PYX_ERR(0, 2156, __pyx_L3_error))
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_track, __pyx_n_s_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2156, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "km3pipe/dataclasses.pyx":2155
 *     @classmethod
 *     def get_len(cls, track):
 *         try:             # <<<<<<<<<<<<<<
 *             return track.len
 *         except AttributeError:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":2157
 *         try:
 *             return track.len
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             return 0
 * 
 */
    __Pyx_TraceLine(2157,0,__PYX_ERR(0, 2157, __pyx_L5_except_error))
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.get_len", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 2157, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "km3pipe/dataclasses.pyx":2158
 *             return track.len
 *         except AttributeError:
 *             return 0             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
      __Pyx_TraceLine(2158,0,__PYX_ERR(0, 2158, __pyx_L5_except_error))
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_int_0);
      __pyx_r = __pyx_int_0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "km3pipe/dataclasses.pyx":2155
 *     @classmethod
 *     def get_len(cls, track):
 *         try:             # <<<<<<<<<<<<<<
 *             return track.len
 *         except AttributeError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "km3pipe/dataclasses.pyx":2154
 * 
 *     @classmethod
 *     def get_len(cls, track):             # <<<<<<<<<<<<<<
 *         try:
 *             return track.len
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.get_len", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2161
 * 
 *     @classmethod
 *     def get_usr_item(cls, track, index=None):             # <<<<<<<<<<<<<<
 *         try:
 *             item = track.usr[index]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_23get_usr_item(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_22get_usr_item[] = "TrackSeries.get_usr_item(cls, track, index=None)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_23get_usr_item = {"get_usr_item", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_23get_usr_item, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_22get_usr_item};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_23get_usr_item(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_track = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_usr_item (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_track,&__pyx_n_s_index,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_track)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_usr_item", 0, 2, 3, 1); __PYX_ERR(0, 2161, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_usr_item") < 0)) __PYX_ERR(0, 2161, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_track = values[1];
    __pyx_v_index = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_usr_item", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2161, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.get_usr_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_22get_usr_item(__pyx_self, __pyx_v_cls, __pyx_v_track, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_22get_usr_item(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_track, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__232)
  __Pyx_RefNannySetupContext("get_usr_item", 0);
  __Pyx_TraceCall("get_usr_item", __pyx_f[0], 2161, 0, __PYX_ERR(0, 2161, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2162
 *     @classmethod
 *     def get_usr_item(cls, track, index=None):
 *         try:             # <<<<<<<<<<<<<<
 *             item = track.usr[index]
 *         except IndexError:
 */
  __Pyx_TraceLine(2162,0,__PYX_ERR(0, 2162, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":2163
 *     def get_usr_item(cls, track, index=None):
 *         try:
 *             item = track.usr[index]             # <<<<<<<<<<<<<<
 *         except IndexError:
 *             item = 0.
 */
      __Pyx_TraceLine(2163,0,__PYX_ERR(0, 2163, __pyx_L3_error))
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_track, __pyx_n_s_usr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2163, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_v_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2163, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_item = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "km3pipe/dataclasses.pyx":2162
 *     @classmethod
 *     def get_usr_item(cls, track, index=None):
 *         try:             # <<<<<<<<<<<<<<
 *             item = track.usr[index]
 *         except IndexError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "km3pipe/dataclasses.pyx":2164
 *         try:
 *             item = track.usr[index]
 *         except IndexError:             # <<<<<<<<<<<<<<
 *             item = 0.
 *         return item
 */
    __Pyx_TraceLine(2164,0,__PYX_ERR(0, 2164, __pyx_L5_except_error))
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.get_usr_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 2164, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);

      /* "km3pipe/dataclasses.pyx":2165
 *             item = track.usr[index]
 *         except IndexError:
 *             item = 0.             # <<<<<<<<<<<<<<
 *         return item
 * 
 */
      __Pyx_TraceLine(2165,0,__PYX_ERR(0, 2165, __pyx_L5_except_error))
      __Pyx_INCREF(__pyx_float_0_);
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_float_0_);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "km3pipe/dataclasses.pyx":2162
 *     @classmethod
 *     def get_usr_item(cls, track, index=None):
 *         try:             # <<<<<<<<<<<<<<
 *             item = track.usr[index]
 *         except IndexError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "km3pipe/dataclasses.pyx":2166
 *         except IndexError:
 *             item = 0.
 *         return item             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2166,0,__PYX_ERR(0, 2166, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_item);
  __pyx_r = __pyx_v_item;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2161
 * 
 *     @classmethod
 *     def get_usr_item(cls, track, index=None):             # <<<<<<<<<<<<<<
 *         try:
 *             item = track.usr[index]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.get_usr_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2169
 * 
 *     @classmethod
 *     def get_usr_name(cls, track, name, index=None):             # <<<<<<<<<<<<<<
 *         """Try to retrieve item based on name from aanet.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_25get_usr_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_24get_usr_name[] = "TrackSeries.get_usr_name(cls, track, name, index=None)\nTry to retrieve item based on name from aanet.\n\n        If that fails (old aanet), try getting it via index.\n        ";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_25get_usr_name = {"get_usr_name", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_25get_usr_name, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_24get_usr_name};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_25get_usr_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_track = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_usr_name (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_track,&__pyx_n_s_name,&__pyx_n_s_index,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_track)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_usr_name", 0, 3, 4, 1); __PYX_ERR(0, 2169, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_usr_name", 0, 3, 4, 2); __PYX_ERR(0, 2169, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_usr_name") < 0)) __PYX_ERR(0, 2169, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_track = values[1];
    __pyx_v_name = values[2];
    __pyx_v_index = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_usr_name", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2169, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.get_usr_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_24get_usr_name(__pyx_self, __pyx_v_cls, __pyx_v_track, __pyx_v_name, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_24get_usr_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_track, PyObject *__pyx_v_name, PyObject *__pyx_v_index) {
  Py_ssize_t __pyx_v_name_len;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__233)
  __Pyx_RefNannySetupContext("get_usr_name", 0);
  __Pyx_TraceCall("get_usr_name", __pyx_f[0], 2169, 0, __PYX_ERR(0, 2169, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2174
 *         If that fails (old aanet), try getting it via index.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *           name_len = len(track.usr_names)
 *         except AttributeError:
 */
  __Pyx_TraceLine(2174,0,__PYX_ERR(0, 2174, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":2175
 *         """
 *         try:
 *           name_len = len(track.usr_names)             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *           name_len = 0
 */
      __Pyx_TraceLine(2175,0,__PYX_ERR(0, 2175, __pyx_L3_error))
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_track, __pyx_n_s_usr_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2175, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2175, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_name_len = __pyx_t_5;

      /* "km3pipe/dataclasses.pyx":2174
 *         If that fails (old aanet), try getting it via index.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *           name_len = len(track.usr_names)
 *         except AttributeError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":2176
 *         try:
 *           name_len = len(track.usr_names)
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *           name_len = 0
 *         if len(track.usr) > name_len:
 */
    __Pyx_TraceLine(2176,0,__PYX_ERR(0, 2176, __pyx_L5_except_error))
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.get_usr_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 2176, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "km3pipe/dataclasses.pyx":2177
 *           name_len = len(track.usr_names)
 *         except AttributeError:
 *           name_len = 0             # <<<<<<<<<<<<<<
 *         if len(track.usr) > name_len:
 *             return cls.get_usr_item(track, index)
 */
      __Pyx_TraceLine(2177,0,__PYX_ERR(0, 2177, __pyx_L5_except_error))
      __pyx_v_name_len = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "km3pipe/dataclasses.pyx":2174
 *         If that fails (old aanet), try getting it via index.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *           name_len = len(track.usr_names)
 *         except AttributeError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "km3pipe/dataclasses.pyx":2178
 *         except AttributeError:
 *           name_len = 0
 *         if len(track.usr) > name_len:             # <<<<<<<<<<<<<<
 *             return cls.get_usr_item(track, index)
 *         try:
 */
  __Pyx_TraceLine(2178,0,__PYX_ERR(0, 2178, __pyx_L1_error))
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_track, __pyx_n_s_usr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_9 = ((__pyx_t_5 > __pyx_v_name_len) != 0);
  if (__pyx_t_9) {

    /* "km3pipe/dataclasses.pyx":2179
 *           name_len = 0
 *         if len(track.usr) > name_len:
 *             return cls.get_usr_item(track, index)             # <<<<<<<<<<<<<<
 *         try:
 *           out = track.getusr(name)
 */
    __Pyx_TraceLine(2179,0,__PYX_ERR(0, 2179, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_get_usr_item); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_track, __pyx_v_index};
      __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2179, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_8);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_track, __pyx_v_index};
      __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2179, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_8);
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_track);
      __Pyx_GIVEREF(__pyx_v_track);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_v_track);
      __Pyx_INCREF(__pyx_v_index);
      __Pyx_GIVEREF(__pyx_v_index);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, __pyx_v_index);
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2178
 *         except AttributeError:
 *           name_len = 0
 *         if len(track.usr) > name_len:             # <<<<<<<<<<<<<<
 *             return cls.get_usr_item(track, index)
 *         try:
 */
  }

  /* "km3pipe/dataclasses.pyx":2180
 *         if len(track.usr) > name_len:
 *             return cls.get_usr_item(track, index)
 *         try:             # <<<<<<<<<<<<<<
 *           out = track.getusr(name)
 *         except (AttributeError, KeyError):
 */
  __Pyx_TraceLine(2180,0,__PYX_ERR(0, 2180, __pyx_L12_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_1);
    /*try:*/ {

      /* "km3pipe/dataclasses.pyx":2181
 *             return cls.get_usr_item(track, index)
 *         try:
 *           out = track.getusr(name)             # <<<<<<<<<<<<<<
 *         except (AttributeError, KeyError):
 *           out = 0
 */
      __Pyx_TraceLine(2181,0,__PYX_ERR(0, 2181, __pyx_L12_error))
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_track, __pyx_n_s_getusr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2181, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      if (!__pyx_t_10) {
        __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2181, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_8);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_name};
          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2181, __pyx_L12_error)
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_GOTREF(__pyx_t_8);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_name};
          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2181, __pyx_L12_error)
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_GOTREF(__pyx_t_8);
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2181, __pyx_L12_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10); __pyx_t_10 = NULL;
          __Pyx_INCREF(__pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_name);
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2181, __pyx_L12_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_out = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "km3pipe/dataclasses.pyx":2180
 *         if len(track.usr) > name_len:
 *             return cls.get_usr_item(track, index)
 *         try:             # <<<<<<<<<<<<<<
 *           out = track.getusr(name)
 *         except (AttributeError, KeyError):
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L17_try_end;
    __pyx_L12_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "km3pipe/dataclasses.pyx":2182
 *         try:
 *           out = track.getusr(name)
 *         except (AttributeError, KeyError):             # <<<<<<<<<<<<<<
 *           out = 0
 *         return out
 */
    __Pyx_TraceLine(2182,0,__PYX_ERR(0, 2182, __pyx_L14_except_error))
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.get_usr_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_4) < 0) __PYX_ERR(0, 2182, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_4);

      /* "km3pipe/dataclasses.pyx":2183
 *           out = track.getusr(name)
 *         except (AttributeError, KeyError):
 *           out = 0             # <<<<<<<<<<<<<<
 *         return out
 * 
 */
      __Pyx_TraceLine(2183,0,__PYX_ERR(0, 2183, __pyx_L14_except_error))
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_XDECREF_SET(__pyx_v_out, __pyx_int_0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L13_exception_handled;
    }
    goto __pyx_L14_except_error;
    __pyx_L14_except_error:;

    /* "km3pipe/dataclasses.pyx":2180
 *         if len(track.usr) > name_len:
 *             return cls.get_usr_item(track, index)
 *         try:             # <<<<<<<<<<<<<<
 *           out = track.getusr(name)
 *         except (AttributeError, KeyError):
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    goto __pyx_L1_error;
    __pyx_L13_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    __pyx_L17_try_end:;
  }

  /* "km3pipe/dataclasses.pyx":2184
 *         except (AttributeError, KeyError):
 *           out = 0
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(2184,0,__PYX_ERR(0, 2184, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2169
 * 
 *     @classmethod
 *     def get_usr_name(cls, track, name, index=None):             # <<<<<<<<<<<<<<
 *         """Try to retrieve item based on name from aanet.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.get_usr_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2187
 * 
 *     @property
 *     def highest_energetic_muon(self):             # <<<<<<<<<<<<<<
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_27highest_energetic_muon(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_26highest_energetic_muon[] = "TrackSeries.highest_energetic_muon(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_27highest_energetic_muon = {"highest_energetic_muon", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_27highest_energetic_muon, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_26highest_energetic_muon};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_27highest_energetic_muon(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("highest_energetic_muon (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_26highest_energetic_muon(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2192
 *             if len(muons) == 0:
 *                 raise AttributeError("No muon found")
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)             # <<<<<<<<<<<<<<
 *         return self._highest_energetic_muon
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_22highest_energetic_muon_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_m); /*proto*/
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_22highest_energetic_muon_lambda2 = {"lambda2", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_22highest_energetic_muon_lambda2, METH_O, 0};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_22highest_energetic_muon_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_m) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, ((PyObject *)__pyx_v_m));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_m) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("lambda2", 0);
  __Pyx_TraceCall("lambda2", __pyx_f[0], 2192, 0, __PYX_ERR(0, 2192, __pyx_L1_error));
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_energy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.highest_energetic_muon.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2187
 * 
 *     @property
 *     def highest_energetic_muon(self):             # <<<<<<<<<<<<<<
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 */

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_26highest_energetic_muon(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_muons = NULL;
  PyObject *__pyx_v_track = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__234)
  __Pyx_RefNannySetupContext("highest_energetic_muon", 0);
  __Pyx_TraceCall("highest_energetic_muon", __pyx_f[0], 2187, 0, __PYX_ERR(0, 2187, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2188
 *     @property
 *     def highest_energetic_muon(self):
 *         if self._highest_energetic_muon is None:             # <<<<<<<<<<<<<<
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:
 */
  __Pyx_TraceLine(2188,0,__PYX_ERR(0, 2188, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_highest_energetic_muon); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":2189
 *     def highest_energetic_muon(self):
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]             # <<<<<<<<<<<<<<
 *             if len(muons) == 0:
 *                 raise AttributeError("No muon found")
 */
    __Pyx_TraceLine(2189,0,__PYX_ERR(0, 2189, __pyx_L1_error))
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_self)) || PyTuple_CheckExact(__pyx_v_self)) {
      __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2189, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2189, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2189, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2189, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2189, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        }
      } else {
        __pyx_t_7 = __pyx_t_6(__pyx_t_4);
        if (unlikely(!__pyx_t_7)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2189, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF_SET(__pyx_v_track, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_track, __pyx_n_s_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyNumber_Absolute(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyInt_EqObjC(__pyx_t_8, __pyx_int_13, 13, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2189, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_3) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_track))) __PYX_ERR(0, 2189, __pyx_L1_error)
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_muons = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":2190
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:             # <<<<<<<<<<<<<<
 *                 raise AttributeError("No muon found")
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)
 */
    __Pyx_TraceLine(2190,0,__PYX_ERR(0, 2190, __pyx_L1_error))
    __pyx_t_5 = PyList_GET_SIZE(__pyx_v_muons); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2190, __pyx_L1_error)
    __pyx_t_3 = ((__pyx_t_5 == 0) != 0);
    if (__pyx_t_3) {

      /* "km3pipe/dataclasses.pyx":2191
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:
 *                 raise AttributeError("No muon found")             # <<<<<<<<<<<<<<
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)
 *         return self._highest_energetic_muon
 */
      __Pyx_TraceLine(2191,0,__PYX_ERR(0, 2191, __pyx_L1_error))
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__235, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 2191, __pyx_L1_error)

      /* "km3pipe/dataclasses.pyx":2190
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:             # <<<<<<<<<<<<<<
 *                 raise AttributeError("No muon found")
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)
 */
    }

    /* "km3pipe/dataclasses.pyx":2192
 *             if len(muons) == 0:
 *                 raise AttributeError("No muon found")
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)             # <<<<<<<<<<<<<<
 *         return self._highest_energetic_muon
 * 
 */
    __Pyx_TraceLine(2192,0,__PYX_ERR(0, 2192, __pyx_L1_error))
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_muons);
    __Pyx_GIVEREF(__pyx_v_muons);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_muons);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_22highest_energetic_muon_lambda2, 0, __pyx_n_s_TrackSeries_highest_energetic_mu, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_key, __pyx_t_7) < 0) __PYX_ERR(0, 2192, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_max, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_highest_energetic_muon, __pyx_t_7) < 0) __PYX_ERR(0, 2192, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "km3pipe/dataclasses.pyx":2188
 *     @property
 *     def highest_energetic_muon(self):
 *         if self._highest_energetic_muon is None:             # <<<<<<<<<<<<<<
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:
 */
  }

  /* "km3pipe/dataclasses.pyx":2193
 *                 raise AttributeError("No muon found")
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)
 *         return self._highest_energetic_muon             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_TraceLine(2193,0,__PYX_ERR(0, 2193, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_highest_energetic_muon); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2187
 * 
 *     @property
 *     def highest_energetic_muon(self):             # <<<<<<<<<<<<<<
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.highest_energetic_muon", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_muons);
  __Pyx_XDECREF(__pyx_v_track);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2195
 *         return self._highest_energetic_muon
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_29__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_28__iter__[] = "TrackSeries.__iter__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_29__iter__ = {"__iter__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_29__iter__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_28__iter__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_29__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_28__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_28__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__236)
  __Pyx_RefNannySetupContext("__iter__", 0);
  __Pyx_TraceCall("__iter__", __pyx_f[0], 2195, 0, __PYX_ERR(0, 2195, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2196
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_TraceLine(2196,0,__PYX_ERR(0, 2196, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2195
 *         return self._highest_energetic_muon
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2198
 *         return self
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_31__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_30__iter__[] = "TrackSeries.__iter__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_31__iter__ = {"__iter__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_31__iter__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_30__iter__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_31__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_30__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_30__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__237)
  __Pyx_RefNannySetupContext("__iter__", 0);
  __Pyx_TraceCall("__iter__", __pyx_f[0], 2198, 0, __PYX_ERR(0, 2198, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2199
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(2199,0,__PYX_ERR(0, 2199, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2198
 *         return self
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2202
 * 
 *     @property
 *     def bjorkeny(self):             # <<<<<<<<<<<<<<
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_33bjorkeny(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_32bjorkeny[] = "TrackSeries.bjorkeny(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_33bjorkeny = {"bjorkeny", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_33bjorkeny, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_32bjorkeny};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_33bjorkeny(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bjorkeny (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_32bjorkeny(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_32bjorkeny(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__238)
  __Pyx_RefNannySetupContext("bjorkeny", 0);
  __Pyx_TraceCall("bjorkeny", __pyx_f[0], 2202, 0, __PYX_ERR(0, 2202, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2203
 *     @property
 *     def bjorkeny(self):
 *         if self._bjorkeny is None:             # <<<<<<<<<<<<<<
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 *         return self._bjorkeny
 */
  __Pyx_TraceLine(2203,0,__PYX_ERR(0, 2203, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_bjorkeny_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":2204
 *     def bjorkeny(self):
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._bjorkeny
 * 
 */
    __Pyx_TraceLine(2204,0,__PYX_ERR(0, 2204, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2204, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2204, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2204, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2204, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2204, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2204, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_bjorkeny); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 2204, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2204, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2204, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2204, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2204, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2204, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_bjorkeny_2, __pyx_t_1) < 0) __PYX_ERR(0, 2204, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":2203
 *     @property
 *     def bjorkeny(self):
 *         if self._bjorkeny is None:             # <<<<<<<<<<<<<<
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 *         return self._bjorkeny
 */
  }

  /* "km3pipe/dataclasses.pyx":2205
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 *         return self._bjorkeny             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(2205,0,__PYX_ERR(0, 2205, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_bjorkeny_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2202
 * 
 *     @property
 *     def bjorkeny(self):             # <<<<<<<<<<<<<<
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.bjorkeny", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2208
 * 
 *     @property
 *     def is_cc(self):             # <<<<<<<<<<<<<<
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_35is_cc(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_34is_cc[] = "TrackSeries.is_cc(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_35is_cc = {"is_cc", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_35is_cc, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_34is_cc};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_35is_cc(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_cc (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_34is_cc(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_34is_cc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__239)
  __Pyx_RefNannySetupContext("is_cc", 0);
  __Pyx_TraceCall("is_cc", __pyx_f[0], 2208, 0, __PYX_ERR(0, 2208, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2209
 *     @property
 *     def is_cc(self):
 *         if self._is_cc is None:             # <<<<<<<<<<<<<<
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 *         return self._is_cc
 */
  __Pyx_TraceLine(2209,0,__PYX_ERR(0, 2209, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_is_cc_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":2210
 *     def is_cc(self):
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._is_cc
 * 
 */
    __Pyx_TraceLine(2210,0,__PYX_ERR(0, 2210, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2210, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2210, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2210, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2210, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2210, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2210, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2210, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_is_cc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2210, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 2210, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2210, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2210, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2210, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2210, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2210, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_is_cc_2, __pyx_t_1) < 0) __PYX_ERR(0, 2210, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":2209
 *     @property
 *     def is_cc(self):
 *         if self._is_cc is None:             # <<<<<<<<<<<<<<
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 *         return self._is_cc
 */
  }

  /* "km3pipe/dataclasses.pyx":2211
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 *         return self._is_cc             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(2211,0,__PYX_ERR(0, 2211, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_is_cc_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2208
 * 
 *     @property
 *     def is_cc(self):             # <<<<<<<<<<<<<<
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.is_cc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2214
 * 
 *     @property
 *     def interaction_channel(self):             # <<<<<<<<<<<<<<
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_37interaction_channel(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_36interaction_channel[] = "TrackSeries.interaction_channel(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_37interaction_channel = {"interaction_channel", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_37interaction_channel, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_36interaction_channel};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_37interaction_channel(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("interaction_channel (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_36interaction_channel(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_36interaction_channel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__240)
  __Pyx_RefNannySetupContext("interaction_channel", 0);
  __Pyx_TraceCall("interaction_channel", __pyx_f[0], 2214, 0, __PYX_ERR(0, 2214, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2215
 *     @property
 *     def interaction_channel(self):
 *         if self._interaction_channel is None:             # <<<<<<<<<<<<<<
 *             self._interaction_channel = np.array([t.interaction_channel for
 *                                                   t in self._tracks])
 */
  __Pyx_TraceLine(2215,0,__PYX_ERR(0, 2215, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interaction_channel_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":2216
 *     def interaction_channel(self):
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for             # <<<<<<<<<<<<<<
 *                                                   t in self._tracks])
 *         return self._interaction_channel
 */
    __Pyx_TraceLine(2216,0,__PYX_ERR(0, 2216, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "km3pipe/dataclasses.pyx":2217
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for
 *                                                   t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._interaction_channel
 * 
 */
    __Pyx_TraceLine(2217,0,__PYX_ERR(0, 2217, __pyx_L1_error))
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2217, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2217, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2217, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2217, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2217, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2217, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2217, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "km3pipe/dataclasses.pyx":2216
 *     def interaction_channel(self):
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for             # <<<<<<<<<<<<<<
 *                                                   t in self._tracks])
 *         return self._interaction_channel
 */
      __Pyx_TraceLine(2216,0,__PYX_ERR(0, 2216, __pyx_L1_error))
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_interaction_channel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2216, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 2216, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2216, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2216, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2216, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2216, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2216, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_interaction_channel_2, __pyx_t_1) < 0) __PYX_ERR(0, 2216, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":2215
 *     @property
 *     def interaction_channel(self):
 *         if self._interaction_channel is None:             # <<<<<<<<<<<<<<
 *             self._interaction_channel = np.array([t.interaction_channel for
 *                                                   t in self._tracks])
 */
  }

  /* "km3pipe/dataclasses.pyx":2218
 *             self._interaction_channel = np.array([t.interaction_channel for
 *                                                   t in self._tracks])
 *         return self._interaction_channel             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(2218,0,__PYX_ERR(0, 2218, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interaction_channel_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2214
 * 
 *     @property
 *     def interaction_channel(self):             # <<<<<<<<<<<<<<
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.interaction_channel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2221
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_39id(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_38id[] = "TrackSeries.id(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_39id = {"id", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_39id, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_38id};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_39id(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("id (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_38id(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_38id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__241)
  __Pyx_RefNannySetupContext("id", 0);
  __Pyx_TraceCall("id", __pyx_f[0], 2221, 0, __PYX_ERR(0, 2221, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2222
 *     @property
 *     def id(self):
 *         if self._id is None:             # <<<<<<<<<<<<<<
 *             self._id = np.array([t.id for t in self._tracks])
 *         return self._id
 */
  __Pyx_TraceLine(2222,0,__PYX_ERR(0, 2222, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_id_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":2223
 *     def id(self):
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._id
 * 
 */
    __Pyx_TraceLine(2223,0,__PYX_ERR(0, 2223, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2223, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2223, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2223, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2223, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2223, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2223, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2223, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_id); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2223, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 2223, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2223, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2223, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2223, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2223, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2223, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_id_2, __pyx_t_1) < 0) __PYX_ERR(0, 2223, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":2222
 *     @property
 *     def id(self):
 *         if self._id is None:             # <<<<<<<<<<<<<<
 *             self._id = np.array([t.id for t in self._tracks])
 *         return self._id
 */
  }

  /* "km3pipe/dataclasses.pyx":2224
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])
 *         return self._id             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(2224,0,__PYX_ERR(0, 2224, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_id_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2221
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2227
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_41time(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_40time[] = "TrackSeries.time(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_41time = {"time", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_41time, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_40time};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_41time(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_40time(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_40time(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__242)
  __Pyx_RefNannySetupContext("time", 0);
  __Pyx_TraceCall("time", __pyx_f[0], 2227, 0, __PYX_ERR(0, 2227, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2228
 *     @property
 *     def time(self):
 *         if self._time is None:             # <<<<<<<<<<<<<<
 *             self._time = np.array([t.time for t in self._tracks])
 *         return self._time
 */
  __Pyx_TraceLine(2228,0,__PYX_ERR(0, 2228, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_time_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":2229
 *     def time(self):
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._time
 * 
 */
    __Pyx_TraceLine(2229,0,__PYX_ERR(0, 2229, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2229, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2229, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2229, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2229, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2229, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2229, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 2229, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2229, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2229, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2229, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2229, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2229, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_time_2, __pyx_t_1) < 0) __PYX_ERR(0, 2229, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":2228
 *     @property
 *     def time(self):
 *         if self._time is None:             # <<<<<<<<<<<<<<
 *             self._time = np.array([t.time for t in self._tracks])
 *         return self._time
 */
  }

  /* "km3pipe/dataclasses.pyx":2230
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])
 *         return self._time             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(2230,0,__PYX_ERR(0, 2230, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_time_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2227
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2233
 * 
 *     @property
 *     def energy(self):             # <<<<<<<<<<<<<<
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_43energy(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_42energy[] = "TrackSeries.energy(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_43energy = {"energy", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_43energy, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_42energy};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_43energy(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("energy (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_42energy(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_42energy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__243)
  __Pyx_RefNannySetupContext("energy", 0);
  __Pyx_TraceCall("energy", __pyx_f[0], 2233, 0, __PYX_ERR(0, 2233, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2234
 *     @property
 *     def energy(self):
 *         if self._energy is None:             # <<<<<<<<<<<<<<
 *             self._energy = np.array([t.energy for t in self._tracks])
 *         return self._energy
 */
  __Pyx_TraceLine(2234,0,__PYX_ERR(0, 2234, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_energy_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":2235
 *     def energy(self):
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._energy
 * 
 */
    __Pyx_TraceLine(2235,0,__PYX_ERR(0, 2235, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2235, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2235, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2235, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2235, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2235, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2235, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2235, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_energy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2235, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 2235, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2235, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2235, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2235, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2235, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2235, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_energy_2, __pyx_t_1) < 0) __PYX_ERR(0, 2235, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":2234
 *     @property
 *     def energy(self):
 *         if self._energy is None:             # <<<<<<<<<<<<<<
 *             self._energy = np.array([t.energy for t in self._tracks])
 *         return self._energy
 */
  }

  /* "km3pipe/dataclasses.pyx":2236
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])
 *         return self._energy             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(2236,0,__PYX_ERR(0, 2236, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_energy_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2233
 * 
 *     @property
 *     def energy(self):             # <<<<<<<<<<<<<<
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.energy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2239
 * 
 *     @property
 *     def length(self):             # <<<<<<<<<<<<<<
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_45length(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_44length[] = "TrackSeries.length(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_45length = {"length", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_45length, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_44length};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_45length(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("length (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_44length(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_44length(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__244)
  __Pyx_RefNannySetupContext("length", 0);
  __Pyx_TraceCall("length", __pyx_f[0], 2239, 0, __PYX_ERR(0, 2239, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2240
 *     @property
 *     def length(self):
 *         if self._length is None:             # <<<<<<<<<<<<<<
 *             self._length = np.array([t.length for t in self._tracks])
 *         return self._length
 */
  __Pyx_TraceLine(2240,0,__PYX_ERR(0, 2240, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":2241
 *     def length(self):
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._length
 * 
 */
    __Pyx_TraceLine(2241,0,__PYX_ERR(0, 2241, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2241, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2241, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2241, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2241, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2241, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2241, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2241, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2241, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 2241, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2241, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2241, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2241, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2241, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2241, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_length_2, __pyx_t_1) < 0) __PYX_ERR(0, 2241, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":2240
 *     @property
 *     def length(self):
 *         if self._length is None:             # <<<<<<<<<<<<<<
 *             self._length = np.array([t.length for t in self._tracks])
 *         return self._length
 */
  }

  /* "km3pipe/dataclasses.pyx":2242
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])
 *         return self._length             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(2242,0,__PYX_ERR(0, 2242, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2239
 * 
 *     @property
 *     def length(self):             # <<<<<<<<<<<<<<
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.length", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2245
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_47type(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_46type[] = "TrackSeries.type(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_47type = {"type", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_47type, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_46type};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_47type(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("type (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_46type(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_46type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__245)
  __Pyx_RefNannySetupContext("type", 0);
  __Pyx_TraceCall("type", __pyx_f[0], 2245, 0, __PYX_ERR(0, 2245, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2246
 *     @property
 *     def type(self):
 *         if self._type is None:             # <<<<<<<<<<<<<<
 *             self._type = np.array([t.type for t in self._tracks])
 *         return self._type
 */
  __Pyx_TraceLine(2246,0,__PYX_ERR(0, 2246, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_type_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":2247
 *     def type(self):
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._type
 * 
 */
    __Pyx_TraceLine(2247,0,__PYX_ERR(0, 2247, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2247, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2247, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2247, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2247, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2247, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2247, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2247, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2247, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 2247, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2247, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2247, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2247, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2247, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2247, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_type_2, __pyx_t_1) < 0) __PYX_ERR(0, 2247, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":2246
 *     @property
 *     def type(self):
 *         if self._type is None:             # <<<<<<<<<<<<<<
 *             self._type = np.array([t.type for t in self._tracks])
 *         return self._type
 */
  }

  /* "km3pipe/dataclasses.pyx":2248
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])
 *         return self._type             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(2248,0,__PYX_ERR(0, 2248, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_type_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2245
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2251
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_49pos(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_48pos[] = "TrackSeries.pos(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_49pos = {"pos", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_49pos, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_48pos};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_49pos(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pos (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_48pos(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_48pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__246)
  __Pyx_RefNannySetupContext("pos", 0);
  __Pyx_TraceCall("pos", __pyx_f[0], 2251, 0, __PYX_ERR(0, 2251, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2252
 *     @property
 *     def pos(self):
 *         if self._pos is None:             # <<<<<<<<<<<<<<
 *             self._pos = np.array([t.pos for t in self._tracks])
 *         return self._pos
 */
  __Pyx_TraceLine(2252,0,__PYX_ERR(0, 2252, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pos_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":2253
 *     def pos(self):
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._pos
 * 
 */
    __Pyx_TraceLine(2253,0,__PYX_ERR(0, 2253, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2253, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2253, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2253, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2253, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2253, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2253, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_pos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 2253, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2253, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2253, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2253, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2253, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2253, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pos_2, __pyx_t_1) < 0) __PYX_ERR(0, 2253, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":2252
 *     @property
 *     def pos(self):
 *         if self._pos is None:             # <<<<<<<<<<<<<<
 *             self._pos = np.array([t.pos for t in self._tracks])
 *         return self._pos
 */
  }

  /* "km3pipe/dataclasses.pyx":2254
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])
 *         return self._pos             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(2254,0,__PYX_ERR(0, 2254, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pos_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2251
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2257
 * 
 *     @property
 *     def dir(self):             # <<<<<<<<<<<<<<
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_51dir(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_50dir[] = "TrackSeries.dir(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_51dir = {"dir", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_51dir, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_50dir};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_51dir(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dir (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_50dir(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_50dir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  __Pyx_TraceFrameInit(__pyx_codeobj__247)
  __Pyx_RefNannySetupContext("dir", 0);
  __Pyx_TraceCall("dir", __pyx_f[0], 2257, 0, __PYX_ERR(0, 2257, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2258
 *     @property
 *     def dir(self):
 *         if self._dir is None:             # <<<<<<<<<<<<<<
 *             self._dir = np.array([t.dir for t in self._tracks])
 *         return self._dir
 */
  __Pyx_TraceLine(2258,0,__PYX_ERR(0, 2258, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dir_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":2259
 *     def dir(self):
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])             # <<<<<<<<<<<<<<
 *         return self._dir
 * 
 */
    __Pyx_TraceLine(2259,0,__PYX_ERR(0, 2259, __pyx_L1_error))
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2259, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2259, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2259, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2259, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2259, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2259, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2259, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_dir); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2259, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 2259, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2259, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2259, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2259, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2259, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2259, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dir_2, __pyx_t_1) < 0) __PYX_ERR(0, 2259, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "km3pipe/dataclasses.pyx":2258
 *     @property
 *     def dir(self):
 *         if self._dir is None:             # <<<<<<<<<<<<<<
 *             self._dir = np.array([t.dir for t in self._tracks])
 *         return self._dir
 */
  }

  /* "km3pipe/dataclasses.pyx":2260
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])
 *         return self._dir             # <<<<<<<<<<<<<<
 * 
 *     def next(self):
 */
  __Pyx_TraceLine(2260,0,__PYX_ERR(0, 2260, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dir_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2257
 * 
 *     @property
 *     def dir(self):             # <<<<<<<<<<<<<<
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.dir", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2262
 *         return self._dir
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_53next(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_52next[] = "TrackSeries.next(self)\nPython 2/3 compatibility for iterators";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_53next = {"next", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_53next, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_52next};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_53next(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_52next(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_52next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__248)
  __Pyx_RefNannySetupContext("next", 0);
  __Pyx_TraceCall("next", __pyx_f[0], 2262, 0, __PYX_ERR(0, 2262, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2264
 *     def next(self):
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_TraceLine(2264,0,__PYX_ERR(0, 2264, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2264, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2264, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2262
 *         return self._dir
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2266
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_55__next__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_54__next__[] = "TrackSeries.__next__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_55__next__ = {"__next__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_55__next__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_54__next__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_55__next__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_54__next__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_54__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_TraceFrameInit(__pyx_codeobj__249)
  __Pyx_RefNannySetupContext("__next__", 0);
  __Pyx_TraceCall("__next__", __pyx_f[0], 2266, 0, __PYX_ERR(0, 2266, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2267
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  __Pyx_TraceLine(2267,0,__PYX_ERR(0, 2267, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2267, __pyx_L1_error)
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "km3pipe/dataclasses.pyx":2268
 *     def __next__(self):
 *         if self._index >= len(self):
 *             self._index = 0             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         item = self._tracks[self._index]
 */
    __Pyx_TraceLine(2268,0,__PYX_ERR(0, 2268, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_int_0) < 0) __PYX_ERR(0, 2268, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":2269
 *         if self._index >= len(self):
 *             self._index = 0
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         item = self._tracks[self._index]
 *         self._index += 1
 */
    __Pyx_TraceLine(2269,0,__PYX_ERR(0, 2269, __pyx_L1_error))
    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
    __PYX_ERR(0, 2269, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":2267
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  }

  /* "km3pipe/dataclasses.pyx":2270
 *             self._index = 0
 *             raise StopIteration
 *         item = self._tracks[self._index]             # <<<<<<<<<<<<<<
 *         self._index += 1
 *         return item
 */
  __Pyx_TraceLine(2270,0,__PYX_ERR(0, 2270, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetItem(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_item = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2271
 *             raise StopIteration
 *         item = self._tracks[self._index]
 *         self._index += 1             # <<<<<<<<<<<<<<
 *         return item
 * 
 */
  __Pyx_TraceLine(2271,0,__PYX_ERR(0, 2271, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_t_3) < 0) __PYX_ERR(0, 2271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":2272
 *         item = self._tracks[self._index]
 *         self._index += 1
 *         return item             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(2272,0,__PYX_ERR(0, 2272, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_item);
  __pyx_r = __pyx_v_item;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2266
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2274
 *         return item
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return len(self._tracks)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_57__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_56__len__[] = "TrackSeries.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_57__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_57__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_56__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_57__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_56__len__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_56__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  __Pyx_TraceFrameInit(__pyx_codeobj__250)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 2274, 0, __PYX_ERR(0, 2274, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2275
 * 
 *     def __len__(self):
 *         return len(self._tracks)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index):
 */
  __Pyx_TraceLine(2275,0,__PYX_ERR(0, 2275, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2274
 *         return item
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return len(self._tracks)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2277
 *         return len(self._tracks)
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._tracks[index]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_59__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_58__getitem__[] = "TrackSeries.__getitem__(self, index)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_59__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_59__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_58__getitem__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_59__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 2277, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 2277, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2277, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_58__getitem__(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_58__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__251)
  __Pyx_RefNannySetupContext("__getitem__", 0);
  __Pyx_TraceCall("__getitem__", __pyx_f[0], 2277, 0, __PYX_ERR(0, 2277, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2278
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return self._tracks[index]
 *         elif isinstance(index, slice):
 */
  __Pyx_TraceLine(2278,0,__PYX_ERR(0, 2278, __pyx_L1_error))
  __pyx_t_1 = PyInt_Check(__pyx_v_index); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":2279
 *     def __getitem__(self, index):
 *         if isinstance(index, int):
 *             return self._tracks[index]             # <<<<<<<<<<<<<<
 *         elif isinstance(index, slice):
 *             return self._slice_generator(index)
 */
    __Pyx_TraceLine(2279,0,__PYX_ERR(0, 2279, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2278
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return self._tracks[index]
 *         elif isinstance(index, slice):
 */
  }

  /* "km3pipe/dataclasses.pyx":2280
 *         if isinstance(index, int):
 *             return self._tracks[index]
 *         elif isinstance(index, slice):             # <<<<<<<<<<<<<<
 *             return self._slice_generator(index)
 *         else:
 */
  __Pyx_TraceLine(2280,0,__PYX_ERR(0, 2280, __pyx_L1_error))
  __pyx_t_2 = PySlice_Check(__pyx_v_index); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":2281
 *             return self._tracks[index]
 *         elif isinstance(index, slice):
 *             return self._slice_generator(index)             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("index must be int or slice")
 */
    __Pyx_TraceLine(2281,0,__PYX_ERR(0, 2281, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_generator); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2281, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_index};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2281, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_index};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2281, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2281, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_index);
        __Pyx_GIVEREF(__pyx_v_index);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_index);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2281, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2280
 *         if isinstance(index, int):
 *             return self._tracks[index]
 *         elif isinstance(index, slice):             # <<<<<<<<<<<<<<
 *             return self._slice_generator(index)
 *         else:
 */
  }

  /* "km3pipe/dataclasses.pyx":2283
 *             return self._slice_generator(index)
 *         else:
 *             raise TypeError("index must be int or slice")             # <<<<<<<<<<<<<<
 * 
 *     def _slice_generator(self, index):
 */
  __Pyx_TraceLine(2283,0,__PYX_ERR(0, 2283, __pyx_L1_error))
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__252, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 2283, __pyx_L1_error)
  }

  /* "km3pipe/dataclasses.pyx":2277
 *         return len(self._tracks)
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._tracks[index]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7km3pipe_11dataclasses_11TrackSeries_62generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "km3pipe/dataclasses.pyx":2285
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_61_slice_generator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_60_slice_generator[] = "TrackSeries._slice_generator(self, index)\nA simple slice generator for iterations";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_61_slice_generator = {"_slice_generator", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_61_slice_generator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_60_slice_generator};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_61_slice_generator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_slice_generator (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_slice_generator", 1, 2, 2, 1); __PYX_ERR(0, 2285, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_slice_generator") < 0)) __PYX_ERR(0, 2285, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_slice_generator", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2285, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries._slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_60_slice_generator(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_60_slice_generator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_slice_generator", 0);
  __pyx_cur_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *)__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator(__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2285, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_index = __pyx_v_index;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_index);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_index);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7km3pipe_11dataclasses_11TrackSeries_62generator1, (PyObject *) __pyx_cur_scope, __pyx_n_s_slice_generator, __pyx_n_s_TrackSeries__slice_generator, __pyx_n_s_km3pipe_dataclasses); if (unlikely(!gen)) __PYX_ERR(0, 2285, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries._slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7km3pipe_11dataclasses_11TrackSeries_62generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *__pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *(*__pyx_t_8)(PyObject *);
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_slice_generator", 0);
  __Pyx_TraceCall("_slice_generator", __pyx_f[0], 2285, 0, __PYX_ERR(0, 2285, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2285, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2287
 *     def _slice_generator(self, index):
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))             # <<<<<<<<<<<<<<
 *         for i in range(start, stop, step):
 *             yield self._tracks[i]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_index, __pyx_n_s_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_cur_scope->__pyx_v_self); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2287, __pyx_L1_error)
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2287, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2287, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2287, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2287, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2287, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if !CYTHON_COMPILING_IN_PYPY
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2287, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 2; __pyx_t_4 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_5), 3) < 0) __PYX_ERR(0, 2287, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2287, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_start = __pyx_t_2;
  __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_cur_scope->__pyx_v_stop = __pyx_t_6;
  __pyx_t_6 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_cur_scope->__pyx_v_step = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":2288
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):             # <<<<<<<<<<<<<<
 *             yield self._tracks[i]
 * 
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_start);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_start);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_start);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stop);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stop);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_stop);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_step);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_step);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_cur_scope->__pyx_v_step);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2288, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2288, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2288, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2288, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2288, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_8(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2288, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":2289
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):
 *             yield self._tracks[i]             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyObject_GetItem(__pyx_t_4, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_8;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_TraceReturn(__pyx_r, 0);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L8_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_8 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2289, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":2288
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):             # <<<<<<<<<<<<<<
 *             yield self._tracks[i]
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "km3pipe/dataclasses.pyx":2285
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("_slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2291
 *             yield self._tracks[i]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_64__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_63__str__[] = "TrackSeries.__str__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_64__str__ = {"__str__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_64__str__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_63__str__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_64__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_63__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_63__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_v_n_tracks;
  PyObject *__pyx_v_plural = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__253)
  __Pyx_RefNannySetupContext("__str__", 0);
  __Pyx_TraceCall("__str__", __pyx_f[0], 2291, 0, __PYX_ERR(0, 2291, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2292
 * 
 *     def __str__(self):
 *         n_tracks = len(self)             # <<<<<<<<<<<<<<
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 *         return("TrackSeries with {0} track{1}.".format(len(self), plural))
 */
  __Pyx_TraceLine(2292,0,__PYX_ERR(0, 2292, __pyx_L1_error))
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2292, __pyx_L1_error)
  __pyx_v_n_tracks = __pyx_t_1;

  /* "km3pipe/dataclasses.pyx":2293
 *     def __str__(self):
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''             # <<<<<<<<<<<<<<
 *         return("TrackSeries with {0} track{1}.".format(len(self), plural))
 * 
 */
  __Pyx_TraceLine(2293,0,__PYX_ERR(0, 2293, __pyx_L1_error))
  __pyx_t_4 = ((__pyx_v_n_tracks > 1) != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_4 = ((__pyx_v_n_tracks == 0) != 0);
  __pyx_t_3 = __pyx_t_4;
  __pyx_L3_bool_binop_done:;
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_n_s_s);
    __pyx_t_2 = __pyx_n_s_s;
  } else {
    __Pyx_INCREF(__pyx_kp_s__88);
    __pyx_t_2 = __pyx_kp_s__88;
  }
  __pyx_v_plural = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":2294
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 *         return("TrackSeries with {0} track{1}.".format(len(self), plural))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_TraceLine(2294,0,__PYX_ERR(0, 2294, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_TrackSeries_with_0_track_1, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2294, __pyx_L1_error)
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2294, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_plural};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2294, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_plural);
    __Pyx_GIVEREF(__pyx_v_plural);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_plural);
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2291
 *             yield self._tracks[i]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_plural);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2296
 *         return("TrackSeries with {0} track{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_66__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_65__repr__[] = "TrackSeries.__repr__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_66__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_66__repr__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_65__repr__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_66__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_65__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_65__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__254)
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 2296, 0, __PYX_ERR(0, 2296, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2297
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __insp__(self):
 */
  __Pyx_TraceLine(2297,0,__PYX_ERR(0, 2297, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2296
 *         return("TrackSeries with {0} track{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2299
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(track) for track in self._tracks])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_68__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_67__insp__[] = "TrackSeries.__insp__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_68__insp__ = {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_68__insp__, METH_O, __pyx_doc_7km3pipe_11dataclasses_11TrackSeries_67__insp__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_11TrackSeries_68__insp__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__insp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_11TrackSeries_67__insp__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_11TrackSeries_67__insp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_track = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__255)
  __Pyx_RefNannySetupContext("__insp__", 0);
  __Pyx_TraceCall("__insp__", __pyx_f[0], 2299, 0, __PYX_ERR(0, 2299, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2300
 * 
 *     def __insp__(self):
 *         return '\n'.join([str(track) for track in self._tracks])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(2300,0,__PYX_ERR(0, 2300, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tracks_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2300, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2300, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2300, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2300, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2300, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2300, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_track, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_track);
    __Pyx_GIVEREF(__pyx_v_track);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_track);
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 2300, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__91, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2299
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(track) for track in self._tracks])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.TrackSeries.__insp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_track);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2315
 *     h5loc = '/'
 * 
 *     def __init__(self, arr):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries___init__[] = "SummaryframeSeries.__init__(self, arr)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_arr_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 2315, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2315, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_arr = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2315, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries___init__(__pyx_self, __pyx_v_self, __pyx_v_arr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__256)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 2315, 0, __PYX_ERR(0, 2315, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2316
 * 
 *     def __init__(self, arr):
 *         self._arr = arr             # <<<<<<<<<<<<<<
 *         self._index = 0
 *         self._frames = None
 */
  __Pyx_TraceLine(2316,0,__PYX_ERR(0, 2316, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_arr, __pyx_v_arr) < 0) __PYX_ERR(0, 2316, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2317
 *     def __init__(self, arr):
 *         self._arr = arr
 *         self._index = 0             # <<<<<<<<<<<<<<
 *         self._frames = None
 * 
 */
  __Pyx_TraceLine(2317,0,__PYX_ERR(0, 2317, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_int_0) < 0) __PYX_ERR(0, 2317, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2318
 *         self._arr = arr
 *         self._index = 0
 *         self._frames = None             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2318,0,__PYX_ERR(0, 2318, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_frames, Py_None) < 0) __PYX_ERR(0, 2318, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2315
 *     h5loc = '/'
 * 
 *     def __init__(self, arr):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2321
 * 
 *     @classmethod
 *     def from_arrays(cls, dom_ids, max_sequence_numbers, n_received_packets,             # <<<<<<<<<<<<<<
 *                     slice_id):
 *         length = dom_ids.shape[0]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_3from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_2from_arrays[] = "SummaryframeSeries.from_arrays(cls, dom_ids, max_sequence_numbers, n_received_packets, slice_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_3from_arrays = {"from_arrays", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_3from_arrays, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_2from_arrays};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_3from_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_dom_ids = 0;
  PyObject *__pyx_v_max_sequence_numbers = 0;
  PyObject *__pyx_v_n_received_packets = 0;
  PyObject *__pyx_v_slice_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_arrays (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_dom_ids,&__pyx_n_s_max_sequence_numbers,&__pyx_n_s_n_received_packets,&__pyx_n_s_slice_id,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dom_ids)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 5, 5, 1); __PYX_ERR(0, 2321, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_sequence_numbers)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 5, 5, 2); __PYX_ERR(0, 2321, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n_received_packets)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 5, 5, 3); __PYX_ERR(0, 2321, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 5, 5, 4); __PYX_ERR(0, 2321, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_arrays") < 0)) __PYX_ERR(0, 2321, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_cls = values[0];
    __pyx_v_dom_ids = values[1];
    __pyx_v_max_sequence_numbers = values[2];
    __pyx_v_n_received_packets = values[3];
    __pyx_v_slice_id = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_arrays", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2321, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_2from_arrays(__pyx_self, __pyx_v_cls, __pyx_v_dom_ids, __pyx_v_max_sequence_numbers, __pyx_v_n_received_packets, __pyx_v_slice_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_2from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_dom_ids, PyObject *__pyx_v_max_sequence_numbers, PyObject *__pyx_v_n_received_packets, PyObject *__pyx_v_slice_id) {
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_v_frames = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__257)
  __Pyx_RefNannySetupContext("from_arrays", 0);
  __Pyx_TraceCall("from_arrays", __pyx_f[0], 2321, 0, __PYX_ERR(0, 2321, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2323
 *     def from_arrays(cls, dom_ids, max_sequence_numbers, n_received_packets,
 *                     slice_id):
 *         length = dom_ids.shape[0]             # <<<<<<<<<<<<<<
 *         frames = np.empty(length, cls.dtype)
 *         frames['dom_id'] = dom_ids
 */
  __Pyx_TraceLine(2323,0,__PYX_ERR(0, 2323, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dom_ids, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":2324
 *                     slice_id):
 *         length = dom_ids.shape[0]
 *         frames = np.empty(length, cls.dtype)             # <<<<<<<<<<<<<<
 *         frames['dom_id'] = dom_ids
 *         frames['max_sequence_number'] = max_sequence_numbers
 */
  __Pyx_TraceLine(2324,0,__PYX_ERR(0, 2324, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_length, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2324, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_length, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2324, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_length);
    __Pyx_GIVEREF(__pyx_v_length);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_length);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_frames = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":2325
 *         length = dom_ids.shape[0]
 *         frames = np.empty(length, cls.dtype)
 *         frames['dom_id'] = dom_ids             # <<<<<<<<<<<<<<
 *         frames['max_sequence_number'] = max_sequence_numbers
 *         frames['n_received_packets'] = n_received_packets
 */
  __Pyx_TraceLine(2325,0,__PYX_ERR(0, 2325, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_frames, __pyx_n_s_dom_id, __pyx_v_dom_ids) < 0)) __PYX_ERR(0, 2325, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2326
 *         frames = np.empty(length, cls.dtype)
 *         frames['dom_id'] = dom_ids
 *         frames['max_sequence_number'] = max_sequence_numbers             # <<<<<<<<<<<<<<
 *         frames['n_received_packets'] = n_received_packets
 *         frames['slice_id'] = np.full(length, slice_id, dtype='<u4')
 */
  __Pyx_TraceLine(2326,0,__PYX_ERR(0, 2326, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_frames, __pyx_n_s_max_sequence_number, __pyx_v_max_sequence_numbers) < 0)) __PYX_ERR(0, 2326, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2327
 *         frames['dom_id'] = dom_ids
 *         frames['max_sequence_number'] = max_sequence_numbers
 *         frames['n_received_packets'] = n_received_packets             # <<<<<<<<<<<<<<
 *         frames['slice_id'] = np.full(length, slice_id, dtype='<u4')
 *         return cls(frames)
 */
  __Pyx_TraceLine(2327,0,__PYX_ERR(0, 2327, __pyx_L1_error))
  if (unlikely(PyObject_SetItem(__pyx_v_frames, __pyx_n_s_n_received_packets, __pyx_v_n_received_packets) < 0)) __PYX_ERR(0, 2327, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2328
 *         frames['max_sequence_number'] = max_sequence_numbers
 *         frames['n_received_packets'] = n_received_packets
 *         frames['slice_id'] = np.full(length, slice_id, dtype='<u4')             # <<<<<<<<<<<<<<
 *         return cls(frames)
 * 
 */
  __Pyx_TraceLine(2328,0,__PYX_ERR(0, 2328, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_full); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_length);
  __Pyx_GIVEREF(__pyx_v_length);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_length);
  __Pyx_INCREF(__pyx_v_slice_id);
  __Pyx_GIVEREF(__pyx_v_slice_id);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_slice_id);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_kp_s_u4) < 0) __PYX_ERR(0, 2328, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_frames, __pyx_n_s_slice_id, __pyx_t_1) < 0)) __PYX_ERR(0, 2328, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2329
 *         frames['n_received_packets'] = n_received_packets
 *         frames['slice_id'] = np.full(length, slice_id, dtype='<u4')
 *         return cls(frames)             # <<<<<<<<<<<<<<
 * 
 *     def from_table(cls, table, slice_id):
 */
  __Pyx_TraceLine(2329,0,__PYX_ERR(0, 2329, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_6 = __pyx_v_cls; __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_frames); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_frames};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2329, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_frames};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2329, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_frames);
      __Pyx_GIVEREF(__pyx_v_frames);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_frames);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2321
 * 
 *     @classmethod
 *     def from_arrays(cls, dom_ids, max_sequence_numbers, n_received_packets,             # <<<<<<<<<<<<<<
 *                     slice_id):
 *         length = dom_ids.shape[0]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XDECREF(__pyx_v_frames);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2331
 *         return cls(frames)
 * 
 *     def from_table(cls, table, slice_id):             # <<<<<<<<<<<<<<
 *         if slice_id is None:
 *             slice_id = table[0]['slice_id']
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_5from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_4from_table[] = "SummaryframeSeries.from_table(cls, table, slice_id)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_5from_table = {"from_table", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_5from_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_4from_table};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_5from_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_table = 0;
  PyObject *__pyx_v_slice_id = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_table (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_table,&__pyx_n_s_slice_id,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_table)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, 1); __PYX_ERR(0, 2331, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, 2); __PYX_ERR(0, 2331, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_table") < 0)) __PYX_ERR(0, 2331, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_cls = values[0];
    __pyx_v_table = values[1];
    __pyx_v_slice_id = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_table", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2331, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_4from_table(__pyx_self, __pyx_v_cls, __pyx_v_table, __pyx_v_slice_id);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_4from_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_table, PyObject *__pyx_v_slice_id) {
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  __Pyx_TraceFrameInit(__pyx_codeobj__258)
  __Pyx_RefNannySetupContext("from_table", 0);
  __Pyx_TraceCall("from_table", __pyx_f[0], 2331, 0, __PYX_ERR(0, 2331, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_slice_id);

  /* "km3pipe/dataclasses.pyx":2332
 * 
 *     def from_table(cls, table, slice_id):
 *         if slice_id is None:             # <<<<<<<<<<<<<<
 *             slice_id = table[0]['slice_id']
 *         return cls(np.array([(
 */
  __Pyx_TraceLine(2332,0,__PYX_ERR(0, 2332, __pyx_L1_error))
  __pyx_t_1 = (__pyx_v_slice_id == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":2333
 *     def from_table(cls, table, slice_id):
 *         if slice_id is None:
 *             slice_id = table[0]['slice_id']             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             row['dom_id'],
 */
    __Pyx_TraceLine(2333,0,__PYX_ERR(0, 2333, __pyx_L1_error))
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_table, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_slice_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_slice_id, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":2332
 * 
 *     def from_table(cls, table, slice_id):
 *         if slice_id is None:             # <<<<<<<<<<<<<<
 *             slice_id = table[0]['slice_id']
 *         return cls(np.array([(
 */
  }

  /* "km3pipe/dataclasses.pyx":2334
 *         if slice_id is None:
 *             slice_id = table[0]['slice_id']
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['dom_id'],
 *             row['max_sequence_number'],
 */
  __Pyx_TraceLine(2334,0,__PYX_ERR(0, 2334, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "km3pipe/dataclasses.pyx":2338
 *             row['max_sequence_number'],
 *             row['n_received_packets'],
 *         ) for row in table], dtype=cls.dtype), slice_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2338,0,__PYX_ERR(0, 2338, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_table)) || PyTuple_CheckExact(__pyx_v_table)) {
    __pyx_t_6 = __pyx_v_table; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2338, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2338, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_6))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2338, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2338, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2338, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2338, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_8(__pyx_t_6);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2338, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "km3pipe/dataclasses.pyx":2335
 *             slice_id = table[0]['slice_id']
 *         return cls(np.array([(
 *             row['dom_id'],             # <<<<<<<<<<<<<<
 *             row['max_sequence_number'],
 *             row['n_received_packets'],
 */
    __Pyx_TraceLine(2335,0,__PYX_ERR(0, 2335, __pyx_L1_error))
    __pyx_t_9 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_dom_id); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "km3pipe/dataclasses.pyx":2336
 *         return cls(np.array([(
 *             row['dom_id'],
 *             row['max_sequence_number'],             # <<<<<<<<<<<<<<
 *             row['n_received_packets'],
 *         ) for row in table], dtype=cls.dtype), slice_id)
 */
    __Pyx_TraceLine(2336,0,__PYX_ERR(0, 2336, __pyx_L1_error))
    __pyx_t_10 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_max_sequence_number); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2336, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "km3pipe/dataclasses.pyx":2337
 *             row['dom_id'],
 *             row['max_sequence_number'],
 *             row['n_received_packets'],             # <<<<<<<<<<<<<<
 *         ) for row in table], dtype=cls.dtype), slice_id)
 * 
 */
    __Pyx_TraceLine(2337,0,__PYX_ERR(0, 2337, __pyx_L1_error))
    __pyx_t_11 = PyObject_GetItem(__pyx_v_row, __pyx_n_s_n_received_packets); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);

    /* "km3pipe/dataclasses.pyx":2335
 *             slice_id = table[0]['slice_id']
 *         return cls(np.array([(
 *             row['dom_id'],             # <<<<<<<<<<<<<<
 *             row['max_sequence_number'],
 *             row['n_received_packets'],
 */
    __Pyx_TraceLine(2335,0,__PYX_ERR(0, 2335, __pyx_L1_error))
    __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_11);
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_11 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 2334, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "km3pipe/dataclasses.pyx":2338
 *             row['max_sequence_number'],
 *             row['n_received_packets'],
 *         ) for row in table], dtype=cls.dtype), slice_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(2338,0,__PYX_ERR(0, 2338, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2334
 *         if slice_id is None:
 *             slice_id = table[0]['slice_id']
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['dom_id'],
 *             row['max_sequence_number'],
 */
  __Pyx_TraceLine(2334,0,__PYX_ERR(0, 2334, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":2338
 *             row['max_sequence_number'],
 *             row['n_received_packets'],
 *         ) for row in table], dtype=cls.dtype), slice_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2338,0,__PYX_ERR(0, 2338, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_dtype); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_12) < 0) __PYX_ERR(0, 2338, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "km3pipe/dataclasses.pyx":2334
 *         if slice_id is None:
 *             slice_id = table[0]['slice_id']
 *         return cls(np.array([(             # <<<<<<<<<<<<<<
 *             row['dom_id'],
 *             row['max_sequence_number'],
 */
  __Pyx_TraceLine(2334,0,__PYX_ERR(0, 2334, __pyx_L1_error))
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":2338
 *             row['max_sequence_number'],
 *             row['n_received_packets'],
 *         ) for row in table], dtype=cls.dtype), slice_id)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2338,0,__PYX_ERR(0, 2338, __pyx_L1_error))
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_3 = __pyx_v_cls; __pyx_t_6 = NULL;
  __pyx_t_13 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_13 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_12, __pyx_v_slice_id};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2334, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_12, __pyx_v_slice_id};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2334, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_13, __pyx_t_12);
    __Pyx_INCREF(__pyx_v_slice_id);
    __Pyx_GIVEREF(__pyx_v_slice_id);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_13, __pyx_v_slice_id);
    __pyx_t_12 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2331
 *         return cls(frames)
 * 
 *     def from_table(cls, table, slice_id):             # <<<<<<<<<<<<<<
 *         if slice_id is None:
 *             slice_id = table[0]['slice_id']
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.from_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_slice_id);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2341
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_7deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_6deserialise[] = "SummaryframeSeries.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_7deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_7deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_6deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_7deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 2341, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2341, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_6deserialise(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_6deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__259)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 2341, 0, __PYX_ERR(0, 2341, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2342
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(2342,0,__PYX_ERR(0, 2342, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2341
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2344
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_9serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_8serialise[] = "SummaryframeSeries.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_9serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_9serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_8serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_9serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 2344, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2344, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_8serialise(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_8serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__260)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 2344, 0, __PYX_ERR(0, 2344, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2345
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2345,0,__PYX_ERR(0, 2345, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2344
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2348
 * 
 *     @classmethod
 *     def conv_from(cls, data, slice_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, event_id)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_11conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_10conv_from[] = "SummaryframeSeries.conv_from(cls, data, slice_id, fmt='numpy', h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_11conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_11conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_10conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_11conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_slice_id = 0;
  PyObject *__pyx_v_fmt = 0;
  CYTHON_UNUSED PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_slice_id,&__pyx_n_s_fmt,&__pyx_n_s_h5loc,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    values[4] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 1); __PYX_ERR(0, 2348, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_slice_id)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, 2); __PYX_ERR(0, 2348, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 2348, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_slice_id = values[2];
    __pyx_v_fmt = values[3];
    __pyx_v_h5loc = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2348, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_10conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_slice_id, __pyx_v_fmt, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_10conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_slice_id, PyObject *__pyx_v_fmt, CYTHON_UNUSED PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__261)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 2348, 0, __PYX_ERR(0, 2348, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2349
 *     @classmethod
 *     def conv_from(cls, data, slice_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             # return cls.from_table(data, event_id)
 *             return cls(data)
 */
  __Pyx_TraceLine(2349,0,__PYX_ERR(0, 2349, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2349, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":2351
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, event_id)
 *             return cls(data)             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy'):
 */
    __Pyx_TraceLine(2351,0,__PYX_ERR(0, 2351, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_cls);
    __pyx_t_3 = __pyx_v_cls; __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2351, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_data};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2351, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_data};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2351, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2351, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_data);
        __Pyx_GIVEREF(__pyx_v_data);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2351, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2349
 *     @classmethod
 *     def conv_from(cls, data, slice_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             # return cls.from_table(data, event_id)
 *             return cls(data)
 */
  }

  /* "km3pipe/dataclasses.pyx":2348
 * 
 *     @classmethod
 *     def conv_from(cls, data, slice_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, event_id)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2353
 *             return cls(data)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_13conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_12conv_to[] = "SummaryframeSeries.conv_to(self, to='numpy')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_13conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_13conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_12conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_13conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 2353, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2353, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_12conv_to(__pyx_self, __pyx_v_self, __pyx_v_to);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_12conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__262)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 2353, 0, __PYX_ERR(0, 2353, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2354
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  __Pyx_TraceLine(2354,0,__PYX_ERR(0, 2354, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2354, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":2355
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':
 *             return self.__array__()             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 */
    __Pyx_TraceLine(2355,0,__PYX_ERR(0, 2355, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2355, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2355, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2354
 * 
 *     def conv_to(self, to='numpy'):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":2356
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  __Pyx_TraceLine(2356,0,__PYX_ERR(0, 2356, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2356, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":2357
 *             return self.__array__()
 *         if to == 'pandas':
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_TraceLine(2357,0,__PYX_ERR(0, 2357, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_to, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 2357, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h5loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_t_3) < 0) __PYX_ERR(0, 2357, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2356
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":2353
 *             return cls(data)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2360
 * 
 *     @property
 *     def n_received_packets(self):             # <<<<<<<<<<<<<<
 *         return self._arr['n_received_packets']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_15n_received_packets(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_14n_received_packets[] = "SummaryframeSeries.n_received_packets(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_15n_received_packets = {"n_received_packets", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_15n_received_packets, METH_O, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_14n_received_packets};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_15n_received_packets(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("n_received_packets (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_14n_received_packets(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_14n_received_packets(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__263)
  __Pyx_RefNannySetupContext("n_received_packets", 0);
  __Pyx_TraceCall("n_received_packets", __pyx_f[0], 2360, 0, __PYX_ERR(0, 2360, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2361
 *     @property
 *     def n_received_packets(self):
 *         return self._arr['n_received_packets']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(2361,0,__PYX_ERR(0, 2361, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_n_received_packets); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2360
 * 
 *     @property
 *     def n_received_packets(self):             # <<<<<<<<<<<<<<
 *         return self._arr['n_received_packets']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.n_received_packets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2364
 * 
 *     @property
 *     def dom_ids(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dom_ids']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_17dom_ids(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_16dom_ids[] = "SummaryframeSeries.dom_ids(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_17dom_ids = {"dom_ids", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_17dom_ids, METH_O, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_16dom_ids};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_17dom_ids(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dom_ids (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_16dom_ids(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_16dom_ids(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__264)
  __Pyx_RefNannySetupContext("dom_ids", 0);
  __Pyx_TraceCall("dom_ids", __pyx_f[0], 2364, 0, __PYX_ERR(0, 2364, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2365
 *     @property
 *     def dom_ids(self):
 *         return self._arr['dom_ids']             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(2365,0,__PYX_ERR(0, 2365, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_dom_ids); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2364
 * 
 *     @property
 *     def dom_ids(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dom_ids']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.dom_ids", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2368
 * 
 *     @property
 *     def max_sequence_numbers(self):             # <<<<<<<<<<<<<<
 *         return self._arr['max_sequence_numbers']
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_19max_sequence_numbers(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_18max_sequence_numbers[] = "SummaryframeSeries.max_sequence_numbers(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_19max_sequence_numbers = {"max_sequence_numbers", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_19max_sequence_numbers, METH_O, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_18max_sequence_numbers};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_19max_sequence_numbers(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("max_sequence_numbers (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_18max_sequence_numbers(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_18max_sequence_numbers(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__265)
  __Pyx_RefNannySetupContext("max_sequence_numbers", 0);
  __Pyx_TraceCall("max_sequence_numbers", __pyx_f[0], 2368, 0, __PYX_ERR(0, 2368, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2369
 *     @property
 *     def max_sequence_numbers(self):
 *         return self._arr['max_sequence_numbers']             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
  __Pyx_TraceLine(2369,0,__PYX_ERR(0, 2369, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_n_s_max_sequence_numbers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2368
 * 
 *     @property
 *     def max_sequence_numbers(self):             # <<<<<<<<<<<<<<
 *         return self._arr['max_sequence_numbers']
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.max_sequence_numbers", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2371
 *         return self._arr['max_sequence_numbers']
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_21__array__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_20__array__[] = "SummaryframeSeries.__array__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_21__array__ = {"__array__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_21__array__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_20__array__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_21__array__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_20__array__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_20__array__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__266)
  __Pyx_RefNannySetupContext("__array__", 0);
  __Pyx_TraceCall("__array__", __pyx_f[0], 2371, 0, __PYX_ERR(0, 2371, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2372
 * 
 *     def __array__(self):
 *         return self._arr             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_TraceLine(2372,0,__PYX_ERR(0, 2372, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2371
 *         return self._arr['max_sequence_numbers']
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2374
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_23__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_22__iter__[] = "SummaryframeSeries.__iter__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_23__iter__ = {"__iter__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_23__iter__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_22__iter__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_23__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_22__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_22__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__267)
  __Pyx_RefNannySetupContext("__iter__", 0);
  __Pyx_TraceCall("__iter__", __pyx_f[0], 2374, 0, __PYX_ERR(0, 2374, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2375
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def next(self):
 */
  __Pyx_TraceLine(2375,0,__PYX_ERR(0, 2375, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2374
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2377
 *         return self
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_25next(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_24next[] = "SummaryframeSeries.next(self)\nPython 2/3 compatibility for iterators";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_25next = {"next", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_25next, METH_O, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_24next};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_25next(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_24next(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_24next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__268)
  __Pyx_RefNannySetupContext("next", 0);
  __Pyx_TraceCall("next", __pyx_f[0], 2377, 0, __PYX_ERR(0, 2377, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2379
 *     def next(self):
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_TraceLine(2379,0,__PYX_ERR(0, 2379, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2379, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2379, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2377
 *         return self
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2381
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_27__next__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_26__next__[] = "SummaryframeSeries.__next__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_27__next__ = {"__next__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_27__next__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_26__next__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_27__next__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_26__next__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_26__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_TraceFrameInit(__pyx_codeobj__269)
  __Pyx_RefNannySetupContext("__next__", 0);
  __Pyx_TraceCall("__next__", __pyx_f[0], 2381, 0, __PYX_ERR(0, 2381, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2382
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  __Pyx_TraceLine(2382,0,__PYX_ERR(0, 2382, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2382, __pyx_L1_error)
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "km3pipe/dataclasses.pyx":2383
 *     def __next__(self):
 *         if self._index >= len(self):
 *             self._index = 0             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         data = self._arr[self._index]
 */
    __Pyx_TraceLine(2383,0,__PYX_ERR(0, 2383, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_int_0) < 0) __PYX_ERR(0, 2383, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":2384
 *         if self._index >= len(self):
 *             self._index = 0
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         data = self._arr[self._index]
 *         self._index += 1
 */
    __Pyx_TraceLine(2384,0,__PYX_ERR(0, 2384, __pyx_L1_error))
    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
    __PYX_ERR(0, 2384, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":2382
 * 
 *     def __next__(self):
 *         if self._index >= len(self):             # <<<<<<<<<<<<<<
 *             self._index = 0
 *             raise StopIteration
 */
  }

  /* "km3pipe/dataclasses.pyx":2385
 *             self._index = 0
 *             raise StopIteration
 *         data = self._arr[self._index]             # <<<<<<<<<<<<<<
 *         self._index += 1
 *         return data
 */
  __Pyx_TraceLine(2385,0,__PYX_ERR(0, 2385, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetItem(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_data = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2386
 *             raise StopIteration
 *         data = self._arr[self._index]
 *         self._index += 1             # <<<<<<<<<<<<<<
 *         return data
 * 
 */
  __Pyx_TraceLine(2386,0,__PYX_ERR(0, 2386, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index_2, __pyx_t_3) < 0) __PYX_ERR(0, 2386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":2387
 *         data = self._arr[self._index]
 *         self._index += 1
 *         return data             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_TraceLine(2387,0,__PYX_ERR(0, 2387, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_data);
  __pyx_r = __pyx_v_data;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2381
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2389
 *         return data
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_29__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_28__len__[] = "SummaryframeSeries.__len__(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_29__len__ = {"__len__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_29__len__, METH_O, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_28__len__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_29__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_28__len__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_28__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__270)
  __Pyx_RefNannySetupContext("__len__", 0);
  __Pyx_TraceCall("__len__", __pyx_f[0], 2389, 0, __PYX_ERR(0, 2389, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2390
 * 
 *     def __len__(self):
 *         return self._arr.shape[0]             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index):
 */
  __Pyx_TraceLine(2390,0,__PYX_ERR(0, 2390, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2389
 *         return data
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2392
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._arr[index]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_31__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_30__getitem__[] = "SummaryframeSeries.__getitem__(self, index)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_31__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_31__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_30__getitem__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_31__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 2392, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 2392, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2392, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_30__getitem__(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_30__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__271)
  __Pyx_RefNannySetupContext("__getitem__", 0);
  __Pyx_TraceCall("__getitem__", __pyx_f[0], 2392, 0, __PYX_ERR(0, 2392, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2393
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return self._arr[index]
 *         elif isinstance(index, slice):
 */
  __Pyx_TraceLine(2393,0,__PYX_ERR(0, 2393, __pyx_L1_error))
  __pyx_t_1 = PyInt_Check(__pyx_v_index); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":2394
 *     def __getitem__(self, index):
 *         if isinstance(index, int):
 *             return self._arr[index]             # <<<<<<<<<<<<<<
 *         elif isinstance(index, slice):
 *             return self._slice_generator(index)
 */
    __Pyx_TraceLine(2394,0,__PYX_ERR(0, 2394, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2393
 * 
 *     def __getitem__(self, index):
 *         if isinstance(index, int):             # <<<<<<<<<<<<<<
 *             return self._arr[index]
 *         elif isinstance(index, slice):
 */
  }

  /* "km3pipe/dataclasses.pyx":2395
 *         if isinstance(index, int):
 *             return self._arr[index]
 *         elif isinstance(index, slice):             # <<<<<<<<<<<<<<
 *             return self._slice_generator(index)
 *         else:
 */
  __Pyx_TraceLine(2395,0,__PYX_ERR(0, 2395, __pyx_L1_error))
  __pyx_t_2 = PySlice_Check(__pyx_v_index); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":2396
 *             return self._arr[index]
 *         elif isinstance(index, slice):
 *             return self._slice_generator(index)             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("index must be int or slice")
 */
    __Pyx_TraceLine(2396,0,__PYX_ERR(0, 2396, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_slice_generator); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2396, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_index};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2396, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_index};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2396, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2396, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_v_index);
        __Pyx_GIVEREF(__pyx_v_index);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_index);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2396, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2395
 *         if isinstance(index, int):
 *             return self._arr[index]
 *         elif isinstance(index, slice):             # <<<<<<<<<<<<<<
 *             return self._slice_generator(index)
 *         else:
 */
  }

  /* "km3pipe/dataclasses.pyx":2398
 *             return self._slice_generator(index)
 *         else:
 *             raise TypeError("index must be int or slice")             # <<<<<<<<<<<<<<
 * 
 *     def _slice_generator(self, index):
 */
  __Pyx_TraceLine(2398,0,__PYX_ERR(0, 2398, __pyx_L1_error))
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__272, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 2398, __pyx_L1_error)
  }

  /* "km3pipe/dataclasses.pyx":2392
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._arr[index]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7km3pipe_11dataclasses_18SummaryframeSeries_34generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "km3pipe/dataclasses.pyx":2400
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_33_slice_generator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_32_slice_generator[] = "SummaryframeSeries._slice_generator(self, index)\nA simple slice generator for iterations";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_33_slice_generator = {"_slice_generator", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_33_slice_generator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_18SummaryframeSeries_32_slice_generator};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_18SummaryframeSeries_33_slice_generator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_slice_generator (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_slice_generator", 1, 2, 2, 1); __PYX_ERR(0, 2400, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_slice_generator") < 0)) __PYX_ERR(0, 2400, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_index = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_slice_generator", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2400, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries._slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_32_slice_generator(__pyx_self, __pyx_v_self, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_18SummaryframeSeries_32_slice_generator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_slice_generator", 0);
  __pyx_cur_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *)__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator(__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2400, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_index = __pyx_v_index;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_index);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_index);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7km3pipe_11dataclasses_18SummaryframeSeries_34generator2, (PyObject *) __pyx_cur_scope, __pyx_n_s_slice_generator, __pyx_n_s_SummaryframeSeries__slice_genera, __pyx_n_s_km3pipe_dataclasses); if (unlikely(!gen)) __PYX_ERR(0, 2400, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.SummaryframeSeries._slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7km3pipe_11dataclasses_18SummaryframeSeries_34generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *__pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *(*__pyx_t_8)(PyObject *);
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_slice_generator", 0);
  __Pyx_TraceCall("_slice_generator", __pyx_f[0], 2400, 0, __PYX_ERR(0, 2400, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2400, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2402
 *     def _slice_generator(self, index):
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))             # <<<<<<<<<<<<<<
 *         for i in range(start, stop, step):
 *             yield self._arr[i]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_index, __pyx_n_s_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_cur_scope->__pyx_v_self); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2402, __pyx_L1_error)
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2402, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2402, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2402, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2402, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2402, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if !CYTHON_COMPILING_IN_PYPY
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2402, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 2; __pyx_t_4 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_5), 3) < 0) __PYX_ERR(0, 2402, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2402, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_start = __pyx_t_2;
  __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_cur_scope->__pyx_v_stop = __pyx_t_6;
  __pyx_t_6 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_cur_scope->__pyx_v_step = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":2403
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):             # <<<<<<<<<<<<<<
 *             yield self._arr[i]
 * 
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_start);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_start);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_start);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stop);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stop);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_stop);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_step);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_step);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_cur_scope->__pyx_v_step);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2403, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2403, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2403, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_8(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2403, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;

    /* "km3pipe/dataclasses.pyx":2404
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):
 *             yield self._arr[i]             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_arr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyObject_GetItem(__pyx_t_4, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_8;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_TraceReturn(__pyx_r, 0);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L8_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_8 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2404, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":2403
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 *         for i in range(start, stop, step):             # <<<<<<<<<<<<<<
 *             yield self._arr[i]
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "km3pipe/dataclasses.pyx":2400
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("_slice_generator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2424
 *         Convert for storage.
 *     """
 *     def __new__(cls, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         obj = np.asarray(arr).view(cls)
 *         obj.h5loc = h5loc
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_8KM3Array___new__[] = "KM3Array.__new__(cls, arr, h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_8KM3Array_1__new__ = {"__new__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_8KM3Array_1__new__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_8KM3Array___new__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_arr_2,&__pyx_n_s_h5loc,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 3, 1); __PYX_ERR(0, 2424, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) __PYX_ERR(0, 2424, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_arr = values[1];
    __pyx_v_h5loc = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2424, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_8KM3Array___new__(__pyx_self, __pyx_v_cls, __pyx_v_arr, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_v_obj = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__273)
  __Pyx_RefNannySetupContext("__new__", 0);
  __Pyx_TraceCall("__new__", __pyx_f[0], 2424, 0, __PYX_ERR(0, 2424, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2425
 *     """
 *     def __new__(cls, arr, h5loc='/'):
 *         obj = np.asarray(arr).view(cls)             # <<<<<<<<<<<<<<
 *         obj.h5loc = h5loc
 *         return obj
 */
  __Pyx_TraceLine(2425,0,__PYX_ERR(0, 2425, __pyx_L1_error))
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_arr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_arr};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2425, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_arr};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2425, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2425, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_arr);
      __Pyx_GIVEREF(__pyx_v_arr);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_arr);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2425, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_view); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_cls); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_cls};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2425, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_cls};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2425, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2425, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_cls);
      __Pyx_GIVEREF(__pyx_v_cls);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_cls);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2425, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_obj = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2426
 *     def __new__(cls, arr, h5loc='/'):
 *         obj = np.asarray(arr).view(cls)
 *         obj.h5loc = h5loc             # <<<<<<<<<<<<<<
 *         return obj
 * 
 */
  __Pyx_TraceLine(2426,0,__PYX_ERR(0, 2426, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_obj, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 2426, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2427
 *         obj = np.asarray(arr).view(cls)
 *         obj.h5loc = h5loc
 *         return obj             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, arr, h5loc='/'):
 */
  __Pyx_TraceLine(2427,0,__PYX_ERR(0, 2427, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2424
 *         Convert for storage.
 *     """
 *     def __new__(cls, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         obj = np.asarray(arr).view(cls)
 *         obj.h5loc = h5loc
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2429
 *         return obj
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self.array = arr
 *         self.h5loc = h5loc
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_3__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_8KM3Array_2__init__[] = "KM3Array.__init__(self, arr, h5loc='/')";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_8KM3Array_3__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_8KM3Array_3__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_8KM3Array_2__init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_3__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_arr_2,&__pyx_n_s_h5loc,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 2429, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2429, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_arr = values[1];
    __pyx_v_h5loc = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2429, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_8KM3Array_2__init__(__pyx_self, __pyx_v_self, __pyx_v_arr, __pyx_v_h5loc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_2__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_h5loc) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__274)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 2429, 0, __PYX_ERR(0, 2429, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2430
 * 
 *     def __init__(self, arr, h5loc='/'):
 *         self.array = arr             # <<<<<<<<<<<<<<
 *         self.h5loc = h5loc
 * 
 */
  __Pyx_TraceLine(2430,0,__PYX_ERR(0, 2430, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_array_2, __pyx_v_arr) < 0) __PYX_ERR(0, 2430, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2431
 *     def __init__(self, arr, h5loc='/'):
 *         self.array = arr
 *         self.h5loc = h5loc             # <<<<<<<<<<<<<<
 * 
 *     def __array_finalize__(self, obj):
 */
  __Pyx_TraceLine(2431,0,__PYX_ERR(0, 2431, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 2431, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2429
 *         return obj
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self.array = arr
 *         self.h5loc = h5loc
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2433
 *         self.h5loc = h5loc
 * 
 *     def __array_finalize__(self, obj):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             return
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_5__array_finalize__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_8KM3Array_4__array_finalize__[] = "KM3Array.__array_finalize__(self, obj)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_8KM3Array_5__array_finalize__ = {"__array_finalize__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_8KM3Array_5__array_finalize__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_8KM3Array_4__array_finalize__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_5__array_finalize__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array_finalize__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_obj,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__array_finalize__", 1, 2, 2, 1); __PYX_ERR(0, 2433, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__array_finalize__") < 0)) __PYX_ERR(0, 2433, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_obj = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__array_finalize__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2433, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.__array_finalize__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_8KM3Array_4__array_finalize__(__pyx_self, __pyx_v_self, __pyx_v_obj);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_4__array_finalize__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__275)
  __Pyx_RefNannySetupContext("__array_finalize__", 0);
  __Pyx_TraceCall("__array_finalize__", __pyx_f[0], 2433, 0, __PYX_ERR(0, 2433, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2434
 * 
 *     def __array_finalize__(self, obj):
 *         if obj is None:             # <<<<<<<<<<<<<<
 *             return
 *         self.h5loc = getattr(obj, 'h5loc', None)
 */
  __Pyx_TraceLine(2434,0,__PYX_ERR(0, 2434, __pyx_L1_error))
  __pyx_t_1 = (__pyx_v_obj == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":2435
 *     def __array_finalize__(self, obj):
 *         if obj is None:
 *             return             # <<<<<<<<<<<<<<
 *         self.h5loc = getattr(obj, 'h5loc', None)
 * 
 */
    __Pyx_TraceLine(2435,0,__PYX_ERR(0, 2435, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2434
 * 
 *     def __array_finalize__(self, obj):
 *         if obj is None:             # <<<<<<<<<<<<<<
 *             return
 *         self.h5loc = getattr(obj, 'h5loc', None)
 */
  }

  /* "km3pipe/dataclasses.pyx":2436
 *         if obj is None:
 *             return
 *         self.h5loc = getattr(obj, 'h5loc', None)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2436,0,__PYX_ERR(0, 2436, __pyx_L1_error))
  __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_obj, __pyx_n_s_h5loc, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h5loc, __pyx_t_3) < 0) __PYX_ERR(0, 2436, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":2433
 *         self.h5loc = h5loc
 * 
 *     def __array_finalize__(self, obj):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             return
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.__array_finalize__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2439
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_7deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_8KM3Array_6deserialise[] = "KM3Array.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_8KM3Array_7deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_8KM3Array_7deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_8KM3Array_6deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_7deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 2439, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2439, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_8KM3Array_6deserialise(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_6deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__276)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 2439, 0, __PYX_ERR(0, 2439, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2440
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(2440,0,__PYX_ERR(0, 2440, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2439
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2442
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_9serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_8KM3Array_8serialise[] = "KM3Array.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_8KM3Array_9serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_8KM3Array_9serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_8KM3Array_8serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_9serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 2442, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2442, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_8KM3Array_8serialise(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_8serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__277)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 2442, 0, __PYX_ERR(0, 2442, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2443
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2443,0,__PYX_ERR(0, 2443, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2442
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2446
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             arr = cls(data, h5loc, **kwargs)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_11conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_8KM3Array_10conv_from[] = "KM3Array.conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_8KM3Array_11conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_8KM3Array_11conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_8KM3Array_10conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_11conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_v_fmt = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_event_id,&__pyx_n_s_h5loc,&__pyx_n_s_fmt,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    values[4] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, 1); __PYX_ERR(0, 2446, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 2446, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_h5loc = values[3];
    __pyx_v_fmt = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2446, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_8KM3Array_10conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_event_id, __pyx_v_h5loc, __pyx_v_fmt, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_10conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc, PyObject *__pyx_v_fmt, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__278)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 2446, 0, __PYX_ERR(0, 2446, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2447
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             arr = cls(data, h5loc, **kwargs)
 *             return arr
 */
  __Pyx_TraceLine(2447,0,__PYX_ERR(0, 2447, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2447, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":2448
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs):
 *         if fmt == 'numpy':
 *             arr = cls(data, h5loc, **kwargs)             # <<<<<<<<<<<<<<
 *             return arr
 * 
 */
    __Pyx_TraceLine(2448,0,__PYX_ERR(0, 2448, __pyx_L1_error))
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data);
    __Pyx_INCREF(__pyx_v_h5loc);
    __Pyx_GIVEREF(__pyx_v_h5loc);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_h5loc);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_arr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "km3pipe/dataclasses.pyx":2449
 *         if fmt == 'numpy':
 *             arr = cls(data, h5loc, **kwargs)
 *             return arr             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 */
    __Pyx_TraceLine(2449,0,__PYX_ERR(0, 2449, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_arr);
    __pyx_r = __pyx_v_arr;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2447
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs):
 *         if fmt == 'numpy':             # <<<<<<<<<<<<<<
 *             arr = cls(data, h5loc, **kwargs)
 *             return arr
 */
  }

  /* "km3pipe/dataclasses.pyx":2446
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             arr = cls(data, h5loc, **kwargs)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2451
 *             return arr
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_13conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_8KM3Array_12conv_to[] = "KM3Array.conv_to(self, to='numpy', **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_8KM3Array_13conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_8KM3Array_13conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_8KM3Array_12conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_13conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 2451, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2451, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_8KM3Array_12conv_to(__pyx_self, __pyx_v_self, __pyx_v_to, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_12conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__279)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 2451, 0, __PYX_ERR(0, 2451, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2452
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self
 *         if to == 'pandas':
 */
  __Pyx_TraceLine(2452,0,__PYX_ERR(0, 2452, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2452, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":2453
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':
 *             return self             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return KM3DataFrame.conv_from(self, fmt='numpy', **kwargs)
 */
    __Pyx_TraceLine(2453,0,__PYX_ERR(0, 2453, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2452
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self
 *         if to == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":2454
 *         if to == 'numpy':
 *             return self
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame.conv_from(self, fmt='numpy', **kwargs)
 * 
 */
  __Pyx_TraceLine(2454,0,__PYX_ERR(0, 2454, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2454, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":2455
 *             return self
 *         if to == 'pandas':
 *             return KM3DataFrame.conv_from(self, fmt='numpy', **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
    __Pyx_TraceLine(2455,0,__PYX_ERR(0, 2455, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_fmt, __pyx_n_s_numpy) < 0) __PYX_ERR(0, 2455, __pyx_L1_error)
    __pyx_t_4 = __pyx_t_5;
    __pyx_t_5 = 0;
    if (__Pyx_MergeKeywords(__pyx_t_4, __pyx_v_kwargs) < 0) __PYX_ERR(0, 2455, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2454
 *         if to == 'numpy':
 *             return self
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return KM3DataFrame.conv_from(self, fmt='numpy', **kwargs)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":2451
 *             return arr
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2458
 * 
 *     @classmethod
 *     def from_dict(cls, map, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_15from_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_8KM3Array_14from_dict[] = "KM3Array.from_dict(cls, map, dtype=None, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_8KM3Array_15from_dict = {"from_dict", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_8KM3Array_15from_dict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_8KM3Array_14from_dict};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_8KM3Array_15from_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_map = 0;
  PyObject *__pyx_v_dtype = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_dict (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_map,&__pyx_n_s_dtype,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_map)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_dict", 0, 2, 3, 1); __PYX_ERR(0, 2458, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtype);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "from_dict") < 0)) __PYX_ERR(0, 2458, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_map = values[1];
    __pyx_v_dtype = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_dict", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2458, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_8KM3Array_14from_dict(__pyx_self, __pyx_v_cls, __pyx_v_map, __pyx_v_dtype, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7km3pipe_11dataclasses_8KM3Array_9from_dict_2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "km3pipe/dataclasses.pyx":2461
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],             # <<<<<<<<<<<<<<
 *                             dtype=dtype), **kwargs)
 * 
 */

static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_9from_dict_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr *)__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr(__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2461, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7km3pipe_11dataclasses_8KM3Array_9from_dict_2generator4, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_KM3Array_from_dict_locals_genexp, __pyx_n_s_km3pipe_dataclasses); if (unlikely(!gen)) __PYX_ERR(0, 2461, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.from_dict.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7km3pipe_11dataclasses_8KM3Array_9from_dict_2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr *__pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 2461, 0, __PYX_ERR(0, 2461, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2461, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dtype)) { __Pyx_RaiseClosureNameError("dtype"); __PYX_ERR(0, 2461, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dtype, __pyx_n_s_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2461, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2461, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2461, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2461, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2461, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2461, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_map)) { __Pyx_RaiseClosureNameError("map"); __PYX_ERR(0, 2461, __pyx_L1_error) }
    __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_map, __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    __Pyx_XGIVEREF(__pyx_t_2);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_TraceReturn(__pyx_r, 0);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2461, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2458
 * 
 *     @classmethod
 *     def from_dict(cls, map, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 */

static PyObject *__pyx_pf_7km3pipe_11dataclasses_8KM3Array_14from_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_map, PyObject *__pyx_v_dtype, PyObject *__pyx_v_kwargs) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict *__pyx_cur_scope;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  __Pyx_TraceFrameInit(__pyx_codeobj__280)
  __Pyx_RefNannySetupContext("from_dict", 0);
  __pyx_cur_scope = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict *)__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict(__pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2458, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("from_dict", __pyx_f[0], 2458, 0, __PYX_ERR(0, 2458, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_map = __pyx_v_map;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_map);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_map);
  __pyx_cur_scope->__pyx_v_dtype = __pyx_v_dtype;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dtype);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dtype);

  /* "km3pipe/dataclasses.pyx":2459
 *     @classmethod
 *     def from_dict(cls, map, dtype=None, **kwargs):
 *         if dtype is None:             # <<<<<<<<<<<<<<
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],
 */
  __Pyx_TraceLine(2459,0,__PYX_ERR(0, 2459, __pyx_L1_error))
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_dtype == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "km3pipe/dataclasses.pyx":2460
 *     def from_dict(cls, map, dtype=None, **kwargs):
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])             # <<<<<<<<<<<<<<
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],
 *                             dtype=dtype), **kwargs)
 */
    __Pyx_TraceLine(2460,0,__PYX_ERR(0, 2460, __pyx_L1_error))
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_map, __pyx_n_s_keys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2460, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2460, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_8 = PyList_Sort(__pyx_t_4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 2460, __pyx_L1_error)
    if (unlikely(__pyx_t_4 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 2460, __pyx_L1_error)
    }
    __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 2460, __pyx_L1_error)
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2460, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2460, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_key);
      __Pyx_INCREF(((PyObject *)(&PyFloat_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyFloat_Type)));
      PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)(&PyFloat_Type)));
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 2460, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dtype);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dtype, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "km3pipe/dataclasses.pyx":2459
 *     @classmethod
 *     def from_dict(cls, map, dtype=None, **kwargs):
 *         if dtype is None:             # <<<<<<<<<<<<<<
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],
 */
  }

  /* "km3pipe/dataclasses.pyx":2461
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],             # <<<<<<<<<<<<<<
 *                             dtype=dtype), **kwargs)
 * 
 */
  __Pyx_TraceLine(2461,0,__PYX_ERR(0, 2461, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_pf_7km3pipe_11dataclasses_8KM3Array_9from_dict_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":2462
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],
 *                             dtype=dtype), **kwargs)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(2462,0,__PYX_ERR(0, 2462, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_cur_scope->__pyx_v_dtype) < 0) __PYX_ERR(0, 2462, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2461
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],             # <<<<<<<<<<<<<<
 *                             dtype=dtype), **kwargs)
 * 
 */
  __Pyx_TraceLine(2461,0,__PYX_ERR(0, 2461, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2462
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 *         return cls(np.array([tuple((map[key] for key in dtype.names))],
 *                             dtype=dtype), **kwargs)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(2462,0,__PYX_ERR(0, 2462, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2458
 * 
 *     @classmethod
 *     def from_dict(cls, map, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3Array.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2492
 * 
 *     @property
 *     def _constructor(self):             # <<<<<<<<<<<<<<
 *         return KM3DataFrame
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_1_constructor(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame__constructor[] = "KM3DataFrame._constructor(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_1_constructor = {"_constructor", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_1_constructor, METH_O, __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame__constructor};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_1_constructor(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_constructor (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame__constructor(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame__constructor(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__281)
  __Pyx_RefNannySetupContext("_constructor", 0);
  __Pyx_TraceCall("_constructor", __pyx_f[0], 2492, 0, __PYX_ERR(0, 2492, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2493
 *     @property
 *     def _constructor(self):
 *         return KM3DataFrame             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, *args, **kwargs):
 */
  __Pyx_TraceLine(2493,0,__PYX_ERR(0, 2493, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2492
 * 
 *     @property
 *     def _constructor(self):             # <<<<<<<<<<<<<<
 *         return KM3DataFrame
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame._constructor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2495
 *         return KM3DataFrame
 * 
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         h5loc = kwargs.pop('h5loc', '/')
 *         super(KM3DataFrame, self).__init__(*args, **kwargs)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_3__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_2__init__[] = "KM3DataFrame.__init__(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_3__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_3__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_2__init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_3__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 2495, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2495, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_2__init__(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_2__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_h5loc = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__282)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 2495, 0, __PYX_ERR(0, 2495, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2496
 * 
 *     def __init__(self, *args, **kwargs):
 *         h5loc = kwargs.pop('h5loc', '/')             # <<<<<<<<<<<<<<
 *         super(KM3DataFrame, self).__init__(*args, **kwargs)
 *         self.h5loc = h5loc
 */
  __Pyx_TraceLine(2496,0,__PYX_ERR(0, 2496, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__283, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_h5loc = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":2497
 *     def __init__(self, *args, **kwargs):
 *         h5loc = kwargs.pop('h5loc', '/')
 *         super(KM3DataFrame, self).__init__(*args, **kwargs)             # <<<<<<<<<<<<<<
 *         self.h5loc = h5loc
 * 
 */
  __Pyx_TraceLine(2497,0,__PYX_ERR(0, 2497, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KM3DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":2498
 *         h5loc = kwargs.pop('h5loc', '/')
 *         super(KM3DataFrame, self).__init__(*args, **kwargs)
 *         self.h5loc = h5loc             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2498,0,__PYX_ERR(0, 2498, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 2498, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2495
 *         return KM3DataFrame
 * 
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         h5loc = kwargs.pop('h5loc', '/')
 *         super(KM3DataFrame, self).__init__(*args, **kwargs)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_h5loc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2501
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_5deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_4deserialise[] = "KM3DataFrame.deserialise(cls, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_5deserialise = {"deserialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_5deserialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_4deserialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_5deserialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deserialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "deserialise") < 0)) __PYX_ERR(0, 2501, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deserialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2501, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_4deserialise(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_4deserialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__284)
  __Pyx_RefNannySetupContext("deserialise", 0);
  __Pyx_TraceCall("deserialise", __pyx_f[0], 2501, 0, __PYX_ERR(0, 2501, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2502
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def serialise(self, *args, **kwargs):
 */
  __Pyx_TraceLine(2502,0,__PYX_ERR(0, 2502, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_conv_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2501
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.deserialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2504
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_7serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_6serialise[] = "KM3DataFrame.serialise(self, *args, **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_7serialise = {"serialise", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_7serialise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_6serialise};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_7serialise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serialise (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "serialise") < 0)) __PYX_ERR(0, 2504, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serialise", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2504, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_6serialise(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_6serialise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__285)
  __Pyx_RefNannySetupContext("serialise", 0);
  __Pyx_TraceCall("serialise", __pyx_f[0], 2504, 0, __PYX_ERR(0, 2504, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2505
 * 
 *     def serialise(self, *args, **kwargs):
 *         return self.conv_to(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_TraceLine(2505,0,__PYX_ERR(0, 2505, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conv_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2504
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.serialise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2508
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt in {'numpy', 'pandas'}:
 *             return cls(data, h5loc=h5loc, **kwargs)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_9conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_8conv_from[] = "KM3DataFrame.conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_9conv_from = {"conv_from", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_9conv_from, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_8conv_from};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_9conv_from(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_data = 0;
  CYTHON_UNUSED PyObject *__pyx_v_event_id = 0;
  PyObject *__pyx_v_h5loc = 0;
  PyObject *__pyx_v_fmt = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_from (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_data,&__pyx_n_s_event_id,&__pyx_n_s_h5loc,&__pyx_n_s_fmt,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject*)__pyx_kp_s__2));
    values[4] = ((PyObject *)((PyObject*)__pyx_n_s_pandas));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, 1); __PYX_ERR(0, 2508, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event_id);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_h5loc);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "conv_from") < 0)) __PYX_ERR(0, 2508, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_data = values[1];
    __pyx_v_event_id = values[2];
    __pyx_v_h5loc = values[3];
    __pyx_v_fmt = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_from", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2508, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_8conv_from(__pyx_self, __pyx_v_cls, __pyx_v_data, __pyx_v_event_id, __pyx_v_h5loc, __pyx_v_fmt, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_8conv_from(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_event_id, PyObject *__pyx_v_h5loc, PyObject *__pyx_v_fmt, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__286)
  __Pyx_RefNannySetupContext("conv_from", 0);
  __Pyx_TraceCall("conv_from", __pyx_f[0], 2508, 0, __PYX_ERR(0, 2508, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2509
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs):
 *         if fmt in {'numpy', 'pandas'}:             # <<<<<<<<<<<<<<
 *             return cls(data, h5loc=h5loc, **kwargs)
 *         if fmt == 'dict':
 */
  __Pyx_TraceLine(2509,0,__PYX_ERR(0, 2509, __pyx_L1_error))
  __Pyx_INCREF(__pyx_v_fmt);
  __pyx_t_1 = __pyx_v_fmt;
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2509, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2509, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":2510
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs):
 *         if fmt in {'numpy', 'pandas'}:
 *             return cls(data, h5loc=h5loc, **kwargs)             # <<<<<<<<<<<<<<
 *         if fmt == 'dict':
 *             return cls(data, index=[0], h5loc=h5loc, **kwargs)
 */
    __Pyx_TraceLine(2510,0,__PYX_ERR(0, 2510, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_data);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 2510, __pyx_L1_error)
    __pyx_t_4 = __pyx_t_5;
    __pyx_t_5 = 0;
    if (__Pyx_MergeKeywords(__pyx_t_4, __pyx_v_kwargs) < 0) __PYX_ERR(0, 2510, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2509
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs):
 *         if fmt in {'numpy', 'pandas'}:             # <<<<<<<<<<<<<<
 *             return cls(data, h5loc=h5loc, **kwargs)
 *         if fmt == 'dict':
 */
  }

  /* "km3pipe/dataclasses.pyx":2511
 *         if fmt in {'numpy', 'pandas'}:
 *             return cls(data, h5loc=h5loc, **kwargs)
 *         if fmt == 'dict':             # <<<<<<<<<<<<<<
 *             return cls(data, index=[0], h5loc=h5loc, **kwargs)
 * 
 */
  __Pyx_TraceLine(2511,0,__PYX_ERR(0, 2511, __pyx_L1_error))
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_fmt, __pyx_n_s_dict, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2511, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "km3pipe/dataclasses.pyx":2512
 *             return cls(data, h5loc=h5loc, **kwargs)
 *         if fmt == 'dict':
 *             return cls(data, index=[0], h5loc=h5loc, **kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 */
    __Pyx_TraceLine(2512,0,__PYX_ERR(0, 2512, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_data);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_0);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_index, __pyx_t_6) < 0) __PYX_ERR(0, 2512, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_h5loc, __pyx_v_h5loc) < 0) __PYX_ERR(0, 2512, __pyx_L1_error)
    __pyx_t_4 = __pyx_t_1;
    __pyx_t_1 = 0;
    if (__Pyx_MergeKeywords(__pyx_t_4, __pyx_v_kwargs) < 0) __PYX_ERR(0, 2512, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2511
 *         if fmt in {'numpy', 'pandas'}:
 *             return cls(data, h5loc=h5loc, **kwargs)
 *         if fmt == 'dict':             # <<<<<<<<<<<<<<
 *             return cls(data, index=[0], h5loc=h5loc, **kwargs)
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":2508
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt in {'numpy', 'pandas'}:
 *             return cls(data, h5loc=h5loc, **kwargs)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.conv_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2514
 *             return cls(data, index=[0], h5loc=h5loc, **kwargs)
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_11conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_10conv_to[] = "KM3DataFrame.conv_to(self, to='numpy', **kwargs)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_11conv_to = {"conv_to", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_11conv_to, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12KM3DataFrame_10conv_to};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12KM3DataFrame_11conv_to(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_to = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conv_to (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_to,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_numpy));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_to);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "conv_to") < 0)) __PYX_ERR(0, 2514, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_to = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conv_to", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2514, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_10conv_to(__pyx_self, __pyx_v_self, __pyx_v_to, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12KM3DataFrame_10conv_to(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_to, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__287)
  __Pyx_RefNannySetupContext("conv_to", 0);
  __Pyx_TraceCall("conv_to", __pyx_f[0], 2514, 0, __PYX_ERR(0, 2514, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2515
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  __Pyx_TraceLine(2515,0,__PYX_ERR(0, 2515, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2515, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":2516
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':
 *             return self.__array__()             # <<<<<<<<<<<<<<
 *         if to == 'pandas':
 *             return self
 */
    __Pyx_TraceLine(2516,0,__PYX_ERR(0, 2516, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2516, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2516, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2515
 * 
 *     def conv_to(self, to='numpy', **kwargs):
 *         if to == 'numpy':             # <<<<<<<<<<<<<<
 *             return self.__array__()
 *         if to == 'pandas':
 */
  }

  /* "km3pipe/dataclasses.pyx":2517
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return self
 * 
 */
  __Pyx_TraceLine(2517,0,__PYX_ERR(0, 2517, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_to, __pyx_n_s_pandas, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2517, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "km3pipe/dataclasses.pyx":2518
 *             return self.__array__()
 *         if to == 'pandas':
 *             return self             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_TraceLine(2518,0,__PYX_ERR(0, 2518, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "km3pipe/dataclasses.pyx":2517
 *         if to == 'numpy':
 *             return self.__array__()
 *         if to == 'pandas':             # <<<<<<<<<<<<<<
 *             return self
 * 
 */
  }

  /* "km3pipe/dataclasses.pyx":2514
 *             return cls(data, index=[0], h5loc=h5loc, **kwargs)
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("km3pipe.dataclasses.KM3DataFrame.conv_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2551
 *     _fields = ()
 * 
 *     def __init__(self, stream):             # <<<<<<<<<<<<<<
 *         data = Struct(self._structure).unpack_from(stream.read(self._size))
 *         for attr, value in zip(self._fields, data):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12BinaryStruct_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12BinaryStruct___init__[] = "BinaryStruct.__init__(self, stream)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12BinaryStruct_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12BinaryStruct_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_12BinaryStruct___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12BinaryStruct_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stream = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stream,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 2551, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2551, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_stream = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2551, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.BinaryStruct.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12BinaryStruct___init__(__pyx_self, __pyx_v_self, __pyx_v_stream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12BinaryStruct___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream) {
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_v_attr = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  __Pyx_TraceFrameInit(__pyx_codeobj__288)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 2551, 0, __PYX_ERR(0, 2551, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2552
 * 
 *     def __init__(self, stream):
 *         data = Struct(self._structure).unpack_from(stream.read(self._size))             # <<<<<<<<<<<<<<
 *         for attr, value in zip(self._fields, data):
 *             setattr(self, attr, value)
 */
  __Pyx_TraceLine(2552,0,__PYX_ERR(0, 2552, __pyx_L1_error))
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Struct); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_structure); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2552, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2552, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2552, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_unpack_from); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stream, __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2552, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2552, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2552, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2552, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2552, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2552, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_data = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2553
 *     def __init__(self, stream):
 *         data = Struct(self._structure).unpack_from(stream.read(self._size))
 *         for attr, value in zip(self._fields, data):             # <<<<<<<<<<<<<<
 *             setattr(self, attr, value)
 * 
 */
  __Pyx_TraceLine(2553,0,__PYX_ERR(0, 2553, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fields_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_data);
  __Pyx_GIVEREF(__pyx_v_data);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_data);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2553, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2553, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_9)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2553, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2553, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2553, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2553, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_9(__pyx_t_3);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2553, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      #if !CYTHON_COMPILING_IN_PYPY
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2553, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext;
      index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_2 = __pyx_t_10(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_6), 2) < 0) __PYX_ERR(0, 2553, __pyx_L1_error)
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2553, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "km3pipe/dataclasses.pyx":2554
 *         data = Struct(self._structure).unpack_from(stream.read(self._size))
 *         for attr, value in zip(self._fields, data):
 *             setattr(self, attr, value)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_TraceLine(2554,0,__PYX_ERR(0, 2554, __pyx_L1_error))
    __pyx_t_11 = PyObject_SetAttr(__pyx_v_self, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 2554, __pyx_L1_error)

    /* "km3pipe/dataclasses.pyx":2553
 *     def __init__(self, stream):
 *         data = Struct(self._structure).unpack_from(stream.read(self._size))
 *         for attr, value in zip(self._fields, data):             # <<<<<<<<<<<<<<
 *             setattr(self, attr, value)
 * 
 */
    __Pyx_TraceLine(2553,0,__PYX_ERR(0, 2553, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "km3pipe/dataclasses.pyx":2551
 *     _fields = ()
 * 
 *     def __init__(self, stream):             # <<<<<<<<<<<<<<
 *         data = Struct(self._structure).unpack_from(stream.read(self._size))
 *         for attr, value in zip(self._fields, data):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("km3pipe.dataclasses.BinaryStruct.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XDECREF(__pyx_v_attr);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2557
 * 
 *     @property
 *     def _size(self):             # <<<<<<<<<<<<<<
 *         return calcsize(self._structure)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12BinaryStruct_3_size(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_12BinaryStruct_2_size[] = "BinaryStruct._size(self)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_12BinaryStruct_3_size = {"_size", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12BinaryStruct_3_size, METH_O, __pyx_doc_7km3pipe_11dataclasses_12BinaryStruct_2_size};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_12BinaryStruct_3_size(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_size (wrapper)", 0);
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_12BinaryStruct_2_size(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_12BinaryStruct_2_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__289)
  __Pyx_RefNannySetupContext("_size", 0);
  __Pyx_TraceCall("_size", __pyx_f[0], 2557, 0, __PYX_ERR(0, 2557, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":2558
 *     @property
 *     def _size(self):
 *         return calcsize(self._structure)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(2558,0,__PYX_ERR(0, 2558, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_calcsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_structure); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2558, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2558, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2558, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "km3pipe/dataclasses.pyx":2557
 * 
 *     @property
 *     def _size(self):             # <<<<<<<<<<<<<<
 *         return calcsize(self._structure)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("km3pipe.dataclasses.BinaryStruct._size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "km3pipe/dataclasses.pyx":2565
 *     _structure = ''
 * 
 *     def __init__(sefl, stream):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7km3pipe_11dataclasses_15BinaryComposite_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7km3pipe_11dataclasses_15BinaryComposite___init__[] = "BinaryComposite.__init__(sefl, stream)";
static PyMethodDef __pyx_mdef_7km3pipe_11dataclasses_15BinaryComposite_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_15BinaryComposite_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7km3pipe_11dataclasses_15BinaryComposite___init__};
static PyObject *__pyx_pw_7km3pipe_11dataclasses_15BinaryComposite_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_sefl = 0;
  CYTHON_UNUSED PyObject *__pyx_v_stream = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sefl,&__pyx_n_s_stream,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sefl)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 2565, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2565, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_sefl = values[0];
    __pyx_v_stream = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2565, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.BinaryComposite.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7km3pipe_11dataclasses_15BinaryComposite___init__(__pyx_self, __pyx_v_sefl, __pyx_v_stream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7km3pipe_11dataclasses_15BinaryComposite___init__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_sefl, CYTHON_UNUSED PyObject *__pyx_v_stream) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__290)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 2565, 0, __PYX_ERR(0, 2565, __pyx_L1_error));

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("km3pipe.dataclasses.BinaryComposite.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":214
 *         # experimental exception made for __getbuffer__ and __releasebuffer__
 *         # -- the details of this may change.
 *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fullfill the PEP.
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_v_copy_shape;
  int __pyx_v_i;
  int __pyx_v_ndim;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  int __pyx_v_t;
  char *__pyx_v_f;
  PyArray_Descr *__pyx_v_descr = 0;
  int __pyx_v_offset;
  int __pyx_v_hasfields;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  if (__pyx_v_info != NULL) {
    __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(__pyx_v_info->obj);
  }
  __Pyx_TraceCall("__getbuffer__", __pyx_f[2], 214, 0, __PYX_ERR(2, 214, __pyx_L1_error));

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":220
 *             # of flags
 * 
 *             if info == NULL: return             # <<<<<<<<<<<<<<
 * 
 *             cdef int copy_shape, i, ndim
 */
  __Pyx_TraceLine(220,0,__PYX_ERR(2, 220, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_info == NULL) != 0);
  if (__pyx_t_1) {
    __pyx_r = 0;
    goto __pyx_L0;
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":223
 * 
 *             cdef int copy_shape, i, ndim
 *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 */
  __Pyx_TraceLine(223,0,__PYX_ERR(2, 223, __pyx_L1_error))
  __pyx_v_endian_detector = 1;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":224
 *             cdef int copy_shape, i, ndim
 *             cdef int endian_detector = 1
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
 * 
 *             ndim = PyArray_NDIM(self)
 */
  __Pyx_TraceLine(224,0,__PYX_ERR(2, 224, __pyx_L1_error))
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":226
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __Pyx_TraceLine(226,0,__PYX_ERR(2, 226, __pyx_L1_error))
  __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":228
 *             ndim = PyArray_NDIM(self)
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 copy_shape = 1
 *             else:
 */
  __Pyx_TraceLine(228,0,__PYX_ERR(2, 228, __pyx_L1_error))
  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
  if (__pyx_t_1) {

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":229
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 copy_shape = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 copy_shape = 0
 */
    __Pyx_TraceLine(229,0,__PYX_ERR(2, 229, __pyx_L1_error))
    __pyx_v_copy_shape = 1;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":228
 *             ndim = PyArray_NDIM(self)
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 copy_shape = 1
 *             else:
 */
    goto __pyx_L4;
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231
 *                 copy_shape = 1
 *             else:
 *                 copy_shape = 0             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 */
  __Pyx_TraceLine(231,0,__PYX_ERR(2, 231, __pyx_L1_error))
  /*else*/ {
    __pyx_v_copy_shape = 0;
  }
  __pyx_L4:;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":233
 *                 copy_shape = 0
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")
 */
  __Pyx_TraceLine(233,0,__PYX_ERR(2, 233, __pyx_L1_error))
  __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":234
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 */
  __Pyx_TraceLine(234,0,__PYX_ERR(2, 234, __pyx_L1_error))
  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":233
 *                 copy_shape = 0
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")
 */
  __Pyx_TraceLine(233,0,__PYX_ERR(2, 233, __pyx_L1_error))
  if (__pyx_t_1) {

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":235
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
    __Pyx_TraceLine(235,0,__PYX_ERR(2, 235, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__291, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 235, __pyx_L1_error)

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":233
 *                 copy_shape = 0
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")
 */
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":237
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 */
  __Pyx_TraceLine(237,0,__PYX_ERR(2, 237, __pyx_L1_error))
  __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L9_bool_binop_done;
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":238
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 */
  __Pyx_TraceLine(238,0,__PYX_ERR(2, 238, __pyx_L1_error))
  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L9_bool_binop_done:;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":237
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 */
  __Pyx_TraceLine(237,0,__PYX_ERR(2, 237, __pyx_L1_error))
  if (__pyx_t_1) {

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":239
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
    __Pyx_TraceLine(239,0,__PYX_ERR(2, 239, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__292, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 239, __pyx_L1_error)

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":237
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 */
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":241
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
 *             info.ndim = ndim
 *             if copy_shape:
 */
  __Pyx_TraceLine(241,0,__PYX_ERR(2, 241, __pyx_L1_error))
  __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":242
 * 
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim             # <<<<<<<<<<<<<<
 *             if copy_shape:
 *                 # Allocate new buffer for strides and shape info.
 */
  __Pyx_TraceLine(242,0,__PYX_ERR(2, 242, __pyx_L1_error))
  __pyx_v_info->ndim = __pyx_v_ndim;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":243
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim
 *             if copy_shape:             # <<<<<<<<<<<<<<
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 */
  __Pyx_TraceLine(243,0,__PYX_ERR(2, 243, __pyx_L1_error))
  __pyx_t_1 = (__pyx_v_copy_shape != 0);
  if (__pyx_t_1) {

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":246
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)             # <<<<<<<<<<<<<<
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 */
    __Pyx_TraceLine(246,0,__PYX_ERR(2, 246, __pyx_L1_error))
    __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":247
 *                 # This is allocated as one block, strides first.
 *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
 *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 */
    __Pyx_TraceLine(247,0,__PYX_ERR(2, 247, __pyx_L1_error))
    __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":248
 *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):             # <<<<<<<<<<<<<<
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 */
    __Pyx_TraceLine(248,0,__PYX_ERR(2, 248, __pyx_L1_error))
    __pyx_t_4 = __pyx_v_ndim;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":249
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 */
      __Pyx_TraceLine(249,0,__PYX_ERR(2, 249, __pyx_L1_error))
      (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":250
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 */
      __Pyx_TraceLine(250,0,__PYX_ERR(2, 250, __pyx_L1_error))
      (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
    }

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":243
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim
 *             if copy_shape:             # <<<<<<<<<<<<<<
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 */
    goto __pyx_L11;
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":252
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 */
  __Pyx_TraceLine(252,0,__PYX_ERR(2, 252, __pyx_L1_error))
  /*else*/ {
    __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":253
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 */
    __Pyx_TraceLine(253,0,__PYX_ERR(2, 253, __pyx_L1_error))
    __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
  }
  __pyx_L11:;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":254
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 */
  __Pyx_TraceLine(254,0,__PYX_ERR(2, 254, __pyx_L1_error))
  __pyx_v_info->suboffsets = NULL;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":255
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 * 
 */
  __Pyx_TraceLine(255,0,__PYX_ERR(2, 255, __pyx_L1_error))
  __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":256
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
 * 
 *             cdef int t
 */
  __Pyx_TraceLine(256,0,__PYX_ERR(2, 256, __pyx_L1_error))
  __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":259
 * 
 *             cdef int t
 *             cdef char* f = NULL             # <<<<<<<<<<<<<<
 *             cdef dtype descr = self.descr
 *             cdef int offset
 */
  __Pyx_TraceLine(259,0,__PYX_ERR(2, 259, __pyx_L1_error))
  __pyx_v_f = NULL;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":260
 *             cdef int t
 *             cdef char* f = NULL
 *             cdef dtype descr = self.descr             # <<<<<<<<<<<<<<
 *             cdef int offset
 * 
 */
  __Pyx_TraceLine(260,0,__PYX_ERR(2, 260, __pyx_L1_error))
  __pyx_t_3 = ((PyObject *)__pyx_v_self->descr);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":263
 *             cdef int offset
 * 
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)             # <<<<<<<<<<<<<<
 * 
 *             if not hasfields and not copy_shape:
 */
  __Pyx_TraceLine(263,0,__PYX_ERR(2, 263, __pyx_L1_error))
  __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
 * 
 *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
 *                 # do not call releasebuffer
 *                 info.obj = None
 */
  __Pyx_TraceLine(265,0,__PYX_ERR(2, 265, __pyx_L1_error))
  __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L15_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_v_copy_shape != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L15_bool_binop_done:;
  if (__pyx_t_1) {

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":267
 *             if not hasfields and not copy_shape:
 *                 # do not call releasebuffer
 *                 info.obj = None             # <<<<<<<<<<<<<<
 *             else:
 *                 # need to call releasebuffer
 */
    __Pyx_TraceLine(267,0,__PYX_ERR(2, 267, __pyx_L1_error))
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj);
    __pyx_v_info->obj = Py_None;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
 * 
 *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
 *                 # do not call releasebuffer
 *                 info.obj = None
 */
    goto __pyx_L14;
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
 *             else:
 *                 # need to call releasebuffer
 *                 info.obj = self             # <<<<<<<<<<<<<<
 * 
 *             if not hasfields:
 */
  __Pyx_TraceLine(270,0,__PYX_ERR(2, 270, __pyx_L1_error))
  /*else*/ {
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj);
    __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
  }
  __pyx_L14:;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
 *                 info.obj = self
 * 
 *             if not hasfields:             # <<<<<<<<<<<<<<
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 */
  __Pyx_TraceLine(272,0,__PYX_ERR(2, 272, __pyx_L1_error))
  __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0);
  if (__pyx_t_1) {

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":273
 * 
 *             if not hasfields:
 *                 t = descr.type_num             # <<<<<<<<<<<<<<
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 */
    __Pyx_TraceLine(273,0,__PYX_ERR(2, 273, __pyx_L1_error))
    __pyx_t_4 = __pyx_v_descr->type_num;
    __pyx_v_t = __pyx_t_4;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
 *             if not hasfields:
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 */
    __Pyx_TraceLine(274,0,__PYX_ERR(2, 274, __pyx_L1_error))
    __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
    if (!__pyx_t_2) {
      goto __pyx_L20_next_or;
    } else {
    }
    __pyx_t_2 = (__pyx_v_little_endian != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L19_bool_binop_done;
    }
    __pyx_L20_next_or:;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":275
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 */
    __Pyx_TraceLine(275,0,__PYX_ERR(2, 275, __pyx_L1_error))
    __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L19_bool_binop_done;
    }
    __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L19_bool_binop_done:;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
 *             if not hasfields:
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 */
    __Pyx_TraceLine(274,0,__PYX_ERR(2, 274, __pyx_L1_error))
    if (__pyx_t_1) {

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
      __Pyx_TraceLine(276,0,__PYX_ERR(2, 276, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__293, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(2, 276, __pyx_L1_error)

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
 *             if not hasfields:
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 */
    }

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":277
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 */
    __Pyx_TraceLine(277,0,__PYX_ERR(2, 277, __pyx_L1_error))
    switch (__pyx_v_t) {
      case NPY_BYTE:
      __pyx_v_f = ((char *)"b");
      break;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":278
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 */
      __Pyx_TraceLine(278,0,__PYX_ERR(2, 278, __pyx_L1_error))
      case NPY_UBYTE:
      __pyx_v_f = ((char *)"B");
      break;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":279
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 */
      __Pyx_TraceLine(279,0,__PYX_ERR(2, 279, __pyx_L1_error))
      case NPY_SHORT:
      __pyx_v_f = ((char *)"h");
      break;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 */
      __Pyx_TraceLine(280,0,__PYX_ERR(2, 280, __pyx_L1_error))
      case NPY_USHORT:
      __pyx_v_f = ((char *)"H");
      break;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":281
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 */
      __Pyx_TraceLine(281,0,__PYX_ERR(2, 281, __pyx_L1_error))
      case NPY_INT:
      __pyx_v_f = ((char *)"i");
      break;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":282
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 */
      __Pyx_TraceLine(282,0,__PYX_ERR(2, 282, __pyx_L1_error))
      case NPY_UINT:
      __pyx_v_f = ((char *)"I");
      break;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":283
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 */
      __Pyx_TraceLine(283,0,__PYX_ERR(2, 283, __pyx_L1_error))
      case NPY_LONG:
      __pyx_v_f = ((char *)"l");
      break;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":284
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 */
      __Pyx_TraceLine(284,0,__PYX_ERR(2, 284, __pyx_L1_error))
      case NPY_ULONG:
      __pyx_v_f = ((char *)"L");
      break;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":285
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 */
      __Pyx_TraceLine(285,0,__PYX_ERR(2, 285, __pyx_L1_error))
      case NPY_LONGLONG:
      __pyx_v_f = ((char *)"q");
      break;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":286
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 */
      __Pyx_TraceLine(286,0,__PYX_ERR(2, 286, __pyx_L1_error))
      case NPY_ULONGLONG:
      __pyx_v_f = ((char *)"Q");
      break;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":287
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 */
      __Pyx_TraceLine(287,0,__PYX_ERR(2, 287, __pyx_L1_error))
      case NPY_FLOAT:
      __pyx_v_f = ((char *)"f");
      break;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":288
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 */
      __Pyx_TraceLine(288,0,__PYX_ERR(2, 288, __pyx_L1_error))
      case NPY_DOUBLE:
      __pyx_v_f = ((char *)"d");
      break;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":289
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 */
      __Pyx_TraceLine(289,0,__PYX_ERR(2, 289, __pyx_L1_error))
      case NPY_LONGDOUBLE:
      __pyx_v_f = ((char *)"g");
      break;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":290
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 */
      __Pyx_TraceLine(290,0,__PYX_ERR(2, 290, __pyx_L1_error))
      case NPY_CFLOAT:
      __pyx_v_f = ((char *)"Zf");
      break;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":291
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"
 */
      __Pyx_TraceLine(291,0,__PYX_ERR(2, 291, __pyx_L1_error))
      case NPY_CDOUBLE:
      __pyx_v_f = ((char *)"Zd");
      break;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":292
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 */
      __Pyx_TraceLine(292,0,__PYX_ERR(2, 292, __pyx_L1_error))
      case NPY_CLONGDOUBLE:
      __pyx_v_f = ((char *)"Zg");
      break;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":293
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
      __Pyx_TraceLine(293,0,__PYX_ERR(2, 293, __pyx_L1_error))
      case NPY_OBJECT:
      __pyx_v_f = ((char *)"O");
      break;
      default:

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":295
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *                 info.format = f
 *                 return
 */
      __Pyx_TraceLine(295,0,__PYX_ERR(2, 295, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(2, 295, __pyx_L1_error)
      break;
    }

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":296
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f             # <<<<<<<<<<<<<<
 *                 return
 *             else:
 */
    __Pyx_TraceLine(296,0,__PYX_ERR(2, 296, __pyx_L1_error))
    __pyx_v_info->format = __pyx_v_f;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f
 *                 return             # <<<<<<<<<<<<<<
 *             else:
 *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
 */
    __Pyx_TraceLine(297,0,__PYX_ERR(2, 297, __pyx_L1_error))
    __pyx_r = 0;
    goto __pyx_L0;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
 *                 info.obj = self
 * 
 *             if not hasfields:             # <<<<<<<<<<<<<<
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 */
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":299
 *                 return
 *             else:
 *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0
 */
  __Pyx_TraceLine(299,0,__PYX_ERR(2, 299, __pyx_L1_error))
  /*else*/ {
    __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":300
 *             else:
 *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
 *                 info.format[0] = c'^' # Native data types, manual alignment             # <<<<<<<<<<<<<<
 *                 offset = 0
 *                 f = _util_dtypestring(descr, info.format + 1,
 */
    __Pyx_TraceLine(300,0,__PYX_ERR(2, 300, __pyx_L1_error))
    (__pyx_v_info->format[0]) = '^';

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":301
 *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0             # <<<<<<<<<<<<<<
 *                 f = _util_dtypestring(descr, info.format + 1,
 *                                       info.format + _buffer_format_string_len,
 */
    __Pyx_TraceLine(301,0,__PYX_ERR(2, 301, __pyx_L1_error))
    __pyx_v_offset = 0;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0
 *                 f = _util_dtypestring(descr, info.format + 1,             # <<<<<<<<<<<<<<
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)
 */
    __Pyx_TraceLine(302,0,__PYX_ERR(2, 302, __pyx_L1_error))
    __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(2, 302, __pyx_L1_error)
    __pyx_v_f = __pyx_t_7;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":305
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)
 *                 f[0] = c'\0' # Terminate format string             # <<<<<<<<<<<<<<
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 */
    __Pyx_TraceLine(305,0,__PYX_ERR(2, 305, __pyx_L1_error))
    (__pyx_v_f[0]) = '\x00';
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":214
 *         # experimental exception made for __getbuffer__ and __releasebuffer__
 *         # -- the details of this may change.
 *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fullfill the PEP.
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(Py_None);
    __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
  }
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_descr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":307
 *                 f[0] = c'\0' # Terminate format string
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             if PyArray_HASFIELDS(self):
 *                 PyObject_Free(info.format)
 */

/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);
  __Pyx_TraceCall("__releasebuffer__", __pyx_f[2], 307, 0, __PYX_ERR(2, 307, __pyx_L1_error));

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":308
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
 *                 PyObject_Free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __Pyx_TraceLine(308,0,__PYX_ERR(2, 308, __pyx_L1_error))
  __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
  if (__pyx_t_1) {

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":309
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):
 *                 PyObject_Free(info.format)             # <<<<<<<<<<<<<<
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 PyObject_Free(info.strides)
 */
    __Pyx_TraceLine(309,0,__PYX_ERR(2, 309, __pyx_L1_error))
    PyObject_Free(__pyx_v_info->format);

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":308
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
 *                 PyObject_Free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":310
 *             if PyArray_HASFIELDS(self):
 *                 PyObject_Free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 PyObject_Free(info.strides)
 *                 # info.shape was stored after info.strides in the same block
 */
  __Pyx_TraceLine(310,0,__PYX_ERR(2, 310, __pyx_L1_error))
  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
  if (__pyx_t_1) {

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":311
 *                 PyObject_Free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 PyObject_Free(info.strides)             # <<<<<<<<<<<<<<
 *                 # info.shape was stored after info.strides in the same block
 * 
 */
    __Pyx_TraceLine(311,0,__PYX_ERR(2, 311, __pyx_L1_error))
    PyObject_Free(__pyx_v_info->strides);

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":310
 *             if PyArray_HASFIELDS(self):
 *                 PyObject_Free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 PyObject_Free(info.strides)
 *                 # info.shape was stored after info.strides in the same block
 */
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":307
 *                 f[0] = c'\0' # Terminate format string
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             if PyArray_HASFIELDS(self):
 *                 PyObject_Free(info.format)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("numpy.ndarray.__releasebuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":788
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
  __Pyx_TraceCall("PyArray_MultiIterNew1", __pyx_f[2], 788, 0, __PYX_ERR(2, 788, __pyx_L1_error));

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":789
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 */
  __Pyx_TraceLine(789,0,__PYX_ERR(2, 789, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":788
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
  __Pyx_TraceCall("PyArray_MultiIterNew2", __pyx_f[2], 791, 0, __PYX_ERR(2, 791, __pyx_L1_error));

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":792
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 */
  __Pyx_TraceLine(792,0,__PYX_ERR(2, 792, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":794
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
  __Pyx_TraceCall("PyArray_MultiIterNew3", __pyx_f[2], 794, 0, __PYX_ERR(2, 794, __pyx_L1_error));

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":795
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 */
  __Pyx_TraceLine(795,0,__PYX_ERR(2, 795, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":794
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":797
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
  __Pyx_TraceCall("PyArray_MultiIterNew4", __pyx_f[2], 797, 0, __PYX_ERR(2, 797, __pyx_L1_error));

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":798
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 */
  __Pyx_TraceLine(798,0,__PYX_ERR(2, 798, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":797
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":800
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
  __Pyx_TraceCall("PyArray_MultiIterNew5", __pyx_f[2], 800, 0, __PYX_ERR(2, 800, __pyx_L1_error));

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 */
  __Pyx_TraceLine(801,0,__PYX_ERR(2, 801, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":800
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":803
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
  __Pyx_TraceCall("PyDataType_SHAPE", __pyx_f[2], 803, 0, __PYX_ERR(2, 803, __pyx_L1_error));

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":804
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
 */
  __Pyx_TraceLine(804,0,__PYX_ERR(2, 804, __pyx_L1_error))
  __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
  if (__pyx_t_1) {

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<
 *     else:
 *         return ()
 */
    __Pyx_TraceLine(805,0,__PYX_ERR(2, 805, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
    __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
    goto __pyx_L0;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":804
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
 */
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":807
 *         return <tuple>d.subarray.shape
 *     else:
 *         return ()             # <<<<<<<<<<<<<<
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
 */
  __Pyx_TraceLine(807,0,__PYX_ERR(2, 807, __pyx_L1_error))
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_empty_tuple);
    __pyx_r = __pyx_empty_tuple;
    goto __pyx_L0;
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":803
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("numpy.PyDataType_SHAPE", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809
 *         return ()
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
 *     # Recursive utility function used in __getbuffer__ to get format
 *     # string. The new location in the format string is returned.
 */

static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
  PyArray_Descr *__pyx_v_child = 0;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_childname = NULL;
  PyObject *__pyx_v_new_offset = NULL;
  PyObject *__pyx_v_t = NULL;
  char *__pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  long __pyx_t_8;
  char *__pyx_t_9;
  __Pyx_RefNannySetupContext("_util_dtypestring", 0);
  __Pyx_TraceCall("_util_dtypestring", __pyx_f[2], 809, 0, __PYX_ERR(2, 809, __pyx_L1_error));

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":814
 * 
 *     cdef dtype child
 *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 *     cdef tuple fields
 */
  __Pyx_TraceLine(814,0,__PYX_ERR(2, 814, __pyx_L1_error))
  __pyx_v_endian_detector = 1;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":815
 *     cdef dtype child
 *     cdef int endian_detector = 1
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
 *     cdef tuple fields
 * 
 */
  __Pyx_TraceLine(815,0,__PYX_ERR(2, 815, __pyx_L1_error))
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":818
 *     cdef tuple fields
 * 
 *     for childname in descr.names:             # <<<<<<<<<<<<<<
 *         fields = descr.fields[childname]
 *         child, new_offset = fields
 */
  __Pyx_TraceLine(818,0,__PYX_ERR(2, 818, __pyx_L1_error))
  if (unlikely(__pyx_v_descr->names == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(2, 818, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 818, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":819
 * 
 *     for childname in descr.names:
 *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
 *         child, new_offset = fields
 * 
 */
    __Pyx_TraceLine(819,0,__PYX_ERR(2, 819, __pyx_L1_error))
    if (unlikely(__pyx_v_descr->fields == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 819, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 819, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":820
 *     for childname in descr.names:
 *         fields = descr.fields[childname]
 *         child, new_offset = fields             # <<<<<<<<<<<<<<
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:
 */
    __Pyx_TraceLine(820,0,__PYX_ERR(2, 820, __pyx_L1_error))
    if (likely(__pyx_v_fields != Py_None)) {
      PyObject* sequence = __pyx_v_fields;
      #if !CYTHON_COMPILING_IN_PYPY
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(2, 820, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 820, __pyx_L1_error)
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 820, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":822
 *         child, new_offset = fields
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 */
    __Pyx_TraceLine(822,0,__PYX_ERR(2, 822, __pyx_L1_error))
    __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 822, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
    if (__pyx_t_6) {

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":823
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 */
      __Pyx_TraceLine(823,0,__PYX_ERR(2, 823, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__294, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 823, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(2, 823, __pyx_L1_error)

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":822
 *         child, new_offset = fields
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 */
    }

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":825
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")
 */
    __Pyx_TraceLine(825,0,__PYX_ERR(2, 825, __pyx_L1_error))
    __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
    if (!__pyx_t_7) {
      goto __pyx_L8_next_or;
    } else {
    }
    __pyx_t_7 = (__pyx_v_little_endian != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_L8_next_or:;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":826
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 *             (child.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
 *             raise ValueError(u"Non-native byte order not supported")
 *             # One could encode it in the format string and have Cython
 */
    __Pyx_TraceLine(826,0,__PYX_ERR(2, 826, __pyx_L1_error))
    __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
    if (__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
    __pyx_t_6 = __pyx_t_7;
    __pyx_L7_bool_binop_done:;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":825
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")
 */
    __Pyx_TraceLine(825,0,__PYX_ERR(2, 825, __pyx_L1_error))
    if (__pyx_t_6) {

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
 *         if ((child.byteorder == c'>' and little_endian) or
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *             # One could encode it in the format string and have Cython
 *             # complain instead, BUT: < and > in format strings also imply
 */
      __Pyx_TraceLine(827,0,__PYX_ERR(2, 827, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__295, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 827, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(2, 827, __pyx_L1_error)

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":825
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")
 */
    }

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
 * 
 *         # Output padding bytes
 *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 */
    __Pyx_TraceLine(837,0,__PYX_ERR(2, 837, __pyx_L1_error))
    while (1) {
      __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 837, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 837, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!__pyx_t_6) break;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":838
 *         # Output padding bytes
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
 *             f += 1
 *             offset[0] += 1
 */
      __Pyx_TraceLine(838,0,__PYX_ERR(2, 838, __pyx_L1_error))
      (__pyx_v_f[0]) = 0x78;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":839
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte
 *             f += 1             # <<<<<<<<<<<<<<
 *             offset[0] += 1
 * 
 */
      __Pyx_TraceLine(839,0,__PYX_ERR(2, 839, __pyx_L1_error))
      __pyx_v_f = (__pyx_v_f + 1);

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":840
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 *             offset[0] += 1             # <<<<<<<<<<<<<<
 * 
 *         offset[0] += child.itemsize
 */
      __Pyx_TraceLine(840,0,__PYX_ERR(2, 840, __pyx_L1_error))
      __pyx_t_8 = 0;
      (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
    }

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842
 *             offset[0] += 1
 * 
 *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
 * 
 *         if not PyDataType_HASFIELDS(child):
 */
    __Pyx_TraceLine(842,0,__PYX_ERR(2, 842, __pyx_L1_error))
    __pyx_t_8 = 0;
    (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":844
 *         offset[0] += child.itemsize
 * 
 *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
 *             t = child.type_num
 *             if end - f < 5:
 */
    __Pyx_TraceLine(844,0,__PYX_ERR(2, 844, __pyx_L1_error))
    __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
    if (__pyx_t_6) {

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":845
 * 
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num             # <<<<<<<<<<<<<<
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")
 */
      __Pyx_TraceLine(845,0,__PYX_ERR(2, 845, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 845, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":846
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num
 *             if end - f < 5:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(u"Format string allocated too short.")
 * 
 */
      __Pyx_TraceLine(846,0,__PYX_ERR(2, 846, __pyx_L1_error))
      __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
      if (__pyx_t_6) {

        /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":847
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
        __Pyx_TraceLine(847,0,__PYX_ERR(2, 847, __pyx_L1_error))
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__296, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 847, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(2, 847, __pyx_L1_error)

        /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":846
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num
 *             if end - f < 5:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(u"Format string allocated too short.")
 * 
 */
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":850
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"             # <<<<<<<<<<<<<<
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 */
      __Pyx_TraceLine(850,0,__PYX_ERR(2, 850, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 850, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 850, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 98;
        goto __pyx_L15;
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"             # <<<<<<<<<<<<<<
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 */
      __Pyx_TraceLine(851,0,__PYX_ERR(2, 851, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 851, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 851, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 66;
        goto __pyx_L15;
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":852
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 */
      __Pyx_TraceLine(852,0,__PYX_ERR(2, 852, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 852, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x68;
        goto __pyx_L15;
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":853
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 */
      __Pyx_TraceLine(853,0,__PYX_ERR(2, 853, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 853, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 72;
        goto __pyx_L15;
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":854
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 */
      __Pyx_TraceLine(854,0,__PYX_ERR(2, 854, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 854, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 854, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 854, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x69;
        goto __pyx_L15;
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 */
      __Pyx_TraceLine(855,0,__PYX_ERR(2, 855, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 855, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 73;
        goto __pyx_L15;
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 */
      __Pyx_TraceLine(856,0,__PYX_ERR(2, 856, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 856, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 856, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x6C;
        goto __pyx_L15;
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":857
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 */
      __Pyx_TraceLine(857,0,__PYX_ERR(2, 857, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 857, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 857, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 76;
        goto __pyx_L15;
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 */
      __Pyx_TraceLine(858,0,__PYX_ERR(2, 858, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 858, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 858, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 858, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x71;
        goto __pyx_L15;
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":859
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 */
      __Pyx_TraceLine(859,0,__PYX_ERR(2, 859, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 859, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 859, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 81;
        goto __pyx_L15;
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":860
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 */
      __Pyx_TraceLine(860,0,__PYX_ERR(2, 860, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 860, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 860, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x66;
        goto __pyx_L15;
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":861
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 */
      __Pyx_TraceLine(861,0,__PYX_ERR(2, 861, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 861, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 861, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 861, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x64;
        goto __pyx_L15;
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":862
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"             # <<<<<<<<<<<<<<
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 */
      __Pyx_TraceLine(862,0,__PYX_ERR(2, 862, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 862, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 862, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 862, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x67;
        goto __pyx_L15;
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":863
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf             # <<<<<<<<<<<<<<
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 */
      __Pyx_TraceLine(863,0,__PYX_ERR(2, 863, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 863, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 863, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 0x66;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L15;
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":864
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd             # <<<<<<<<<<<<<<
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 */
      __Pyx_TraceLine(864,0,__PYX_ERR(2, 864, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 864, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 864, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 864, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 0x64;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L15;
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":865
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg             # <<<<<<<<<<<<<<
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 */
      __Pyx_TraceLine(865,0,__PYX_ERR(2, 865, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 865, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 865, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 865, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 0x67;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L15;
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":866
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
      __Pyx_TraceLine(866,0,__PYX_ERR(2, 866, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 866, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 866, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 79;
        goto __pyx_L15;
      }

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":868
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *             f += 1
 *         else:
 */
      __Pyx_TraceLine(868,0,__PYX_ERR(2, 868, __pyx_L1_error))
      /*else*/ {
        __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 868, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 868, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 868, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(2, 868, __pyx_L1_error)
      }
      __pyx_L15:;

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":869
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *             f += 1             # <<<<<<<<<<<<<<
 *         else:
 *             # Cython ignores struct boundary information ("T{...}"),
 */
      __Pyx_TraceLine(869,0,__PYX_ERR(2, 869, __pyx_L1_error))
      __pyx_v_f = (__pyx_v_f + 1);

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":844
 *         offset[0] += child.itemsize
 * 
 *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
 *             t = child.type_num
 *             if end - f < 5:
 */
      goto __pyx_L13;
    }

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":873
 *             # Cython ignores struct boundary information ("T{...}"),
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
 *     return f
 * 
 */
    __Pyx_TraceLine(873,0,__PYX_ERR(2, 873, __pyx_L1_error))
    /*else*/ {
      __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 873, __pyx_L1_error)
      __pyx_v_f = __pyx_t_9;
    }
    __pyx_L13:;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":818
 *     cdef tuple fields
 * 
 *     for childname in descr.names:             # <<<<<<<<<<<<<<
 *         fields = descr.fields[childname]
 *         child, new_offset = fields
 */
    __Pyx_TraceLine(818,0,__PYX_ERR(2, 818, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":874
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)
 *     return f             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(874,0,__PYX_ERR(2, 874, __pyx_L1_error))
  __pyx_r = __pyx_v_f;
  goto __pyx_L0;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809
 *         return ()
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
 *     # Recursive utility function used in __getbuffer__ to get format
 *     # string. The new location in the format string is returned.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_child);
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_childname);
  __Pyx_XDECREF(__pyx_v_new_offset);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":990
 * 
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *      cdef PyObject* baseptr
 *      if base is None:
 */

static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
  PyObject *__pyx_v_baseptr;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("set_array_base", 0);
  __Pyx_TraceCall("set_array_base", __pyx_f[2], 990, 0, __PYX_ERR(2, 990, __pyx_L1_error));

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":992
 * cdef inline void set_array_base(ndarray arr, object base):
 *      cdef PyObject* baseptr
 *      if base is None:             # <<<<<<<<<<<<<<
 *          baseptr = NULL
 *      else:
 */
  __Pyx_TraceLine(992,0,__PYX_ERR(2, 992, __pyx_L1_error))
  __pyx_t_1 = (__pyx_v_base == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":993
 *      cdef PyObject* baseptr
 *      if base is None:
 *          baseptr = NULL             # <<<<<<<<<<<<<<
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!
 */
    __Pyx_TraceLine(993,0,__PYX_ERR(2, 993, __pyx_L1_error))
    __pyx_v_baseptr = NULL;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":992
 * cdef inline void set_array_base(ndarray arr, object base):
 *      cdef PyObject* baseptr
 *      if base is None:             # <<<<<<<<<<<<<<
 *          baseptr = NULL
 *      else:
 */
    goto __pyx_L3;
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":995
 *          baseptr = NULL
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!             # <<<<<<<<<<<<<<
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)
 */
  __Pyx_TraceLine(995,0,__PYX_ERR(2, 995, __pyx_L1_error))
  /*else*/ {
    Py_INCREF(__pyx_v_base);

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":996
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!
 *          baseptr = <PyObject*>base             # <<<<<<<<<<<<<<
 *      Py_XDECREF(arr.base)
 *      arr.base = baseptr
 */
    __Pyx_TraceLine(996,0,__PYX_ERR(2, 996, __pyx_L1_error))
    __pyx_v_baseptr = ((PyObject *)__pyx_v_base);
  }
  __pyx_L3:;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":997
 *          Py_INCREF(base) # important to do this before decref below!
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)             # <<<<<<<<<<<<<<
 *      arr.base = baseptr
 * 
 */
  __Pyx_TraceLine(997,0,__PYX_ERR(2, 997, __pyx_L1_error))
  Py_XDECREF(__pyx_v_arr->base);

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":998
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)
 *      arr.base = baseptr             # <<<<<<<<<<<<<<
 * 
 * cdef inline object get_array_base(ndarray arr):
 */
  __Pyx_TraceLine(998,0,__PYX_ERR(2, 998, __pyx_L1_error))
  __pyx_v_arr->base = __pyx_v_baseptr;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":990
 * 
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *      cdef PyObject* baseptr
 *      if base is None:
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1000
 *      arr.base = baseptr
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     if arr.base is NULL:
 *         return None
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("get_array_base", 0);
  __Pyx_TraceCall("get_array_base", __pyx_f[2], 1000, 0, __PYX_ERR(2, 1000, __pyx_L1_error));

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1001
 * 
 * cdef inline object get_array_base(ndarray arr):
 *     if arr.base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     else:
 */
  __Pyx_TraceLine(1001,0,__PYX_ERR(2, 1001, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0);
  if (__pyx_t_1) {

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1002
 * cdef inline object get_array_base(ndarray arr):
 *     if arr.base is NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     else:
 *         return <object>arr.base
 */
    __Pyx_TraceLine(1002,0,__PYX_ERR(2, 1002, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1001
 * 
 * cdef inline object get_array_base(ndarray arr):
 *     if arr.base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     else:
 */
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1004
 *         return None
 *     else:
 *         return <object>arr.base             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(1004,0,__PYX_ERR(2, 1004, __pyx_L1_error))
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
    __pyx_r = ((PyObject *)__pyx_v_arr->base);
    goto __pyx_L0;
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1000
 *      arr.base = baseptr
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     if arr.base is NULL:
 *         return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("numpy.get_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1009
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_array()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("import_array", 0);
  __Pyx_TraceCall("import_array", __pyx_f[2], 1009, 0, __PYX_ERR(2, 1009, __pyx_L1_error));

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1010
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_array()
 *     except Exception:
 */
  __Pyx_TraceLine(1010,0,__PYX_ERR(2, 1010, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1011
 * cdef inline int import_array() except -1:
 *     try:
 *         _import_array()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")
 */
      __Pyx_TraceLine(1011,0,__PYX_ERR(2, 1011, __pyx_L3_error))
      __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1011, __pyx_L3_error)

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1010
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_array()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1012
 *     try:
 *         _import_array()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 */
    __Pyx_TraceLine(1012,0,__PYX_ERR(2, 1012, __pyx_L5_except_error))
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1012, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1013
 *         _import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
      __Pyx_TraceLine(1013,0,__PYX_ERR(2, 1013, __pyx_L5_except_error))
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__297, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1013, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(2, 1013, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1010
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_array()
 *     except Exception:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1009
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_array()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1015
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("import_umath", 0);
  __Pyx_TraceCall("import_umath", __pyx_f[2], 1015, 0, __PYX_ERR(2, 1015, __pyx_L1_error));

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1016
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
  __Pyx_TraceLine(1016,0,__PYX_ERR(2, 1016, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1017
 * cdef inline int import_umath() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")
 */
      __Pyx_TraceLine(1017,0,__PYX_ERR(2, 1017, __pyx_L3_error))
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1017, __pyx_L3_error)

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1016
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1018
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 */
    __Pyx_TraceLine(1018,0,__PYX_ERR(2, 1018, __pyx_L5_except_error))
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1018, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1019
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
      __Pyx_TraceLine(1019,0,__PYX_ERR(2, 1019, __pyx_L5_except_error))
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__298, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1019, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(2, 1019, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1016
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1015
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1021
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("import_ufunc", 0);
  __Pyx_TraceCall("import_ufunc", __pyx_f[2], 1021, 0, __PYX_ERR(2, 1021, __pyx_L1_error));

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
  __Pyx_TraceLine(1022,0,__PYX_ERR(2, 1022, __pyx_L3_error))
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1023
 * cdef inline int import_ufunc() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")
 */
      __Pyx_TraceLine(1023,0,__PYX_ERR(2, 1023, __pyx_L3_error))
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1023, __pyx_L3_error)

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1024
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 */
    __Pyx_TraceLine(1024,0,__PYX_ERR(2, 1024, __pyx_L5_except_error))
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1024, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1025
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 */
      __Pyx_TraceLine(1025,0,__PYX_ERR(2, 1025, __pyx_L5_except_error))
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__299, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1025, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(2, 1025, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1021
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_Hit(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_7km3pipe_11dataclasses_3Hit_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses_Hit(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_dir(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_3dir_1__get__(o);
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_pos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_3pos_1__get__(o);
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_2id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_2id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_dom_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_6dom_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_dom_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_6dom_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_4time_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_time(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_4time_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_tot(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_3tot_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_tot(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_3tot_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_channel_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_10channel_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_channel_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_10channel_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_pmt_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_6pmt_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_pmt_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_6pmt_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_triggered(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_9triggered_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_triggered(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_9triggered_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_pos_x(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_x_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_pos_x(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_x_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_pos_y(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_y_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_pos_y(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_y_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_pos_z(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_z_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_pos_z(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_5pos_z_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_dir_x(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_x_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_dir_x(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_x_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_dir_y(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_y_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_dir_y(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_y_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_dir_z(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_z_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_dir_z(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_5dir_z_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_3Hit_t0(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_3Hit_2t0_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_3Hit_t0(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_3Hit_2t0_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_7km3pipe_11dataclasses_Hit[] = {
  {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_3Hit_7__insp__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_3Hit_6__insp__},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_3Hit_9__reduce_cython__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_3Hit_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_3Hit_11__setstate_cython__, METH_O, __pyx_doc_7km3pipe_11dataclasses_3Hit_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7km3pipe_11dataclasses_Hit[] = {
  {(char *)"dir", __pyx_getprop_7km3pipe_11dataclasses_3Hit_dir, 0, (char *)0, 0},
  {(char *)"pos", __pyx_getprop_7km3pipe_11dataclasses_3Hit_pos, 0, (char *)0, 0},
  {(char *)"id", __pyx_getprop_7km3pipe_11dataclasses_3Hit_id, __pyx_setprop_7km3pipe_11dataclasses_3Hit_id, (char *)"id: 'int'", 0},
  {(char *)"dom_id", __pyx_getprop_7km3pipe_11dataclasses_3Hit_dom_id, __pyx_setprop_7km3pipe_11dataclasses_3Hit_dom_id, (char *)"dom_id: 'int'", 0},
  {(char *)"time", __pyx_getprop_7km3pipe_11dataclasses_3Hit_time, __pyx_setprop_7km3pipe_11dataclasses_3Hit_time, (char *)"time: 'int'", 0},
  {(char *)"tot", __pyx_getprop_7km3pipe_11dataclasses_3Hit_tot, __pyx_setprop_7km3pipe_11dataclasses_3Hit_tot, (char *)"tot: 'int'", 0},
  {(char *)"channel_id", __pyx_getprop_7km3pipe_11dataclasses_3Hit_channel_id, __pyx_setprop_7km3pipe_11dataclasses_3Hit_channel_id, (char *)"channel_id: 'int'", 0},
  {(char *)"pmt_id", __pyx_getprop_7km3pipe_11dataclasses_3Hit_pmt_id, __pyx_setprop_7km3pipe_11dataclasses_3Hit_pmt_id, (char *)"pmt_id: 'int'", 0},
  {(char *)"triggered", __pyx_getprop_7km3pipe_11dataclasses_3Hit_triggered, __pyx_setprop_7km3pipe_11dataclasses_3Hit_triggered, (char *)"triggered: 'unsigned short'", 0},
  {(char *)"pos_x", __pyx_getprop_7km3pipe_11dataclasses_3Hit_pos_x, __pyx_setprop_7km3pipe_11dataclasses_3Hit_pos_x, (char *)"pos_x: 'float'", 0},
  {(char *)"pos_y", __pyx_getprop_7km3pipe_11dataclasses_3Hit_pos_y, __pyx_setprop_7km3pipe_11dataclasses_3Hit_pos_y, (char *)"pos_y: 'float'", 0},
  {(char *)"pos_z", __pyx_getprop_7km3pipe_11dataclasses_3Hit_pos_z, __pyx_setprop_7km3pipe_11dataclasses_3Hit_pos_z, (char *)"pos_z: 'float'", 0},
  {(char *)"dir_x", __pyx_getprop_7km3pipe_11dataclasses_3Hit_dir_x, __pyx_setprop_7km3pipe_11dataclasses_3Hit_dir_x, (char *)"dir_x: 'float'", 0},
  {(char *)"dir_y", __pyx_getprop_7km3pipe_11dataclasses_3Hit_dir_y, __pyx_setprop_7km3pipe_11dataclasses_3Hit_dir_y, (char *)"dir_y: 'float'", 0},
  {(char *)"dir_z", __pyx_getprop_7km3pipe_11dataclasses_3Hit_dir_z, __pyx_setprop_7km3pipe_11dataclasses_3Hit_dir_z, (char *)"dir_z: 'float'", 0},
  {(char *)"t0", __pyx_getprop_7km3pipe_11dataclasses_3Hit_t0, __pyx_setprop_7km3pipe_11dataclasses_3Hit_t0, (char *)"t0: 'float'", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7km3pipe_11dataclasses_Hit = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.Hit", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses_Hit), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses_Hit, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_7km3pipe_11dataclasses_3Hit_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7km3pipe_11dataclasses_3Hit_3__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "Hit on a PMT.\n\n    Parameters\n    ----------\n    channel_id : int\n    dir_x : float\n    dir_y : float\n    dir_z : float\n    dom_id : int\n    id : int\n    pmt_id : int\n    pos_x : float\n    pos_y : float\n    pos_z : float\n    t0 : int\n    time : int\n    tot : int\n    triggered : int\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7km3pipe_11dataclasses_Hit, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7km3pipe_11dataclasses_Hit, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7km3pipe_11dataclasses_Hit, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_RawHit(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_7km3pipe_11dataclasses_6RawHit_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses_RawHit(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_6RawHit_dom_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_6RawHit_6dom_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_6RawHit_dom_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_6RawHit_6dom_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_6RawHit_tot(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_6RawHit_3tot_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_6RawHit_tot(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_6RawHit_3tot_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_6RawHit_channel_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_6RawHit_10channel_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_6RawHit_channel_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_6RawHit_10channel_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_6RawHit_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_6RawHit_4time_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_6RawHit_time(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_6RawHit_4time_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_6RawHit_triggered(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_6RawHit_9triggered_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_6RawHit_triggered(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_6RawHit_9triggered_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_7km3pipe_11dataclasses_RawHit[] = {
  {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_6RawHit_7__insp__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_6RawHit_6__insp__},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_6RawHit_9__reduce_cython__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_6RawHit_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_6RawHit_11__setstate_cython__, METH_O, __pyx_doc_7km3pipe_11dataclasses_6RawHit_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7km3pipe_11dataclasses_RawHit[] = {
  {(char *)"dom_id", __pyx_getprop_7km3pipe_11dataclasses_6RawHit_dom_id, __pyx_setprop_7km3pipe_11dataclasses_6RawHit_dom_id, (char *)"dom_id: 'int'", 0},
  {(char *)"tot", __pyx_getprop_7km3pipe_11dataclasses_6RawHit_tot, __pyx_setprop_7km3pipe_11dataclasses_6RawHit_tot, (char *)"tot: 'int'", 0},
  {(char *)"channel_id", __pyx_getprop_7km3pipe_11dataclasses_6RawHit_channel_id, __pyx_setprop_7km3pipe_11dataclasses_6RawHit_channel_id, (char *)"channel_id: 'int'", 0},
  {(char *)"time", __pyx_getprop_7km3pipe_11dataclasses_6RawHit_time, __pyx_setprop_7km3pipe_11dataclasses_6RawHit_time, (char *)"time: 'double'", 0},
  {(char *)"triggered", __pyx_getprop_7km3pipe_11dataclasses_6RawHit_triggered, __pyx_setprop_7km3pipe_11dataclasses_6RawHit_triggered, (char *)"triggered: 'unsigned short'", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7km3pipe_11dataclasses_RawHit = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.RawHit", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses_RawHit), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses_RawHit, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_7km3pipe_11dataclasses_6RawHit_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7km3pipe_11dataclasses_6RawHit_3__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "RawHit on a PMT.\n\n    Parameters\n    ----------\n    channel_id : int\n    dom_id : int\n    time : float64\n    tot : int\n    triggered : int\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7km3pipe_11dataclasses_RawHit, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7km3pipe_11dataclasses_RawHit, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7km3pipe_11dataclasses_RawHit, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_CRawHit(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_7km3pipe_11dataclasses_7CRawHit_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses_CRawHit(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7CRawHit_dom_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_6dom_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_dom_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_6dom_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7CRawHit_tot(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_3tot_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_tot(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_3tot_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7CRawHit_channel_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_10channel_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_channel_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_10channel_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7CRawHit_du(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_2du_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_du(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_2du_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7CRawHit_floor(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5floor_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_floor(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5floor_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7CRawHit_dir_x(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_x_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_dir_x(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_x_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7CRawHit_dir_y(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_y_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_dir_y(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_y_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7CRawHit_dir_z(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_z_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_dir_z(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5dir_z_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7CRawHit_pos_x(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_x_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_pos_x(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_x_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7CRawHit_pos_y(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_y_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_pos_y(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_y_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7CRawHit_pos_z(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_z_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_pos_z(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5pos_z_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7CRawHit_t0(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_2t0_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_t0(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_2t0_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7CRawHit_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_4time_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_time(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_4time_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7CRawHit_triggered(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_9triggered_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_triggered(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7CRawHit_9triggered_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_7km3pipe_11dataclasses_CRawHit[] = {
  {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_7CRawHit_7__insp__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_7CRawHit_6__insp__},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_7CRawHit_9__reduce_cython__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_7CRawHit_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_7CRawHit_11__setstate_cython__, METH_O, __pyx_doc_7km3pipe_11dataclasses_7CRawHit_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7km3pipe_11dataclasses_CRawHit[] = {
  {(char *)"dom_id", __pyx_getprop_7km3pipe_11dataclasses_7CRawHit_dom_id, __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_dom_id, (char *)"dom_id: 'int'", 0},
  {(char *)"tot", __pyx_getprop_7km3pipe_11dataclasses_7CRawHit_tot, __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_tot, (char *)"tot: 'int'", 0},
  {(char *)"channel_id", __pyx_getprop_7km3pipe_11dataclasses_7CRawHit_channel_id, __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_channel_id, (char *)"channel_id: 'int'", 0},
  {(char *)"du", __pyx_getprop_7km3pipe_11dataclasses_7CRawHit_du, __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_du, (char *)"du: 'int'", 0},
  {(char *)"floor", __pyx_getprop_7km3pipe_11dataclasses_7CRawHit_floor, __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_floor, (char *)"floor: 'int'", 0},
  {(char *)"dir_x", __pyx_getprop_7km3pipe_11dataclasses_7CRawHit_dir_x, __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_dir_x, (char *)"dir_x: 'float'", 0},
  {(char *)"dir_y", __pyx_getprop_7km3pipe_11dataclasses_7CRawHit_dir_y, __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_dir_y, (char *)"dir_y: 'float'", 0},
  {(char *)"dir_z", __pyx_getprop_7km3pipe_11dataclasses_7CRawHit_dir_z, __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_dir_z, (char *)"dir_z: 'float'", 0},
  {(char *)"pos_x", __pyx_getprop_7km3pipe_11dataclasses_7CRawHit_pos_x, __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_pos_x, (char *)"pos_x: 'float'", 0},
  {(char *)"pos_y", __pyx_getprop_7km3pipe_11dataclasses_7CRawHit_pos_y, __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_pos_y, (char *)"pos_y: 'float'", 0},
  {(char *)"pos_z", __pyx_getprop_7km3pipe_11dataclasses_7CRawHit_pos_z, __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_pos_z, (char *)"pos_z: 'float'", 0},
  {(char *)"t0", __pyx_getprop_7km3pipe_11dataclasses_7CRawHit_t0, __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_t0, (char *)"t0: 'float'", 0},
  {(char *)"time", __pyx_getprop_7km3pipe_11dataclasses_7CRawHit_time, __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_time, (char *)"time: 'double'", 0},
  {(char *)"triggered", __pyx_getprop_7km3pipe_11dataclasses_7CRawHit_triggered, __pyx_setprop_7km3pipe_11dataclasses_7CRawHit_triggered, (char *)"triggered: 'unsigned short'", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7km3pipe_11dataclasses_CRawHit = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.CRawHit", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses_CRawHit), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses_CRawHit, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_7km3pipe_11dataclasses_7CRawHit_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7km3pipe_11dataclasses_7CRawHit_3__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "RawHit on a PMT.\n\n    Parameters\n    ----------\n    channel_id : int\n    dir_x, dir_y, dir_z: float\n    dom_id : int\n    du: int\n    floor: int\n    pos_x, pos_y, pos_z: float\n    t0 : float\n    time : double\n    tot : int\n    triggered : int\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7km3pipe_11dataclasses_CRawHit, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7km3pipe_11dataclasses_CRawHit, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7km3pipe_11dataclasses_CRawHit, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_TimesliceHit(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)o);
  p->pos = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->dir = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses_TimesliceHit(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *p = (struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->pos);
  Py_CLEAR(p->dir);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses_TimesliceHit(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *p = (struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)o;
  if (p->pos) {
    e = (*v)(((PyObject *)p->pos), a); if (e) return e;
  }
  if (p->dir) {
    e = (*v)(((PyObject *)p->dir), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7km3pipe_11dataclasses_TimesliceHit(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *p = (struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit *)o;
  tmp = ((PyObject*)p->pos);
  p->pos = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dir);
  p->dir = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_dom_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_dom_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_6dom_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_4time_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_time(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_4time_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_tot(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3tot_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_tot(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3tot_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_channel_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_channel_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_10channel_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_pos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_pos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_3__set__(o, v);
  }
  else {
    return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3pos_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_dir(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_dir(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_3__set__(o, v);
  }
  else {
    return __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3dir_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_7km3pipe_11dataclasses_TimesliceHit[] = {
  {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_7__insp__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_12TimesliceHit_6__insp__},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_9__reduce_cython__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_12TimesliceHit_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_11__setstate_cython__, METH_O, __pyx_doc_7km3pipe_11dataclasses_12TimesliceHit_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7km3pipe_11dataclasses_TimesliceHit[] = {
  {(char *)"dom_id", __pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_dom_id, __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_dom_id, (char *)"dom_id: 'int'", 0},
  {(char *)"time", __pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_time, __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_time, (char *)"time: 'int'", 0},
  {(char *)"tot", __pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_tot, __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_tot, (char *)"tot: 'int'", 0},
  {(char *)"channel_id", __pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_channel_id, __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_channel_id, (char *)"channel_id: 'int'", 0},
  {(char *)"pos", __pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_pos, __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_pos, (char *)"pos: numpy.ndarray", 0},
  {(char *)"dir", __pyx_getprop_7km3pipe_11dataclasses_12TimesliceHit_dir, __pyx_setprop_7km3pipe_11dataclasses_12TimesliceHit_dir, (char *)"dir: numpy.ndarray", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7km3pipe_11dataclasses_TimesliceHit = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.TimesliceHit", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses_TimesliceHit), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses_TimesliceHit, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7km3pipe_11dataclasses_12TimesliceHit_3__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "Timeslice hit on a PMT.\n\n    Parameters\n    ----------\n    channel_id : int\n    dom_id : int\n    time : int\n    tot : int\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_7km3pipe_11dataclasses_TimesliceHit, /*tp_traverse*/
  __pyx_tp_clear_7km3pipe_11dataclasses_TimesliceHit, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7km3pipe_11dataclasses_TimesliceHit, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7km3pipe_11dataclasses_TimesliceHit, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7km3pipe_11dataclasses_TimesliceHit, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_McHit(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_7km3pipe_11dataclasses_5McHit_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses_McHit(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5McHit_a(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5McHit_1a_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5McHit_a(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5McHit_1a_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5McHit_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5McHit_4time_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5McHit_time(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5McHit_4time_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5McHit_origin(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5McHit_6origin_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5McHit_origin(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5McHit_6origin_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5McHit_pmt_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5McHit_6pmt_id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5McHit_pmt_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5McHit_6pmt_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_7km3pipe_11dataclasses_McHit[] = {
  {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5McHit_7__insp__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_5McHit_6__insp__},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5McHit_9__reduce_cython__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_5McHit_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5McHit_11__setstate_cython__, METH_O, __pyx_doc_7km3pipe_11dataclasses_5McHit_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7km3pipe_11dataclasses_McHit[] = {
  {(char *)"a", __pyx_getprop_7km3pipe_11dataclasses_5McHit_a, __pyx_setprop_7km3pipe_11dataclasses_5McHit_a, (char *)"a: 'float'", 0},
  {(char *)"time", __pyx_getprop_7km3pipe_11dataclasses_5McHit_time, __pyx_setprop_7km3pipe_11dataclasses_5McHit_time, (char *)"time: 'double'", 0},
  {(char *)"origin", __pyx_getprop_7km3pipe_11dataclasses_5McHit_origin, __pyx_setprop_7km3pipe_11dataclasses_5McHit_origin, (char *)"origin: 'int'", 0},
  {(char *)"pmt_id", __pyx_getprop_7km3pipe_11dataclasses_5McHit_pmt_id, __pyx_setprop_7km3pipe_11dataclasses_5McHit_pmt_id, (char *)"pmt_id: 'int'", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7km3pipe_11dataclasses_McHit = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.McHit", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses_McHit), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses_McHit, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_7km3pipe_11dataclasses_5McHit_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7km3pipe_11dataclasses_5McHit_3__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "Monte Carlo Hit on a PMT.\n\n    Parameters\n    ----------\n    a : float\n    origin : int\n    pmt_id : int\n    time : double\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7km3pipe_11dataclasses_McHit, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7km3pipe_11dataclasses_McHit, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7km3pipe_11dataclasses_McHit, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_Track(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7km3pipe_11dataclasses_Track *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7km3pipe_11dataclasses_Track *)o);
  p->pos = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->dir = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7km3pipe_11dataclasses_5Track_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses_Track(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses_Track *p = (struct __pyx_obj_7km3pipe_11dataclasses_Track *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->pos);
  Py_CLEAR(p->dir);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses_Track(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses_Track *p = (struct __pyx_obj_7km3pipe_11dataclasses_Track *)o;
  if (p->pos) {
    e = (*v)(((PyObject *)p->pos), a); if (e) return e;
  }
  if (p->dir) {
    e = (*v)(((PyObject *)p->dir), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7km3pipe_11dataclasses_Track(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7km3pipe_11dataclasses_Track *p = (struct __pyx_obj_7km3pipe_11dataclasses_Track *)o;
  tmp = ((PyObject*)p->pos);
  p->pos = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dir);
  p->dir = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_2id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_2id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_4time_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_time(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_4time_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_4type_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_4type_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_interaction_channel(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_19interaction_channel_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_interaction_channel(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_19interaction_channel_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_energy(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_6energy_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_energy(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_6energy_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_length(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_6length_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_length(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_6length_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_bjorkeny(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_8bjorkeny_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_bjorkeny(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_8bjorkeny_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_is_cc(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_5is_cc_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_is_cc(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_5is_cc_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_pos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_3pos_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_pos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_3pos_3__set__(o, v);
  }
  else {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_3pos_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_5Track_dir(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_5Track_3dir_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_5Track_dir(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_3dir_3__set__(o, v);
  }
  else {
    return __pyx_pw_7km3pipe_11dataclasses_5Track_3dir_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_7km3pipe_11dataclasses_Track[] = {
  {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Track_7__insp__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_5Track_6__insp__},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Track_9__reduce_cython__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_5Track_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_5Track_11__setstate_cython__, METH_O, __pyx_doc_7km3pipe_11dataclasses_5Track_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7km3pipe_11dataclasses_Track[] = {
  {(char *)"id", __pyx_getprop_7km3pipe_11dataclasses_5Track_id, __pyx_setprop_7km3pipe_11dataclasses_5Track_id, (char *)"id: 'int'", 0},
  {(char *)"time", __pyx_getprop_7km3pipe_11dataclasses_5Track_time, __pyx_setprop_7km3pipe_11dataclasses_5Track_time, (char *)"time: 'int'", 0},
  {(char *)"type", __pyx_getprop_7km3pipe_11dataclasses_5Track_type, __pyx_setprop_7km3pipe_11dataclasses_5Track_type, (char *)"type: 'int'", 0},
  {(char *)"interaction_channel", __pyx_getprop_7km3pipe_11dataclasses_5Track_interaction_channel, __pyx_setprop_7km3pipe_11dataclasses_5Track_interaction_channel, (char *)"interaction_channel: 'int'", 0},
  {(char *)"energy", __pyx_getprop_7km3pipe_11dataclasses_5Track_energy, __pyx_setprop_7km3pipe_11dataclasses_5Track_energy, (char *)"energy: 'float'", 0},
  {(char *)"length", __pyx_getprop_7km3pipe_11dataclasses_5Track_length, __pyx_setprop_7km3pipe_11dataclasses_5Track_length, (char *)"length: 'float'", 0},
  {(char *)"bjorkeny", __pyx_getprop_7km3pipe_11dataclasses_5Track_bjorkeny, __pyx_setprop_7km3pipe_11dataclasses_5Track_bjorkeny, (char *)"bjorkeny: 'float'", 0},
  {(char *)"is_cc", __pyx_getprop_7km3pipe_11dataclasses_5Track_is_cc, __pyx_setprop_7km3pipe_11dataclasses_5Track_is_cc, (char *)"is_cc: 'unsigned short'", 0},
  {(char *)"pos", __pyx_getprop_7km3pipe_11dataclasses_5Track_pos, __pyx_setprop_7km3pipe_11dataclasses_5Track_pos, (char *)"pos: numpy.ndarray", 0},
  {(char *)"dir", __pyx_getprop_7km3pipe_11dataclasses_5Track_dir, __pyx_setprop_7km3pipe_11dataclasses_5Track_dir, (char *)"dir: numpy.ndarray", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7km3pipe_11dataclasses_Track = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.Track", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses_Track), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses_Track, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_7km3pipe_11dataclasses_5Track_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7km3pipe_11dataclasses_5Track_3__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "Particle track.\n\n    Parameters\n    ----------\n    bjorkeny : float\n    dir : Direction or numpy.ndarray\n    energy : float\n    id : int\n    interaction_channel : int\n    is_cc : int\n    length : float\n    pos : Position or numpy.ndarray\n    time : int\n    type : int\n    ", /*tp_doc*/
  __pyx_tp_traverse_7km3pipe_11dataclasses_Track, /*tp_traverse*/
  __pyx_tp_clear_7km3pipe_11dataclasses_Track, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7km3pipe_11dataclasses_Track, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7km3pipe_11dataclasses_Track, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7km3pipe_11dataclasses_Track, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses_McTrack(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7km3pipe_11dataclasses_McTrack *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)o);
  p->pos = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->dir = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7km3pipe_11dataclasses_7McTrack_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses_McTrack(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses_McTrack *p = (struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->pos);
  Py_CLEAR(p->dir);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses_McTrack(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses_McTrack *p = (struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)o;
  if (p->pos) {
    e = (*v)(((PyObject *)p->pos), a); if (e) return e;
  }
  if (p->dir) {
    e = (*v)(((PyObject *)p->dir), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7km3pipe_11dataclasses_McTrack(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7km3pipe_11dataclasses_McTrack *p = (struct __pyx_obj_7km3pipe_11dataclasses_McTrack *)o;
  tmp = ((PyObject*)p->pos);
  p->pos = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dir);
  p->dir = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7McTrack_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7McTrack_2id_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7McTrack_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7McTrack_2id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7McTrack_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7McTrack_4time_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7McTrack_time(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7McTrack_4time_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7McTrack_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7McTrack_4type_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7McTrack_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7McTrack_4type_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7McTrack_interaction_channel(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7McTrack_19interaction_channel_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7McTrack_interaction_channel(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7McTrack_19interaction_channel_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7McTrack_energy(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7McTrack_6energy_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7McTrack_energy(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7McTrack_6energy_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7McTrack_length(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7McTrack_6length_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7McTrack_length(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7McTrack_6length_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7McTrack_bjorkeny(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7McTrack_8bjorkeny_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7McTrack_bjorkeny(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7McTrack_8bjorkeny_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7McTrack_is_cc(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7McTrack_5is_cc_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7McTrack_is_cc(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7McTrack_5is_cc_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7McTrack_pos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7McTrack_3pos_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7McTrack_pos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7McTrack_3pos_3__set__(o, v);
  }
  else {
    return __pyx_pw_7km3pipe_11dataclasses_7McTrack_3pos_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7km3pipe_11dataclasses_7McTrack_dir(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7km3pipe_11dataclasses_7McTrack_3dir_1__get__(o);
}

static int __pyx_setprop_7km3pipe_11dataclasses_7McTrack_dir(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7km3pipe_11dataclasses_7McTrack_3dir_3__set__(o, v);
  }
  else {
    return __pyx_pw_7km3pipe_11dataclasses_7McTrack_3dir_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_7km3pipe_11dataclasses_McTrack[] = {
  {"__insp__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_7McTrack_7__insp__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_7McTrack_6__insp__},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_7McTrack_9__reduce_cython__, METH_NOARGS, __pyx_doc_7km3pipe_11dataclasses_7McTrack_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7km3pipe_11dataclasses_7McTrack_11__setstate_cython__, METH_O, __pyx_doc_7km3pipe_11dataclasses_7McTrack_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7km3pipe_11dataclasses_McTrack[] = {
  {(char *)"id", __pyx_getprop_7km3pipe_11dataclasses_7McTrack_id, __pyx_setprop_7km3pipe_11dataclasses_7McTrack_id, (char *)"id: 'int'", 0},
  {(char *)"time", __pyx_getprop_7km3pipe_11dataclasses_7McTrack_time, __pyx_setprop_7km3pipe_11dataclasses_7McTrack_time, (char *)"time: 'int'", 0},
  {(char *)"type", __pyx_getprop_7km3pipe_11dataclasses_7McTrack_type, __pyx_setprop_7km3pipe_11dataclasses_7McTrack_type, (char *)"type: 'int'", 0},
  {(char *)"interaction_channel", __pyx_getprop_7km3pipe_11dataclasses_7McTrack_interaction_channel, __pyx_setprop_7km3pipe_11dataclasses_7McTrack_interaction_channel, (char *)"interaction_channel: 'int'", 0},
  {(char *)"energy", __pyx_getprop_7km3pipe_11dataclasses_7McTrack_energy, __pyx_setprop_7km3pipe_11dataclasses_7McTrack_energy, (char *)"energy: 'float'", 0},
  {(char *)"length", __pyx_getprop_7km3pipe_11dataclasses_7McTrack_length, __pyx_setprop_7km3pipe_11dataclasses_7McTrack_length, (char *)"length: 'float'", 0},
  {(char *)"bjorkeny", __pyx_getprop_7km3pipe_11dataclasses_7McTrack_bjorkeny, __pyx_setprop_7km3pipe_11dataclasses_7McTrack_bjorkeny, (char *)"bjorkeny: 'float'", 0},
  {(char *)"is_cc", __pyx_getprop_7km3pipe_11dataclasses_7McTrack_is_cc, __pyx_setprop_7km3pipe_11dataclasses_7McTrack_is_cc, (char *)"is_cc: 'unsigned short'", 0},
  {(char *)"pos", __pyx_getprop_7km3pipe_11dataclasses_7McTrack_pos, __pyx_setprop_7km3pipe_11dataclasses_7McTrack_pos, (char *)"pos: numpy.ndarray", 0},
  {(char *)"dir", __pyx_getprop_7km3pipe_11dataclasses_7McTrack_dir, __pyx_setprop_7km3pipe_11dataclasses_7McTrack_dir, (char *)"dir: numpy.ndarray", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7km3pipe_11dataclasses_McTrack = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.McTrack", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses_McTrack), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses_McTrack, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_7km3pipe_11dataclasses_7McTrack_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7km3pipe_11dataclasses_7McTrack_3__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "Monte Carlo Particle track.\n\n    Parameters\n    ----------\n    bjorkeny : float\n    dir : Direction or numpy.ndarray\n    energy : float\n    id : int\n    interaction_channel : int\n    is_cc : int\n    length : float\n    pos : Position or numpy.ndarray\n    time : int\n    type : int\n    ", /*tp_doc*/
  __pyx_tp_traverse_7km3pipe_11dataclasses_McTrack, /*tp_traverse*/
  __pyx_tp_clear_7km3pipe_11dataclasses_McTrack, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7km3pipe_11dataclasses_McTrack, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7km3pipe_11dataclasses_McTrack, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7km3pipe_11dataclasses_McTrack, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct__from_row[8];
static int __pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct__from_row = 0;

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct__from_row(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct__from_row > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row)))) {
    o = (PyObject*)__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct__from_row[--__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct__from_row];
    memset(o, 0, sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct__from_row(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_cls);
  Py_CLEAR(p->__pyx_v_row);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct__from_row < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row)))) {
    __pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct__from_row[__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct__from_row++] = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct__from_row(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *)o;
  if (p->__pyx_v_cls) {
    e = (*v)(p->__pyx_v_cls, a); if (e) return e;
  }
  if (p->__pyx_v_row) {
    e = (*v)(p->__pyx_v_row, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7km3pipe_11dataclasses___pyx_scope_struct__from_row(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row *)o;
  tmp = ((PyObject*)p->__pyx_v_cls);
  p->__pyx_v_cls = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_row);
  p->__pyx_v_row = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct__from_row = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.__pyx_scope_struct__from_row", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct__from_row), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct__from_row, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct__from_row, /*tp_traverse*/
  __pyx_tp_clear_7km3pipe_11dataclasses___pyx_scope_struct__from_row, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct__from_row, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr[8];
static int __pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr = 0;

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr)))) {
    o = (PyObject*)__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr[--__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_col);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr)))) {
    __pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr[__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_col) {
    e = (*v)(p->__pyx_v_col, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.__pyx_scope_struct_1_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator[8];
static int __pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator = 0;

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator)))) {
    o = (PyObject*)__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator[--__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator];
    memset(o, 0, sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_index);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_start);
  Py_CLEAR(p->__pyx_v_step);
  Py_CLEAR(p->__pyx_v_stop);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator)))) {
    __pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator[__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator++] = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator *)o;
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, a); if (e) return e;
  }
  if (p->__pyx_v_index) {
    e = (*v)(p->__pyx_v_index, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  if (p->__pyx_v_start) {
    e = (*v)(p->__pyx_v_start, a); if (e) return e;
  }
  if (p->__pyx_v_step) {
    e = (*v)(p->__pyx_v_step, a); if (e) return e;
  }
  if (p->__pyx_v_stop) {
    e = (*v)(p->__pyx_v_stop, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.__pyx_scope_struct_2__slice_generator", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator[8];
static int __pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator = 0;

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator)))) {
    o = (PyObject*)__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator[--__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator];
    memset(o, 0, sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_index);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_start);
  Py_CLEAR(p->__pyx_v_step);
  Py_CLEAR(p->__pyx_v_stop);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator)))) {
    __pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator[__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator++] = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator *)o;
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, a); if (e) return e;
  }
  if (p->__pyx_v_index) {
    e = (*v)(p->__pyx_v_index, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  if (p->__pyx_v_start) {
    e = (*v)(p->__pyx_v_start, a); if (e) return e;
  }
  if (p->__pyx_v_step) {
    e = (*v)(p->__pyx_v_step, a); if (e) return e;
  }
  if (p->__pyx_v_stop) {
    e = (*v)(p->__pyx_v_stop, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.__pyx_scope_struct_3__slice_generator", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator[8];
static int __pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator = 0;

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator)))) {
    o = (PyObject*)__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator[--__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator];
    memset(o, 0, sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_index);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_start);
  Py_CLEAR(p->__pyx_v_step);
  Py_CLEAR(p->__pyx_v_stop);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator)))) {
    __pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator[__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator++] = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator *)o;
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, a); if (e) return e;
  }
  if (p->__pyx_v_index) {
    e = (*v)(p->__pyx_v_index, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  if (p->__pyx_v_start) {
    e = (*v)(p->__pyx_v_start, a); if (e) return e;
  }
  if (p->__pyx_v_step) {
    e = (*v)(p->__pyx_v_step, a); if (e) return e;
  }
  if (p->__pyx_v_stop) {
    e = (*v)(p->__pyx_v_stop, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.__pyx_scope_struct_4__slice_generator", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict *__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict[8];
static int __pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict = 0;

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict)))) {
    o = (PyObject*)__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict[--__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict];
    memset(o, 0, sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dtype);
  Py_CLEAR(p->__pyx_v_map);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict)))) {
    __pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict[__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict++] = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict *)o;
  if (p->__pyx_v_dtype) {
    e = (*v)(p->__pyx_v_dtype, a); if (e) return e;
  }
  if (p->__pyx_v_map) {
    e = (*v)(p->__pyx_v_map, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict *)o;
  tmp = ((PyObject*)p->__pyx_v_dtype);
  p->__pyx_v_dtype = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_map);
  p->__pyx_v_map = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.__pyx_scope_struct_5_from_dict", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict, /*tp_traverse*/
  __pyx_tp_clear_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr *__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr[8];
static int __pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr = 0;

static PyObject *__pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr)))) {
    o = (PyObject*)__pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr[--__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr(PyObject *o) {
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_key);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr)))) {
    __pyx_freelist_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr[__pyx_freecount_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_key) {
    e = (*v)(p->__pyx_v_key, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "km3pipe.dataclasses.__pyx_scope_struct_6_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_dataclasses(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_dataclasses},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "dataclasses",
    __pyx_k__300, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_A_binary_struct_superclass_which, __pyx_k_A_binary_struct_superclass_which, sizeof(__pyx_k_A_binary_struct_superclass_which), 0, 0, 1, 0},
  {&__pyx_kp_s_A_collection_of_calibrated_hits, __pyx_k_A_collection_of_calibrated_hits, sizeof(__pyx_k_A_collection_of_calibrated_hits), 0, 0, 1, 0},
  {&__pyx_kp_s_A_collection_of_hits_without_any, __pyx_k_A_collection_of_hits_without_any, sizeof(__pyx_k_A_collection_of_hits_without_any), 0, 0, 1, 0},
  {&__pyx_kp_s_A_composition_of_BinaryStructs, __pyx_k_A_composition_of_BinaryStructs, sizeof(__pyx_k_A_composition_of_BinaryStructs), 0, 0, 1, 0},
  {&__pyx_kp_s_A_metaclass_for_serialisable_cla, __pyx_k_A_metaclass_for_serialisable_cla, sizeof(__pyx_k_A_metaclass_for_serialisable_cla), 0, 0, 1, 0},
  {&__pyx_kp_s_Allow_np_void_instances_to_acces, __pyx_k_Allow_np_void_instances_to_acces, sizeof(__pyx_k_Allow_np_void_instances_to_acces), 0, 0, 1, 0},
  {&__pyx_n_s_AttrVoid, __pyx_k_AttrVoid, sizeof(__pyx_k_AttrVoid), 0, 0, 1, 1},
  {&__pyx_n_s_AttrVoid___new, __pyx_k_AttrVoid___new, sizeof(__pyx_k_AttrVoid___new), 0, 0, 1, 1},
  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  {&__pyx_n_s_BinaryComposite, __pyx_k_BinaryComposite, sizeof(__pyx_k_BinaryComposite), 0, 0, 1, 1},
  {&__pyx_n_s_BinaryComposite___init, __pyx_k_BinaryComposite___init, sizeof(__pyx_k_BinaryComposite___init), 0, 0, 1, 1},
  {&__pyx_n_s_BinaryStruct, __pyx_k_BinaryStruct, sizeof(__pyx_k_BinaryStruct), 0, 0, 1, 1},
  {&__pyx_n_s_BinaryStruct___init, __pyx_k_BinaryStruct___init, sizeof(__pyx_k_BinaryStruct___init), 0, 0, 1, 1},
  {&__pyx_n_s_BinaryStruct__size, __pyx_k_BinaryStruct__size, sizeof(__pyx_k_BinaryStruct__size), 0, 0, 1, 1},
  {&__pyx_n_s_CMcHitSeries, __pyx_k_CMcHitSeries, sizeof(__pyx_k_CMcHitSeries), 0, 0, 1, 1},
  {&__pyx_n_s_CMcHitSeries___array, __pyx_k_CMcHitSeries___array, sizeof(__pyx_k_CMcHitSeries___array), 0, 0, 1, 1},
  {&__pyx_n_s_CMcHitSeries___init, __pyx_k_CMcHitSeries___init, sizeof(__pyx_k_CMcHitSeries___init), 0, 0, 1, 1},
  {&__pyx_n_s_CMcHitSeries___len, __pyx_k_CMcHitSeries___len, sizeof(__pyx_k_CMcHitSeries___len), 0, 0, 1, 1},
  {&__pyx_n_s_CMcHitSeries___repr, __pyx_k_CMcHitSeries___repr, sizeof(__pyx_k_CMcHitSeries___repr), 0, 0, 1, 1},
  {&__pyx_n_s_CMcHitSeries___str, __pyx_k_CMcHitSeries___str, sizeof(__pyx_k_CMcHitSeries___str), 0, 0, 1, 1},
  {&__pyx_n_s_CMcHitSeries_conv_from, __pyx_k_CMcHitSeries_conv_from, sizeof(__pyx_k_CMcHitSeries_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_CMcHitSeries_conv_to, __pyx_k_CMcHitSeries_conv_to, sizeof(__pyx_k_CMcHitSeries_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_CMcHitSeries_deserialise, __pyx_k_CMcHitSeries_deserialise, sizeof(__pyx_k_CMcHitSeries_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_CMcHitSeries_from_arrays, __pyx_k_CMcHitSeries_from_arrays, sizeof(__pyx_k_CMcHitSeries_from_arrays), 0, 0, 1, 1},
  {&__pyx_n_s_CMcHitSeries_serialise, __pyx_k_CMcHitSeries_serialise, sizeof(__pyx_k_CMcHitSeries_serialise), 0, 0, 1, 1},
  {&__pyx_kp_s_CMcHitSeries_with_0_hit_1, __pyx_k_CMcHitSeries_with_0_hit_1, sizeof(__pyx_k_CMcHitSeries_with_0_hit_1), 0, 0, 1, 0},
  {&__pyx_n_s_CRawHitSeries, __pyx_k_CRawHitSeries, sizeof(__pyx_k_CRawHitSeries), 0, 0, 1, 1},
  {&__pyx_n_s_CRawHitSeries___array, __pyx_k_CRawHitSeries___array, sizeof(__pyx_k_CRawHitSeries___array), 0, 0, 1, 1},
  {&__pyx_n_s_CRawHitSeries___getitem, __pyx_k_CRawHitSeries___getitem, sizeof(__pyx_k_CRawHitSeries___getitem), 0, 0, 1, 1},
  {&__pyx_n_s_CRawHitSeries___init, __pyx_k_CRawHitSeries___init, sizeof(__pyx_k_CRawHitSeries___init), 0, 0, 1, 1},
  {&__pyx_n_s_CRawHitSeries___iter, __pyx_k_CRawHitSeries___iter, sizeof(__pyx_k_CRawHitSeries___iter), 0, 0, 1, 1},
  {&__pyx_n_s_CRawHitSeries___len, __pyx_k_CRawHitSeries___len, sizeof(__pyx_k_CRawHitSeries___len), 0, 0, 1, 1},
  {&__pyx_n_s_CRawHitSeries___next, __pyx_k_CRawHitSeries___next, sizeof(__pyx_k_CRawHitSeries___next), 0, 0, 1, 1},
  {&__pyx_n_s_CRawHitSeries___repr, __pyx_k_CRawHitSeries___repr, sizeof(__pyx_k_CRawHitSeries___repr), 0, 0, 1, 1},
  {&__pyx_n_s_CRawHitSeries___str, __pyx_k_CRawHitSeries___str, sizeof(__pyx_k_CRawHitSeries___str), 0, 0, 1, 1},
  {&__pyx_n_s_CRawHitSeries_conv_from, __pyx_k_CRawHitSeries_conv_from, sizeof(__pyx_k_CRawHitSeries_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_CRawHitSeries_conv_to, __pyx_k_CRawHitSeries_conv_to, sizeof(__pyx_k_CRawHitSeries_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_CRawHitSeries_deserialise, __pyx_k_CRawHitSeries_deserialise, sizeof(__pyx_k_CRawHitSeries_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_CRawHitSeries_from_arrays, __pyx_k_CRawHitSeries_from_arrays, sizeof(__pyx_k_CRawHitSeries_from_arrays), 0, 0, 1, 1},
  {&__pyx_n_s_CRawHitSeries_next, __pyx_k_CRawHitSeries_next, sizeof(__pyx_k_CRawHitSeries_next), 0, 0, 1, 1},
  {&__pyx_n_s_CRawHitSeries_serialise, __pyx_k_CRawHitSeries_serialise, sizeof(__pyx_k_CRawHitSeries_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_CRawHitSeries_triggered_hits, __pyx_k_CRawHitSeries_triggered_hits, sizeof(__pyx_k_CRawHitSeries_triggered_hits), 0, 0, 1, 1},
  {&__pyx_kp_s_CRawHitSeries_with_0_hit_1, __pyx_k_CRawHitSeries_with_0_hit_1, sizeof(__pyx_k_CRawHitSeries_with_0_hit_1), 0, 0, 1, 0},
  {&__pyx_kp_s_CRawHit_channel_id_0_dom_id_1_to, __pyx_k_CRawHit_channel_id_0_dom_id_1_to, sizeof(__pyx_k_CRawHit_channel_id_0_dom_id_1_to), 0, 0, 1, 0},
  {&__pyx_kp_s_Collection_of_calibrated_MC_Hits, __pyx_k_Collection_of_calibrated_MC_Hits, sizeof(__pyx_k_Collection_of_calibrated_MC_Hits), 0, 0, 1, 0},
  {&__pyx_kp_s_Collection_of_multiple_Hits, __pyx_k_Collection_of_multiple_Hits, sizeof(__pyx_k_Collection_of_multiple_Hits), 0, 0, 1, 0},
  {&__pyx_kp_s_Collection_of_multiple_McTracks, __pyx_k_Collection_of_multiple_McTracks, sizeof(__pyx_k_Collection_of_multiple_McTracks), 0, 0, 1, 0},
  {&__pyx_kp_s_Collection_of_multiple_Tracks_At, __pyx_k_Collection_of_multiple_Tracks_At, sizeof(__pyx_k_Collection_of_multiple_Tracks_At), 0, 0, 1, 0},
  {&__pyx_kp_s_Collection_of_multiple_timeslice, __pyx_k_Collection_of_multiple_timeslice, sizeof(__pyx_k_Collection_of_multiple_timeslice), 0, 0, 1, 0},
  {&__pyx_kp_s_Collection_of_summary_frames, __pyx_k_Collection_of_summary_frames, sizeof(__pyx_k_Collection_of_summary_frames), 0, 0, 1, 0},
  {&__pyx_n_s_Convertible, __pyx_k_Convertible, sizeof(__pyx_k_Convertible), 0, 0, 1, 1},
  {&__pyx_n_s_Convertible_conv_from, __pyx_k_Convertible_conv_from, sizeof(__pyx_k_Convertible_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_Convertible_conv_to, __pyx_k_Convertible_conv_to, sizeof(__pyx_k_Convertible_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_Convertible_deserialise, __pyx_k_Convertible_deserialise, sizeof(__pyx_k_Convertible_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_Convertible_serialise, __pyx_k_Convertible_serialise, sizeof(__pyx_k_Convertible_serialise), 0, 0, 1, 1},
  {&__pyx_kp_s_Copyright_2016_Tamas_Gal_and_the, __pyx_k_Copyright_2016_Tamas_Gal_and_the, sizeof(__pyx_k_Copyright_2016_Tamas_Gal_and_the), 0, 0, 1, 0},
  {&__pyx_n_s_DTypeAttr, __pyx_k_DTypeAttr, sizeof(__pyx_k_DTypeAttr), 0, 0, 1, 1},
  {&__pyx_n_s_DTypeAttr___array, __pyx_k_DTypeAttr___array, sizeof(__pyx_k_DTypeAttr___array), 0, 0, 1, 1},
  {&__pyx_n_s_DTypeAttr___getattr, __pyx_k_DTypeAttr___getattr, sizeof(__pyx_k_DTypeAttr___getattr), 0, 0, 1, 1},
  {&__pyx_n_s_DTypeAttr___getitem, __pyx_k_DTypeAttr___getitem, sizeof(__pyx_k_DTypeAttr___getitem), 0, 0, 1, 1},
  {&__pyx_n_s_DTypeAttr_append_fields, __pyx_k_DTypeAttr_append_fields, sizeof(__pyx_k_DTypeAttr_append_fields), 0, 0, 1, 1},
  {&__pyx_n_s_DTypeAttr_sorted, __pyx_k_DTypeAttr_sorted, sizeof(__pyx_k_DTypeAttr_sorted), 0, 0, 1, 1},
  {&__pyx_n_s_DataFrame, __pyx_k_DataFrame, sizeof(__pyx_k_DataFrame), 0, 0, 1, 1},
  {&__pyx_n_s_Development, __pyx_k_Development, sizeof(__pyx_k_Development), 0, 0, 1, 1},
  {&__pyx_n_s_Direction, __pyx_k_Direction, sizeof(__pyx_k_Direction), 0, 0, 1, 1},
  {&__pyx_n_s_E, __pyx_k_E, sizeof(__pyx_k_E), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo, __pyx_k_EventInfo, sizeof(__pyx_k_EventInfo), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo___array, __pyx_k_EventInfo___array, sizeof(__pyx_k_EventInfo___array), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo___init, __pyx_k_EventInfo___init, sizeof(__pyx_k_EventInfo___init), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo___insp, __pyx_k_EventInfo___insp, sizeof(__pyx_k_EventInfo___insp), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo___len, __pyx_k_EventInfo___len, sizeof(__pyx_k_EventInfo___len), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo___repr, __pyx_k_EventInfo___repr, sizeof(__pyx_k_EventInfo___repr), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo___str, __pyx_k_EventInfo___str, sizeof(__pyx_k_EventInfo___str), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo_conv_from, __pyx_k_EventInfo_conv_from, sizeof(__pyx_k_EventInfo_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo_conv_to, __pyx_k_EventInfo_conv_to, sizeof(__pyx_k_EventInfo_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo_deserialise, __pyx_k_EventInfo_deserialise, sizeof(__pyx_k_EventInfo_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo_from_row, __pyx_k_EventInfo_from_row, sizeof(__pyx_k_EventInfo_from_row), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo_from_row_locals_genexp, __pyx_k_EventInfo_from_row_locals_genexp, sizeof(__pyx_k_EventInfo_from_row_locals_genexp), 0, 0, 1, 1},
  {&__pyx_n_s_EventInfo_serialise, __pyx_k_EventInfo_serialise, sizeof(__pyx_k_EventInfo_serialise), 0, 0, 1, 1},
  {&__pyx_kp_s_Event_0_run_id_10_detector_id_1, __pyx_k_Event_0_run_id_10_detector_id_1, sizeof(__pyx_k_Event_0_run_id_10_detector_id_1), 0, 0, 1, 0},
  {&__pyx_kp_s_Event_Metadata, __pyx_k_Event_Metadata, sizeof(__pyx_k_Event_Metadata), 0, 0, 1, 0},
  {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0},
  {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0},
  {&__pyx_kp_s_Helper_class_to_make_dtype_names, __pyx_k_Helper_class_to_make_dtype_names, sizeof(__pyx_k_Helper_class_to_make_dtype_names), 0, 0, 1, 0},
  {&__pyx_n_s_Hit, __pyx_k_Hit, sizeof(__pyx_k_Hit), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries, __pyx_k_HitSeries, sizeof(__pyx_k_HitSeries), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___array, __pyx_k_HitSeries___array, sizeof(__pyx_k_HitSeries___array), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___getitem, __pyx_k_HitSeries___getitem, sizeof(__pyx_k_HitSeries___getitem), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___init, __pyx_k_HitSeries___init, sizeof(__pyx_k_HitSeries___init), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___insp, __pyx_k_HitSeries___insp, sizeof(__pyx_k_HitSeries___insp), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___iter, __pyx_k_HitSeries___iter, sizeof(__pyx_k_HitSeries___iter), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___len, __pyx_k_HitSeries___len, sizeof(__pyx_k_HitSeries___len), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___next, __pyx_k_HitSeries___next, sizeof(__pyx_k_HitSeries___next), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___repr, __pyx_k_HitSeries___repr, sizeof(__pyx_k_HitSeries___repr), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries___str, __pyx_k_HitSeries___str, sizeof(__pyx_k_HitSeries___str), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_conv_from, __pyx_k_HitSeries_conv_from, sizeof(__pyx_k_HitSeries_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_conv_to, __pyx_k_HitSeries_conv_to, sizeof(__pyx_k_HitSeries_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_deserialise, __pyx_k_HitSeries_deserialise, sizeof(__pyx_k_HitSeries_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_first_hits, __pyx_k_HitSeries_first_hits, sizeof(__pyx_k_HitSeries_first_hits), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_from_aanet, __pyx_k_HitSeries_from_aanet, sizeof(__pyx_k_HitSeries_from_aanet), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_from_arrays, __pyx_k_HitSeries_from_arrays, sizeof(__pyx_k_HitSeries_from_arrays), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_from_dict, __pyx_k_HitSeries_from_dict, sizeof(__pyx_k_HitSeries_from_dict), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_from_evt, __pyx_k_HitSeries_from_evt, sizeof(__pyx_k_HitSeries_from_evt), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_from_table, __pyx_k_HitSeries_from_table, sizeof(__pyx_k_HitSeries_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_next, __pyx_k_HitSeries_next, sizeof(__pyx_k_HitSeries_next), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_serialise, __pyx_k_HitSeries_serialise, sizeof(__pyx_k_HitSeries_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_HitSeries_triggered_hits, __pyx_k_HitSeries_triggered_hits, sizeof(__pyx_k_HitSeries_triggered_hits), 0, 0, 1, 1},
  {&__pyx_kp_s_HitSeries_with_0_hit_1, __pyx_k_HitSeries_with_0_hit_1, sizeof(__pyx_k_HitSeries_with_0_hit_1), 0, 0, 1, 0},
  {&__pyx_kp_s_Hit_channel_id_0_dom_id_1_pmt_id, __pyx_k_Hit_channel_id_0_dom_id_1_pmt_id, sizeof(__pyx_k_Hit_channel_id_0_dom_id_1_pmt_id), 0, 0, 1, 0},
  {&__pyx_n_s_Hits, __pyx_k_Hits, sizeof(__pyx_k_Hits), 0, 0, 1, 1},
  {&__pyx_n_s_IS_CC, __pyx_k_IS_CC, sizeof(__pyx_k_IS_CC), 0, 0, 1, 1},
  {&__pyx_kp_s_Implements_basic_conversion_meth, __pyx_k_Implements_basic_conversion_meth, sizeof(__pyx_k_Implements_basic_conversion_meth), 0, 0, 1, 0},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
  {&__pyx_kp_s_JDAQSummaryslice_Metadata, __pyx_k_JDAQSummaryslice_Metadata, sizeof(__pyx_k_JDAQSummaryslice_Metadata), 0, 0, 1, 0},
  {&__pyx_kp_s_JDAQSummaryslice_frame_metadata, __pyx_k_JDAQSummaryslice_frame_metadata, sizeof(__pyx_k_JDAQSummaryslice_frame_metadata), 0, 0, 1, 0},
  {&__pyx_kp_s_JDAQTimeslice_frame_metadata, __pyx_k_JDAQTimeslice_frame_metadata, sizeof(__pyx_k_JDAQTimeslice_frame_metadata), 0, 0, 1, 0},
  {&__pyx_n_s_KM3Array, __pyx_k_KM3Array, sizeof(__pyx_k_KM3Array), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array___array_finalize, __pyx_k_KM3Array___array_finalize, sizeof(__pyx_k_KM3Array___array_finalize), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array___init, __pyx_k_KM3Array___init, sizeof(__pyx_k_KM3Array___init), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array___new, __pyx_k_KM3Array___new, sizeof(__pyx_k_KM3Array___new), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array_conv_from, __pyx_k_KM3Array_conv_from, sizeof(__pyx_k_KM3Array_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array_conv_to, __pyx_k_KM3Array_conv_to, sizeof(__pyx_k_KM3Array_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array_deserialise, __pyx_k_KM3Array_deserialise, sizeof(__pyx_k_KM3Array_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array_from_dict, __pyx_k_KM3Array_from_dict, sizeof(__pyx_k_KM3Array_from_dict), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array_from_dict_locals_genexp, __pyx_k_KM3Array_from_dict_locals_genexp, sizeof(__pyx_k_KM3Array_from_dict_locals_genexp), 0, 0, 1, 1},
  {&__pyx_n_s_KM3Array_serialise, __pyx_k_KM3Array_serialise, sizeof(__pyx_k_KM3Array_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_KM3DataFrame, __pyx_k_KM3DataFrame, sizeof(__pyx_k_KM3DataFrame), 0, 0, 1, 1},
  {&__pyx_n_s_KM3DataFrame___init, __pyx_k_KM3DataFrame___init, sizeof(__pyx_k_KM3DataFrame___init), 0, 0, 1, 1},
  {&__pyx_n_s_KM3DataFrame__constructor, __pyx_k_KM3DataFrame__constructor, sizeof(__pyx_k_KM3DataFrame__constructor), 0, 0, 1, 1},
  {&__pyx_n_s_KM3DataFrame_conv_from, __pyx_k_KM3DataFrame_conv_from, sizeof(__pyx_k_KM3DataFrame_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_KM3DataFrame_conv_to, __pyx_k_KM3DataFrame_conv_to, sizeof(__pyx_k_KM3DataFrame_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_KM3DataFrame_deserialise, __pyx_k_KM3DataFrame_deserialise, sizeof(__pyx_k_KM3DataFrame_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_KM3DataFrame_serialise, __pyx_k_KM3DataFrame_serialise, sizeof(__pyx_k_KM3DataFrame_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_n_s_MIT, __pyx_k_MIT, sizeof(__pyx_k_MIT), 0, 0, 1, 1},
  {&__pyx_n_s_McHit, __pyx_k_McHit, sizeof(__pyx_k_McHit), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries, __pyx_k_McHitSeries, sizeof(__pyx_k_McHitSeries), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries___array, __pyx_k_McHitSeries___array, sizeof(__pyx_k_McHitSeries___array), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries___getitem, __pyx_k_McHitSeries___getitem, sizeof(__pyx_k_McHitSeries___getitem), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries___init, __pyx_k_McHitSeries___init, sizeof(__pyx_k_McHitSeries___init), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries___insp, __pyx_k_McHitSeries___insp, sizeof(__pyx_k_McHitSeries___insp), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries___iter, __pyx_k_McHitSeries___iter, sizeof(__pyx_k_McHitSeries___iter), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries___len, __pyx_k_McHitSeries___len, sizeof(__pyx_k_McHitSeries___len), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries___next, __pyx_k_McHitSeries___next, sizeof(__pyx_k_McHitSeries___next), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries___repr, __pyx_k_McHitSeries___repr, sizeof(__pyx_k_McHitSeries___repr), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries___str, __pyx_k_McHitSeries___str, sizeof(__pyx_k_McHitSeries___str), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries_conv_from, __pyx_k_McHitSeries_conv_from, sizeof(__pyx_k_McHitSeries_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries_conv_to, __pyx_k_McHitSeries_conv_to, sizeof(__pyx_k_McHitSeries_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries_deserialise, __pyx_k_McHitSeries_deserialise, sizeof(__pyx_k_McHitSeries_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries_from_aanet, __pyx_k_McHitSeries_from_aanet, sizeof(__pyx_k_McHitSeries_from_aanet), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries_from_arrays, __pyx_k_McHitSeries_from_arrays, sizeof(__pyx_k_McHitSeries_from_arrays), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries_from_dict, __pyx_k_McHitSeries_from_dict, sizeof(__pyx_k_McHitSeries_from_dict), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries_from_evt, __pyx_k_McHitSeries_from_evt, sizeof(__pyx_k_McHitSeries_from_evt), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries_from_table, __pyx_k_McHitSeries_from_table, sizeof(__pyx_k_McHitSeries_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries_next, __pyx_k_McHitSeries_next, sizeof(__pyx_k_McHitSeries_next), 0, 0, 1, 1},
  {&__pyx_n_s_McHitSeries_serialise, __pyx_k_McHitSeries_serialise, sizeof(__pyx_k_McHitSeries_serialise), 0, 0, 1, 1},
  {&__pyx_kp_s_McHitSeries_with_0_hit_1, __pyx_k_McHitSeries_with_0_hit_1, sizeof(__pyx_k_McHitSeries_with_0_hit_1), 0, 0, 1, 0},
  {&__pyx_kp_s_McHit_a_0_origin_1_pmt_id_2_time, __pyx_k_McHit_a_0_origin_1_pmt_id_2_time, sizeof(__pyx_k_McHit_a_0_origin_1_pmt_id_2_time), 0, 0, 1, 0},
  {&__pyx_n_s_McHits, __pyx_k_McHits, sizeof(__pyx_k_McHits), 0, 0, 1, 1},
  {&__pyx_n_s_McTrack, __pyx_k_McTrack, sizeof(__pyx_k_McTrack), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries, __pyx_k_McTrackSeries, sizeof(__pyx_k_McTrackSeries), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries___array, __pyx_k_McTrackSeries___array, sizeof(__pyx_k_McTrackSeries___array), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries___getitem, __pyx_k_McTrackSeries___getitem, sizeof(__pyx_k_McTrackSeries___getitem), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries___init, __pyx_k_McTrackSeries___init, sizeof(__pyx_k_McTrackSeries___init), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries___insp, __pyx_k_McTrackSeries___insp, sizeof(__pyx_k_McTrackSeries___insp), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries___iter, __pyx_k_McTrackSeries___iter, sizeof(__pyx_k_McTrackSeries___iter), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries___len, __pyx_k_McTrackSeries___len, sizeof(__pyx_k_McTrackSeries___len), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries___next, __pyx_k_McTrackSeries___next, sizeof(__pyx_k_McTrackSeries___next), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries___repr, __pyx_k_McTrackSeries___repr, sizeof(__pyx_k_McTrackSeries___repr), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries___str, __pyx_k_McTrackSeries___str, sizeof(__pyx_k_McTrackSeries___str), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries__slice_generator, __pyx_k_McTrackSeries__slice_generator, sizeof(__pyx_k_McTrackSeries__slice_generator), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_bjorkeny, __pyx_k_McTrackSeries_bjorkeny, sizeof(__pyx_k_McTrackSeries_bjorkeny), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_conv_from, __pyx_k_McTrackSeries_conv_from, sizeof(__pyx_k_McTrackSeries_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_conv_to, __pyx_k_McTrackSeries_conv_to, sizeof(__pyx_k_McTrackSeries_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_deserialise, __pyx_k_McTrackSeries_deserialise, sizeof(__pyx_k_McTrackSeries_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_dir, __pyx_k_McTrackSeries_dir, sizeof(__pyx_k_McTrackSeries_dir), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_energy, __pyx_k_McTrackSeries_energy, sizeof(__pyx_k_McTrackSeries_energy), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_from_aanet, __pyx_k_McTrackSeries_from_aanet, sizeof(__pyx_k_McTrackSeries_from_aanet), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_from_arrays, __pyx_k_McTrackSeries_from_arrays, sizeof(__pyx_k_McTrackSeries_from_arrays), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_from_km3df, __pyx_k_McTrackSeries_from_km3df, sizeof(__pyx_k_McTrackSeries_from_km3df), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_from_table, __pyx_k_McTrackSeries_from_table, sizeof(__pyx_k_McTrackSeries_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_get_len, __pyx_k_McTrackSeries_get_len, sizeof(__pyx_k_McTrackSeries_get_len), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_get_usr_item, __pyx_k_McTrackSeries_get_usr_item, sizeof(__pyx_k_McTrackSeries_get_usr_item), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_get_usr_name, __pyx_k_McTrackSeries_get_usr_name, sizeof(__pyx_k_McTrackSeries_get_usr_name), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_highest_energetic, __pyx_k_McTrackSeries_highest_energetic, sizeof(__pyx_k_McTrackSeries_highest_energetic), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_highest_energetic_2, __pyx_k_McTrackSeries_highest_energetic_2, sizeof(__pyx_k_McTrackSeries_highest_energetic_2), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_id, __pyx_k_McTrackSeries_id, sizeof(__pyx_k_McTrackSeries_id), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_interaction_channe, __pyx_k_McTrackSeries_interaction_channe, sizeof(__pyx_k_McTrackSeries_interaction_channe), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_is_cc, __pyx_k_McTrackSeries_is_cc, sizeof(__pyx_k_McTrackSeries_is_cc), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_length, __pyx_k_McTrackSeries_length, sizeof(__pyx_k_McTrackSeries_length), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_next, __pyx_k_McTrackSeries_next, sizeof(__pyx_k_McTrackSeries_next), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_pos, __pyx_k_McTrackSeries_pos, sizeof(__pyx_k_McTrackSeries_pos), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_serialise, __pyx_k_McTrackSeries_serialise, sizeof(__pyx_k_McTrackSeries_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_time, __pyx_k_McTrackSeries_time, sizeof(__pyx_k_McTrackSeries_time), 0, 0, 1, 1},
  {&__pyx_n_s_McTrackSeries_type, __pyx_k_McTrackSeries_type, sizeof(__pyx_k_McTrackSeries_type), 0, 0, 1, 1},
  {&__pyx_kp_s_McTrackSeries_with_0_track_1, __pyx_k_McTrackSeries_with_0_track_1, sizeof(__pyx_k_McTrackSeries_with_0_track_1), 0, 0, 1, 0},
  {&__pyx_kp_s_McTrack_pos_0_dir_1_t_2_E_3_type, __pyx_k_McTrack_pos_0_dir_1_t_2_E_3_type, sizeof(__pyx_k_McTrack_pos_0_dir_1_t_2_E_3_type), 0, 0, 1, 0},
  {&__pyx_n_s_McTracks, __pyx_k_McTracks, sizeof(__pyx_k_McTracks), 0, 0, 1, 1},
  {&__pyx_kp_s_No_muon_found, __pyx_k_No_muon_found, sizeof(__pyx_k_No_muon_found), 0, 0, 1, 0},
  {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0},
  {&__pyx_kp_s_Numpy_NDarray_metadata_This_clas, __pyx_k_Numpy_NDarray_metadata_This_clas, sizeof(__pyx_k_Numpy_NDarray_metadata_This_clas), 0, 0, 1, 0},
  {&__pyx_kp_s_Pandas_Dataframe_metadata_This_c, __pyx_k_Pandas_Dataframe_metadata_This_c, sizeof(__pyx_k_Pandas_Dataframe_metadata_This_c), 0, 0, 1, 0},
  {&__pyx_n_s_Point, __pyx_k_Point, sizeof(__pyx_k_Point), 0, 0, 1, 1},
  {&__pyx_n_s_Point___new, __pyx_k_Point___new, sizeof(__pyx_k_Point___new), 0, 0, 1, 1},
  {&__pyx_n_s_Point_x, __pyx_k_Point_x, sizeof(__pyx_k_Point_x), 0, 0, 1, 1},
  {&__pyx_n_s_Point_y, __pyx_k_Point_y, sizeof(__pyx_k_Point_y), 0, 0, 1, 1},
  {&__pyx_n_s_Point_z, __pyx_k_Point_z, sizeof(__pyx_k_Point_z), 0, 0, 1, 1},
  {&__pyx_n_s_Position, __pyx_k_Position, sizeof(__pyx_k_Position), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries, __pyx_k_RawHitSeries, sizeof(__pyx_k_RawHitSeries), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries___array, __pyx_k_RawHitSeries___array, sizeof(__pyx_k_RawHitSeries___array), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries___getitem, __pyx_k_RawHitSeries___getitem, sizeof(__pyx_k_RawHitSeries___getitem), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries___init, __pyx_k_RawHitSeries___init, sizeof(__pyx_k_RawHitSeries___init), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries___insp, __pyx_k_RawHitSeries___insp, sizeof(__pyx_k_RawHitSeries___insp), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries___iter, __pyx_k_RawHitSeries___iter, sizeof(__pyx_k_RawHitSeries___iter), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries___len, __pyx_k_RawHitSeries___len, sizeof(__pyx_k_RawHitSeries___len), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries___next, __pyx_k_RawHitSeries___next, sizeof(__pyx_k_RawHitSeries___next), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries___repr, __pyx_k_RawHitSeries___repr, sizeof(__pyx_k_RawHitSeries___repr), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries___str, __pyx_k_RawHitSeries___str, sizeof(__pyx_k_RawHitSeries___str), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries_conv_from, __pyx_k_RawHitSeries_conv_from, sizeof(__pyx_k_RawHitSeries_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries_conv_to, __pyx_k_RawHitSeries_conv_to, sizeof(__pyx_k_RawHitSeries_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries_deserialise, __pyx_k_RawHitSeries_deserialise, sizeof(__pyx_k_RawHitSeries_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries_from_aanet, __pyx_k_RawHitSeries_from_aanet, sizeof(__pyx_k_RawHitSeries_from_aanet), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries_from_arrays, __pyx_k_RawHitSeries_from_arrays, sizeof(__pyx_k_RawHitSeries_from_arrays), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries_next, __pyx_k_RawHitSeries_next, sizeof(__pyx_k_RawHitSeries_next), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries_serialise, __pyx_k_RawHitSeries_serialise, sizeof(__pyx_k_RawHitSeries_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_RawHitSeries_triggered_hits, __pyx_k_RawHitSeries_triggered_hits, sizeof(__pyx_k_RawHitSeries_triggered_hits), 0, 0, 1, 1},
  {&__pyx_kp_s_RawHitSeries_with_0_hit_1, __pyx_k_RawHitSeries_with_0_hit_1, sizeof(__pyx_k_RawHitSeries_with_0_hit_1), 0, 0, 1, 0},
  {&__pyx_kp_s_RawHit_channel_id_0_dom_id_1_tot, __pyx_k_RawHit_channel_id_0_dom_id_1_tot, sizeof(__pyx_k_RawHit_channel_id_0_dom_id_1_tot), 0, 0, 1, 0},
  {&__pyx_n_s_RawHits, __pyx_k_RawHits, sizeof(__pyx_k_RawHits), 0, 0, 1, 1},
  {&__pyx_kp_s_Represents_a_point_in_a_3D_space, __pyx_k_Represents_a_point_in_a_3D_space, sizeof(__pyx_k_Represents_a_point_in_a_3D_space), 0, 0, 1, 0},
  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s_Serialisable, __pyx_k_Serialisable, sizeof(__pyx_k_Serialisable), 0, 0, 1, 1},
  {&__pyx_n_s_Serialisable___new, __pyx_k_Serialisable___new, sizeof(__pyx_k_Serialisable___new), 0, 0, 1, 1},
  {&__pyx_n_s_Serialisable___new___locals___in, __pyx_k_Serialisable___new___locals___in, sizeof(__pyx_k_Serialisable___new___locals___in), 0, 0, 1, 1},
  {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
  {&__pyx_n_s_Struct, __pyx_k_Struct, sizeof(__pyx_k_Struct), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo, __pyx_k_SummaryframeInfo, sizeof(__pyx_k_SummaryframeInfo), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo___array, __pyx_k_SummaryframeInfo___array, sizeof(__pyx_k_SummaryframeInfo___array), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo___insp, __pyx_k_SummaryframeInfo___insp, sizeof(__pyx_k_SummaryframeInfo___insp), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo___len, __pyx_k_SummaryframeInfo___len, sizeof(__pyx_k_SummaryframeInfo___len), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo___str, __pyx_k_SummaryframeInfo___str, sizeof(__pyx_k_SummaryframeInfo___str), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo_conv_from, __pyx_k_SummaryframeInfo_conv_from, sizeof(__pyx_k_SummaryframeInfo_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo_conv_to, __pyx_k_SummaryframeInfo_conv_to, sizeof(__pyx_k_SummaryframeInfo_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo_deserialise, __pyx_k_SummaryframeInfo_deserialise, sizeof(__pyx_k_SummaryframeInfo_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo_from_table, __pyx_k_SummaryframeInfo_from_table, sizeof(__pyx_k_SummaryframeInfo_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeInfo_serialise, __pyx_k_SummaryframeInfo_serialise, sizeof(__pyx_k_SummaryframeInfo_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries, __pyx_k_SummaryframeSeries, sizeof(__pyx_k_SummaryframeSeries), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries___array, __pyx_k_SummaryframeSeries___array, sizeof(__pyx_k_SummaryframeSeries___array), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries___getitem, __pyx_k_SummaryframeSeries___getitem, sizeof(__pyx_k_SummaryframeSeries___getitem), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries___init, __pyx_k_SummaryframeSeries___init, sizeof(__pyx_k_SummaryframeSeries___init), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries___iter, __pyx_k_SummaryframeSeries___iter, sizeof(__pyx_k_SummaryframeSeries___iter), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries___len, __pyx_k_SummaryframeSeries___len, sizeof(__pyx_k_SummaryframeSeries___len), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries___next, __pyx_k_SummaryframeSeries___next, sizeof(__pyx_k_SummaryframeSeries___next), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries__slice_genera, __pyx_k_SummaryframeSeries__slice_genera, sizeof(__pyx_k_SummaryframeSeries__slice_genera), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_conv_from, __pyx_k_SummaryframeSeries_conv_from, sizeof(__pyx_k_SummaryframeSeries_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_conv_to, __pyx_k_SummaryframeSeries_conv_to, sizeof(__pyx_k_SummaryframeSeries_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_deserialise, __pyx_k_SummaryframeSeries_deserialise, sizeof(__pyx_k_SummaryframeSeries_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_dom_ids, __pyx_k_SummaryframeSeries_dom_ids, sizeof(__pyx_k_SummaryframeSeries_dom_ids), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_from_arrays, __pyx_k_SummaryframeSeries_from_arrays, sizeof(__pyx_k_SummaryframeSeries_from_arrays), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_from_table, __pyx_k_SummaryframeSeries_from_table, sizeof(__pyx_k_SummaryframeSeries_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_max_sequence, __pyx_k_SummaryframeSeries_max_sequence, sizeof(__pyx_k_SummaryframeSeries_max_sequence), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_n_received_pa, __pyx_k_SummaryframeSeries_n_received_pa, sizeof(__pyx_k_SummaryframeSeries_n_received_pa), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_next, __pyx_k_SummaryframeSeries_next, sizeof(__pyx_k_SummaryframeSeries_next), 0, 0, 1, 1},
  {&__pyx_n_s_SummaryframeSeries_serialise, __pyx_k_SummaryframeSeries_serialise, sizeof(__pyx_k_SummaryframeSeries_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo, __pyx_k_SummarysliceInfo, sizeof(__pyx_k_SummarysliceInfo), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo___array, __pyx_k_SummarysliceInfo___array, sizeof(__pyx_k_SummarysliceInfo___array), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo___insp, __pyx_k_SummarysliceInfo___insp, sizeof(__pyx_k_SummarysliceInfo___insp), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo___len, __pyx_k_SummarysliceInfo___len, sizeof(__pyx_k_SummarysliceInfo___len), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo___str, __pyx_k_SummarysliceInfo___str, sizeof(__pyx_k_SummarysliceInfo___str), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo_conv_from, __pyx_k_SummarysliceInfo_conv_from, sizeof(__pyx_k_SummarysliceInfo_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo_conv_to, __pyx_k_SummarysliceInfo_conv_to, sizeof(__pyx_k_SummarysliceInfo_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo_deserialise, __pyx_k_SummarysliceInfo_deserialise, sizeof(__pyx_k_SummarysliceInfo_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo_from_table, __pyx_k_SummarysliceInfo_from_table, sizeof(__pyx_k_SummarysliceInfo_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_SummarysliceInfo_serialise, __pyx_k_SummarysliceInfo_serialise, sizeof(__pyx_k_SummarysliceInfo_serialise), 0, 0, 1, 1},
  {&__pyx_kp_s_Summaryslice_0_detector_id_1_fra, __pyx_k_Summaryslice_0_detector_id_1_fra, sizeof(__pyx_k_Summaryslice_0_detector_id_1_fra), 0, 0, 1, 0},
  {&__pyx_kp_s_Summaryslice_frame_0_slice_id_1, __pyx_k_Summaryslice_frame_0_slice_id_1, sizeof(__pyx_k_Summaryslice_frame_0_slice_id_1), 0, 0, 1, 0},
  {&__pyx_kp_s_Tamas_Gal_and_Moritz_Lotze, __pyx_k_Tamas_Gal_and_Moritz_Lotze, sizeof(__pyx_k_Tamas_Gal_and_Moritz_Lotze), 0, 0, 1, 0},
  {&__pyx_n_s_TimesliceFrameInfo, __pyx_k_TimesliceFrameInfo, sizeof(__pyx_k_TimesliceFrameInfo), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo_2, __pyx_k_TimesliceFrameInfo_2, sizeof(__pyx_k_TimesliceFrameInfo_2), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo____array, __pyx_k_TimesliceFrameInfo____array, sizeof(__pyx_k_TimesliceFrameInfo____array), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo____insp, __pyx_k_TimesliceFrameInfo____insp, sizeof(__pyx_k_TimesliceFrameInfo____insp), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo____len, __pyx_k_TimesliceFrameInfo____len, sizeof(__pyx_k_TimesliceFrameInfo____len), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo____str, __pyx_k_TimesliceFrameInfo____str, sizeof(__pyx_k_TimesliceFrameInfo____str), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo__conv_from, __pyx_k_TimesliceFrameInfo__conv_from, sizeof(__pyx_k_TimesliceFrameInfo__conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo__conv_to, __pyx_k_TimesliceFrameInfo__conv_to, sizeof(__pyx_k_TimesliceFrameInfo__conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo__deserialise, __pyx_k_TimesliceFrameInfo__deserialise, sizeof(__pyx_k_TimesliceFrameInfo__deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo__from_table, __pyx_k_TimesliceFrameInfo__from_table, sizeof(__pyx_k_TimesliceFrameInfo__from_table), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceFrameInfo__serialise, __pyx_k_TimesliceFrameInfo__serialise, sizeof(__pyx_k_TimesliceFrameInfo__serialise), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries, __pyx_k_TimesliceHitSeries, sizeof(__pyx_k_TimesliceHitSeries), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___array, __pyx_k_TimesliceHitSeries___array, sizeof(__pyx_k_TimesliceHitSeries___array), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___getitem, __pyx_k_TimesliceHitSeries___getitem, sizeof(__pyx_k_TimesliceHitSeries___getitem), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___init, __pyx_k_TimesliceHitSeries___init, sizeof(__pyx_k_TimesliceHitSeries___init), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___insp, __pyx_k_TimesliceHitSeries___insp, sizeof(__pyx_k_TimesliceHitSeries___insp), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___iter, __pyx_k_TimesliceHitSeries___iter, sizeof(__pyx_k_TimesliceHitSeries___iter), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___len, __pyx_k_TimesliceHitSeries___len, sizeof(__pyx_k_TimesliceHitSeries___len), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___next, __pyx_k_TimesliceHitSeries___next, sizeof(__pyx_k_TimesliceHitSeries___next), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___repr, __pyx_k_TimesliceHitSeries___repr, sizeof(__pyx_k_TimesliceHitSeries___repr), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries___str, __pyx_k_TimesliceHitSeries___str, sizeof(__pyx_k_TimesliceHitSeries___str), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_conv_from, __pyx_k_TimesliceHitSeries_conv_from, sizeof(__pyx_k_TimesliceHitSeries_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_conv_to, __pyx_k_TimesliceHitSeries_conv_to, sizeof(__pyx_k_TimesliceHitSeries_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_deserialise, __pyx_k_TimesliceHitSeries_deserialise, sizeof(__pyx_k_TimesliceHitSeries_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_from_arrays, __pyx_k_TimesliceHitSeries_from_arrays, sizeof(__pyx_k_TimesliceHitSeries_from_arrays), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_from_dict, __pyx_k_TimesliceHitSeries_from_dict, sizeof(__pyx_k_TimesliceHitSeries_from_dict), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_from_table, __pyx_k_TimesliceHitSeries_from_table, sizeof(__pyx_k_TimesliceHitSeries_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_h5loc, __pyx_k_TimesliceHitSeries_h5loc, sizeof(__pyx_k_TimesliceHitSeries_h5loc), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_next, __pyx_k_TimesliceHitSeries_next, sizeof(__pyx_k_TimesliceHitSeries_next), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_serialise, __pyx_k_TimesliceHitSeries_serialise, sizeof(__pyx_k_TimesliceHitSeries_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceHitSeries_tabname, __pyx_k_TimesliceHitSeries_tabname, sizeof(__pyx_k_TimesliceHitSeries_tabname), 0, 0, 1, 1},
  {&__pyx_kp_s_TimesliceHitSeries_with_0_hit_1, __pyx_k_TimesliceHitSeries_with_0_hit_1, sizeof(__pyx_k_TimesliceHitSeries_with_0_hit_1), 0, 0, 1, 0},
  {&__pyx_kp_s_TimesliceHit_channel_id_0_dom_id, __pyx_k_TimesliceHit_channel_id_0_dom_id, sizeof(__pyx_k_TimesliceHit_channel_id_0_dom_id), 0, 0, 1, 0},
  {&__pyx_n_s_TimesliceHits, __pyx_k_TimesliceHits, sizeof(__pyx_k_TimesliceHits), 0, 0, 1, 1},
  {&__pyx_n_s_TimesliceInfo, __pyx_k_TimesliceInfo, sizeof(__pyx_k_TimesliceInfo), 0, 0, 1, 1},
  {&__pyx_kp_s_Timeslice_frame_slice_id_0_frame, __pyx_k_Timeslice_frame_slice_id_0_frame, sizeof(__pyx_k_Timeslice_frame_slice_id_0_frame), 0, 0, 1, 0},
  {&__pyx_n_s_Track, __pyx_k_Track, sizeof(__pyx_k_Track), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries, __pyx_k_TrackSeries, sizeof(__pyx_k_TrackSeries), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___array, __pyx_k_TrackSeries___array, sizeof(__pyx_k_TrackSeries___array), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___getitem, __pyx_k_TrackSeries___getitem, sizeof(__pyx_k_TrackSeries___getitem), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___init, __pyx_k_TrackSeries___init, sizeof(__pyx_k_TrackSeries___init), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___insp, __pyx_k_TrackSeries___insp, sizeof(__pyx_k_TrackSeries___insp), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___iter, __pyx_k_TrackSeries___iter, sizeof(__pyx_k_TrackSeries___iter), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___len, __pyx_k_TrackSeries___len, sizeof(__pyx_k_TrackSeries___len), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___next, __pyx_k_TrackSeries___next, sizeof(__pyx_k_TrackSeries___next), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___repr, __pyx_k_TrackSeries___repr, sizeof(__pyx_k_TrackSeries___repr), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries___str, __pyx_k_TrackSeries___str, sizeof(__pyx_k_TrackSeries___str), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries__slice_generator, __pyx_k_TrackSeries__slice_generator, sizeof(__pyx_k_TrackSeries__slice_generator), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_bjorkeny, __pyx_k_TrackSeries_bjorkeny, sizeof(__pyx_k_TrackSeries_bjorkeny), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_conv_from, __pyx_k_TrackSeries_conv_from, sizeof(__pyx_k_TrackSeries_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_conv_to, __pyx_k_TrackSeries_conv_to, sizeof(__pyx_k_TrackSeries_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_deserialise, __pyx_k_TrackSeries_deserialise, sizeof(__pyx_k_TrackSeries_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_dir, __pyx_k_TrackSeries_dir, sizeof(__pyx_k_TrackSeries_dir), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_energy, __pyx_k_TrackSeries_energy, sizeof(__pyx_k_TrackSeries_energy), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_from_aanet, __pyx_k_TrackSeries_from_aanet, sizeof(__pyx_k_TrackSeries_from_aanet), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_from_arrays, __pyx_k_TrackSeries_from_arrays, sizeof(__pyx_k_TrackSeries_from_arrays), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_from_km3df, __pyx_k_TrackSeries_from_km3df, sizeof(__pyx_k_TrackSeries_from_km3df), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_from_table, __pyx_k_TrackSeries_from_table, sizeof(__pyx_k_TrackSeries_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_get_len, __pyx_k_TrackSeries_get_len, sizeof(__pyx_k_TrackSeries_get_len), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_get_usr_item, __pyx_k_TrackSeries_get_usr_item, sizeof(__pyx_k_TrackSeries_get_usr_item), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_get_usr_name, __pyx_k_TrackSeries_get_usr_name, sizeof(__pyx_k_TrackSeries_get_usr_name), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_highest_energetic_mu, __pyx_k_TrackSeries_highest_energetic_mu, sizeof(__pyx_k_TrackSeries_highest_energetic_mu), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_highest_energetic_mu_2, __pyx_k_TrackSeries_highest_energetic_mu_2, sizeof(__pyx_k_TrackSeries_highest_energetic_mu_2), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_id, __pyx_k_TrackSeries_id, sizeof(__pyx_k_TrackSeries_id), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_interaction_channel, __pyx_k_TrackSeries_interaction_channel, sizeof(__pyx_k_TrackSeries_interaction_channel), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_is_cc, __pyx_k_TrackSeries_is_cc, sizeof(__pyx_k_TrackSeries_is_cc), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_length, __pyx_k_TrackSeries_length, sizeof(__pyx_k_TrackSeries_length), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_next, __pyx_k_TrackSeries_next, sizeof(__pyx_k_TrackSeries_next), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_pos, __pyx_k_TrackSeries_pos, sizeof(__pyx_k_TrackSeries_pos), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_serialise, __pyx_k_TrackSeries_serialise, sizeof(__pyx_k_TrackSeries_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_time, __pyx_k_TrackSeries_time, sizeof(__pyx_k_TrackSeries_time), 0, 0, 1, 1},
  {&__pyx_n_s_TrackSeries_type, __pyx_k_TrackSeries_type, sizeof(__pyx_k_TrackSeries_type), 0, 0, 1, 1},
  {&__pyx_kp_s_TrackSeries_with_0_track_1, __pyx_k_TrackSeries_with_0_track_1, sizeof(__pyx_k_TrackSeries_with_0_track_1), 0, 0, 1, 0},
  {&__pyx_kp_s_Track_pos_0_dir_1_t_2_E_3_type_4, __pyx_k_Track_pos_0_dir_1_t_2_E_3_type_4, sizeof(__pyx_k_Track_pos_0_dir_1_t_2_E_3_type_4), 0, 0, 1, 0},
  {&__pyx_n_s_Tracks, __pyx_k_Tracks, sizeof(__pyx_k_Tracks), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
  {&__pyx_kp_s__88, __pyx_k__88, sizeof(__pyx_k__88), 0, 0, 1, 0},
  {&__pyx_kp_s__91, __pyx_k__91, sizeof(__pyx_k__91), 0, 0, 1, 0},
  {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
  {&__pyx_n_s_angle_between, __pyx_k_angle_between, sizeof(__pyx_k_angle_between), 0, 0, 1, 1},
  {&__pyx_n_s_append_fields, __pyx_k_append_fields, sizeof(__pyx_k_append_fields), 0, 0, 1, 1},
  {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_argsort, __pyx_k_argsort, sizeof(__pyx_k_argsort), 0, 0, 1, 1},
  {&__pyx_n_s_arr, __pyx_k_arr, sizeof(__pyx_k_arr), 0, 0, 1, 1},
  {&__pyx_n_s_arr_2, __pyx_k_arr_2, sizeof(__pyx_k_arr_2), 0, 0, 1, 1},
  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
  {&__pyx_n_s_array_2, __pyx_k_array_2, sizeof(__pyx_k_array_2), 0, 0, 1, 1},
  {&__pyx_n_s_array_finalize, __pyx_k_array_finalize, sizeof(__pyx_k_array_finalize), 0, 0, 1, 1},
  {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1},
  {&__pyx_n_s_attr, __pyx_k_attr, sizeof(__pyx_k_attr), 0, 0, 1, 1},
  {&__pyx_n_s_author, __pyx_k_author, sizeof(__pyx_k_author), 0, 0, 1, 1},
  {&__pyx_n_s_bjorkeny, __pyx_k_bjorkeny, sizeof(__pyx_k_bjorkeny), 0, 0, 1, 1},
  {&__pyx_n_s_bjorkeny_2, __pyx_k_bjorkeny_2, sizeof(__pyx_k_bjorkeny_2), 0, 0, 1, 1},
  {&__pyx_n_s_bjorkenys, __pyx_k_bjorkenys, sizeof(__pyx_k_bjorkenys), 0, 0, 1, 1},
  {&__pyx_n_s_by, __pyx_k_by, sizeof(__pyx_k_by), 0, 0, 1, 1},
  {&__pyx_n_s_calcsize, __pyx_k_calcsize, sizeof(__pyx_k_calcsize), 0, 0, 1, 1},
  {&__pyx_n_s_cc, __pyx_k_cc, sizeof(__pyx_k_cc), 0, 0, 1, 1},
  {&__pyx_n_s_channel_id, __pyx_k_channel_id, sizeof(__pyx_k_channel_id), 0, 0, 1, 1},
  {&__pyx_n_s_channel_ids, __pyx_k_channel_ids, sizeof(__pyx_k_channel_ids), 0, 0, 1, 1},
  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
  {&__pyx_n_s_class_attr, __pyx_k_class_attr, sizeof(__pyx_k_class_attr), 0, 0, 1, 1},
  {&__pyx_n_s_class_name, __pyx_k_class_name, sizeof(__pyx_k_class_name), 0, 0, 1, 1},
  {&__pyx_n_s_class_parents, __pyx_k_class_parents, sizeof(__pyx_k_class_parents), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1},
  {&__pyx_n_s_col, __pyx_k_col, sizeof(__pyx_k_col), 0, 0, 1, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_s_column_stack, __pyx_k_column_stack, sizeof(__pyx_k_column_stack), 0, 0, 1, 1},
  {&__pyx_n_s_constructor, __pyx_k_constructor, sizeof(__pyx_k_constructor), 0, 0, 1, 1},
  {&__pyx_n_s_conv_from, __pyx_k_conv_from, sizeof(__pyx_k_conv_from), 0, 0, 1, 1},
  {&__pyx_n_s_conv_to, __pyx_k_conv_to, sizeof(__pyx_k_conv_to), 0, 0, 1, 1},
  {&__pyx_n_s_copyright, __pyx_k_copyright, sizeof(__pyx_k_copyright), 0, 0, 1, 1},
  {&__pyx_n_s_credits, __pyx_k_credits, sizeof(__pyx_k_credits), 0, 0, 1, 1},
  {&__pyx_n_s_ctypes, __pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 0, 1, 1},
  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {&__pyx_n_s_data_id, __pyx_k_data_id, sizeof(__pyx_k_data_id), 0, 0, 1, 1},
  {&__pyx_n_s_deserialise, __pyx_k_deserialise, sizeof(__pyx_k_deserialise), 0, 0, 1, 1},
  {&__pyx_n_s_deserialise_map, __pyx_k_deserialise_map, sizeof(__pyx_k_deserialise_map), 0, 0, 1, 1},
  {&__pyx_n_s_det_id, __pyx_k_det_id, sizeof(__pyx_k_det_id), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_dir, __pyx_k_dir, sizeof(__pyx_k_dir), 0, 0, 1, 1},
  {&__pyx_n_s_dir_2, __pyx_k_dir_2, sizeof(__pyx_k_dir_2), 0, 0, 1, 1},
  {&__pyx_n_s_dir_x, __pyx_k_dir_x, sizeof(__pyx_k_dir_x), 0, 0, 1, 1},
  {&__pyx_n_s_dir_xs, __pyx_k_dir_xs, sizeof(__pyx_k_dir_xs), 0, 0, 1, 1},
  {&__pyx_n_s_dir_y, __pyx_k_dir_y, sizeof(__pyx_k_dir_y), 0, 0, 1, 1},
  {&__pyx_n_s_dir_ys, __pyx_k_dir_ys, sizeof(__pyx_k_dir_ys), 0, 0, 1, 1},
  {&__pyx_n_s_dir_z, __pyx_k_dir_z, sizeof(__pyx_k_dir_z), 0, 0, 1, 1},
  {&__pyx_n_s_dir_zs, __pyx_k_dir_zs, sizeof(__pyx_k_dir_zs), 0, 0, 1, 1},
  {&__pyx_n_s_directions, __pyx_k_directions, sizeof(__pyx_k_directions), 0, 0, 1, 1},
  {&__pyx_n_s_directions_x, __pyx_k_directions_x, sizeof(__pyx_k_directions_x), 0, 0, 1, 1},
  {&__pyx_n_s_directions_y, __pyx_k_directions_y, sizeof(__pyx_k_directions_y), 0, 0, 1, 1},
  {&__pyx_n_s_directions_z, __pyx_k_directions_z, sizeof(__pyx_k_directions_z), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_dom_id, __pyx_k_dom_id, sizeof(__pyx_k_dom_id), 0, 0, 1, 1},
  {&__pyx_n_s_dom_ids, __pyx_k_dom_ids, sizeof(__pyx_k_dom_ids), 0, 0, 1, 1},
  {&__pyx_n_s_dom_status, __pyx_k_dom_status, sizeof(__pyx_k_dom_status), 0, 0, 1, 1},
  {&__pyx_n_s_drop_duplicates, __pyx_k_drop_duplicates, sizeof(__pyx_k_drop_duplicates), 0, 0, 1, 1},
  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
  {&__pyx_n_s_du, __pyx_k_du, sizeof(__pyx_k_du), 0, 0, 1, 1},
  {&__pyx_n_s_dus, __pyx_k_dus, sizeof(__pyx_k_dus), 0, 0, 1, 1},
  {&__pyx_n_s_email, __pyx_k_email, sizeof(__pyx_k_email), 0, 0, 1, 1},
  {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
  {&__pyx_n_s_energies, __pyx_k_energies, sizeof(__pyx_k_energies), 0, 0, 1, 1},
  {&__pyx_n_s_energy, __pyx_k_energy, sizeof(__pyx_k_energy), 0, 0, 1, 1},
  {&__pyx_n_s_energy_2, __pyx_k_energy_2, sizeof(__pyx_k_energy_2), 0, 0, 1, 1},
  {&__pyx_n_s_event_id, __pyx_k_event_id, sizeof(__pyx_k_event_id), 0, 0, 1, 1},
  {&__pyx_kp_s_event_info, __pyx_k_event_info, sizeof(__pyx_k_event_info), 0, 0, 1, 0},
  {&__pyx_kp_s_f4, __pyx_k_f4, sizeof(__pyx_k_f4), 0, 0, 1, 0},
  {&__pyx_n_s_f4_2, __pyx_k_f4_2, sizeof(__pyx_k_f4_2), 0, 0, 1, 1},
  {&__pyx_kp_s_f8, __pyx_k_f8, sizeof(__pyx_k_f8), 0, 0, 1, 0},
  {&__pyx_n_s_f8_2, __pyx_k_f8_2, sizeof(__pyx_k_f8_2), 0, 0, 1, 1},
  {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1},
  {&__pyx_n_s_fields_2, __pyx_k_fields_2, sizeof(__pyx_k_fields_2), 0, 0, 1, 1},
  {&__pyx_n_s_fifo_status, __pyx_k_fifo_status, sizeof(__pyx_k_fifo_status), 0, 0, 1, 1},
  {&__pyx_n_s_first_hits, __pyx_k_first_hits, sizeof(__pyx_k_first_hits), 0, 0, 1, 1},
  {&__pyx_n_s_floor, __pyx_k_floor, sizeof(__pyx_k_floor), 0, 0, 1, 1},
  {&__pyx_n_s_floors, __pyx_k_floors, sizeof(__pyx_k_floors), 0, 0, 1, 1},
  {&__pyx_n_s_fmt, __pyx_k_fmt, sizeof(__pyx_k_fmt), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_kp_s_frame__0, __pyx_k_frame__0, sizeof(__pyx_k_frame__0), 0, 0, 1, 0},
  {&__pyx_n_s_frame_id, __pyx_k_frame_id, sizeof(__pyx_k_frame_id), 0, 0, 1, 1},
  {&__pyx_n_s_frame_index, __pyx_k_frame_index, sizeof(__pyx_k_frame_index), 0, 0, 1, 1},
  {&__pyx_n_s_frames, __pyx_k_frames, sizeof(__pyx_k_frames), 0, 0, 1, 1},
  {&__pyx_n_s_frames_2, __pyx_k_frames_2, sizeof(__pyx_k_frames_2), 0, 0, 1, 1},
  {&__pyx_n_s_from_aanet, __pyx_k_from_aanet, sizeof(__pyx_k_from_aanet), 0, 0, 1, 1},
  {&__pyx_n_s_from_arrays, __pyx_k_from_arrays, sizeof(__pyx_k_from_arrays), 0, 0, 1, 1},
  {&__pyx_n_s_from_dict, __pyx_k_from_dict, sizeof(__pyx_k_from_dict), 0, 0, 1, 1},
  {&__pyx_n_s_from_evt, __pyx_k_from_evt, sizeof(__pyx_k_from_evt), 0, 0, 1, 1},
  {&__pyx_n_s_from_km3df, __pyx_k_from_km3df, sizeof(__pyx_k_from_km3df), 0, 0, 1, 1},
  {&__pyx_n_s_from_row, __pyx_k_from_row, sizeof(__pyx_k_from_row), 0, 0, 1, 1},
  {&__pyx_n_s_from_table, __pyx_k_from_table, sizeof(__pyx_k_from_table), 0, 0, 1, 1},
  {&__pyx_n_s_full, __pyx_k_full, sizeof(__pyx_k_full), 0, 0, 1, 1},
  {&__pyx_n_s_geant2pdg, __pyx_k_geant2pdg, sizeof(__pyx_k_geant2pdg), 0, 0, 1, 1},
  {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_get_len, __pyx_k_get_len, sizeof(__pyx_k_get_len), 0, 0, 1, 1},
  {&__pyx_n_s_get_usr_item, __pyx_k_get_usr_item, sizeof(__pyx_k_get_usr_item), 0, 0, 1, 1},
  {&__pyx_n_s_get_usr_name, __pyx_k_get_usr_name, sizeof(__pyx_k_get_usr_name), 0, 0, 1, 1},
  {&__pyx_n_s_getattr, __pyx_k_getattr, sizeof(__pyx_k_getattr), 0, 0, 1, 1},
  {&__pyx_n_s_getitem, __pyx_k_getitem, sizeof(__pyx_k_getitem), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_getusr, __pyx_k_getusr, sizeof(__pyx_k_getusr), 0, 0, 1, 1},
  {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
  {&__pyx_n_s_h5loc, __pyx_k_h5loc, sizeof(__pyx_k_h5loc), 0, 0, 1, 1},
  {&__pyx_n_s_has_udp_trailer, __pyx_k_has_udp_trailer, sizeof(__pyx_k_has_udp_trailer), 0, 0, 1, 1},
  {&__pyx_n_s_high_rate_veto, __pyx_k_high_rate_veto, sizeof(__pyx_k_high_rate_veto), 0, 0, 1, 1},
  {&__pyx_n_s_highest_energetic_muon, __pyx_k_highest_energetic_muon, sizeof(__pyx_k_highest_energetic_muon), 0, 0, 1, 1},
  {&__pyx_n_s_highest_energetic_muon_2, __pyx_k_highest_energetic_muon_2, sizeof(__pyx_k_highest_energetic_muon_2), 0, 0, 1, 1},
  {&__pyx_n_s_hit, __pyx_k_hit, sizeof(__pyx_k_hit), 0, 0, 1, 1},
  {&__pyx_n_s_hits, __pyx_k_hits, sizeof(__pyx_k_hits), 0, 0, 1, 1},
  {&__pyx_n_s_hits_2, __pyx_k_hits_2, sizeof(__pyx_k_hits_2), 0, 0, 1, 1},
  {&__pyx_kp_s_hits_3, __pyx_k_hits_3, sizeof(__pyx_k_hits_3), 0, 0, 1, 0},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_kp_s_i4, __pyx_k_i4, sizeof(__pyx_k_i4), 0, 0, 1, 0},
  {&__pyx_n_s_ichan, __pyx_k_ichan, sizeof(__pyx_k_ichan), 0, 0, 1, 1},
  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  {&__pyx_n_s_id_2, __pyx_k_id_2, sizeof(__pyx_k_id_2), 0, 0, 1, 1},
  {&__pyx_n_s_ids, __pyx_k_ids, sizeof(__pyx_k_ids), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_n_s_index_2, __pyx_k_index_2, sizeof(__pyx_k_index_2), 0, 0, 1, 1},
  {&__pyx_kp_s_index_must_be_int_or_slice, __pyx_k_index_must_be_int_or_slice, sizeof(__pyx_k_index_must_be_int_or_slice), 0, 0, 1, 0},
  {&__pyx_n_s_indices, __pyx_k_indices, sizeof(__pyx_k_indices), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_inplace, __pyx_k_inplace, sizeof(__pyx_k_inplace), 0, 0, 1, 1},
  {&__pyx_n_s_input_array, __pyx_k_input_array, sizeof(__pyx_k_input_array), 0, 0, 1, 1},
  {&__pyx_n_s_insp, __pyx_k_insp, sizeof(__pyx_k_insp), 0, 0, 1, 1},
  {&__pyx_n_s_interaction_channel, __pyx_k_interaction_channel, sizeof(__pyx_k_interaction_channel), 0, 0, 1, 1},
  {&__pyx_n_s_interaction_channel_2, __pyx_k_interaction_channel_2, sizeof(__pyx_k_interaction_channel_2), 0, 0, 1, 1},
  {&__pyx_n_s_interaction_channels, __pyx_k_interaction_channels, sizeof(__pyx_k_interaction_channels), 0, 0, 1, 1},
  {&__pyx_n_s_is_cc, __pyx_k_is_cc, sizeof(__pyx_k_is_cc), 0, 0, 1, 1},
  {&__pyx_n_s_is_cc_2, __pyx_k_is_cc_2, sizeof(__pyx_k_is_cc_2), 0, 0, 1, 1},
  {&__pyx_n_s_is_ccs, __pyx_k_is_ccs, sizeof(__pyx_k_is_ccs), 0, 0, 1, 1},
  {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
  {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
  {&__pyx_n_s_km3df, __pyx_k_km3df, sizeof(__pyx_k_km3df), 0, 0, 1, 1},
  {&__pyx_n_s_km3pipe_dataclasses, __pyx_k_km3pipe_dataclasses, sizeof(__pyx_k_km3pipe_dataclasses), 0, 0, 1, 1},
  {&__pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_k_km3pipe_dataclasses_pyx, sizeof(__pyx_k_km3pipe_dataclasses_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_len, __pyx_k_len, sizeof(__pyx_k_len), 0, 0, 1, 1},
  {&__pyx_n_s_len_2, __pyx_k_len_2, sizeof(__pyx_k_len_2), 0, 0, 1, 1},
  {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
  {&__pyx_n_s_length_2, __pyx_k_length_2, sizeof(__pyx_k_length_2), 0, 0, 1, 1},
  {&__pyx_n_s_lengths, __pyx_k_lengths, sizeof(__pyx_k_lengths), 0, 0, 1, 1},
  {&__pyx_n_s_license, __pyx_k_license, sizeof(__pyx_k_license), 0, 0, 1, 1},
  {&__pyx_n_s_livetime_sec, __pyx_k_livetime_sec, sizeof(__pyx_k_livetime_sec), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_maintainer, __pyx_k_maintainer, sizeof(__pyx_k_maintainer), 0, 0, 1, 1},
  {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1},
  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
  {&__pyx_n_s_max_sequence_number, __pyx_k_max_sequence_number, sizeof(__pyx_k_max_sequence_number), 0, 0, 1, 1},
  {&__pyx_n_s_max_sequence_numbers, __pyx_k_max_sequence_numbers, sizeof(__pyx_k_max_sequence_numbers), 0, 0, 1, 1},
  {&__pyx_n_s_mc, __pyx_k_mc, sizeof(__pyx_k_mc), 0, 0, 1, 1},
  {&__pyx_kp_s_mc_hits, __pyx_k_mc_hits, sizeof(__pyx_k_mc_hits), 0, 0, 1, 0},
  {&__pyx_n_s_mc_id, __pyx_k_mc_id, sizeof(__pyx_k_mc_id), 0, 0, 1, 1},
  {&__pyx_n_s_mc_t, __pyx_k_mc_t, sizeof(__pyx_k_mc_t), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass_2, __pyx_k_metaclass_2, sizeof(__pyx_k_metaclass_2), 0, 0, 1, 1},
  {&__pyx_n_s_metadata, __pyx_k_metadata, sizeof(__pyx_k_metadata), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_muons, __pyx_k_muons, sizeof(__pyx_k_muons), 0, 0, 1, 1},
  {&__pyx_n_s_n_events_gen, __pyx_k_n_events_gen, sizeof(__pyx_k_n_events_gen), 0, 0, 1, 1},
  {&__pyx_n_s_n_files_gen, __pyx_k_n_files_gen, sizeof(__pyx_k_n_files_gen), 0, 0, 1, 1},
  {&__pyx_n_s_n_frames, __pyx_k_n_frames, sizeof(__pyx_k_n_frames), 0, 0, 1, 1},
  {&__pyx_n_s_n_hits, __pyx_k_n_hits, sizeof(__pyx_k_n_hits), 0, 0, 1, 1},
  {&__pyx_n_s_n_packets, __pyx_k_n_packets, sizeof(__pyx_k_n_packets), 0, 0, 1, 1},
  {&__pyx_n_s_n_received_packets, __pyx_k_n_received_packets, sizeof(__pyx_k_n_received_packets), 0, 0, 1, 1},
  {&__pyx_n_s_n_tracks, __pyx_k_n_tracks, sizeof(__pyx_k_n_tracks), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_n_s_name_len, __pyx_k_name_len, sizeof(__pyx_k_name_len), 0, 0, 1, 1},
  {&__pyx_n_s_namedtuple, __pyx_k_namedtuple, sizeof(__pyx_k_namedtuple), 0, 0, 1, 1},
  {&__pyx_n_s_names, __pyx_k_names, sizeof(__pyx_k_names), 0, 0, 1, 1},
  {&__pyx_n_s_nan, __pyx_k_nan, sizeof(__pyx_k_nan), 0, 0, 1, 1},
  {&__pyx_n_s_nanoseconds, __pyx_k_nanoseconds, sizeof(__pyx_k_nanoseconds), 0, 0, 1, 1},
  {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},
  {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_s_new_2, __pyx_k_new_2, sizeof(__pyx_k_new_2), 0, 0, 1, 1},
  {&__pyx_n_s_new_arr, __pyx_k_new_arr, sizeof(__pyx_k_new_arr), 0, 0, 1, 1},
  {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1},
  {&__pyx_n_s_next_2, __pyx_k_next_2, sizeof(__pyx_k_next_2), 0, 0, 1, 1},
  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
  {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},
  {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},
  {&__pyx_n_s_numpy_lib, __pyx_k_numpy_lib, sizeof(__pyx_k_numpy_lib), 0, 0, 1, 1},
  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_s_origin, __pyx_k_origin, sizeof(__pyx_k_origin), 0, 0, 1, 1},
  {&__pyx_n_s_out, __pyx_k_out, sizeof(__pyx_k_out), 0, 0, 1, 1},
  {&__pyx_n_s_overlays, __pyx_k_overlays, sizeof(__pyx_k_overlays), 0, 0, 1, 1},
  {&__pyx_n_s_pandas, __pyx_k_pandas, sizeof(__pyx_k_pandas), 0, 0, 1, 1},
  {&__pyx_n_s_pd, __pyx_k_pd, sizeof(__pyx_k_pd), 0, 0, 1, 1},
  {&__pyx_n_s_pdg2name, __pyx_k_pdg2name, sizeof(__pyx_k_pdg2name), 0, 0, 1, 1},
  {&__pyx_n_s_plural, __pyx_k_plural, sizeof(__pyx_k_plural), 0, 0, 1, 1},
  {&__pyx_n_s_pmt_id, __pyx_k_pmt_id, sizeof(__pyx_k_pmt_id), 0, 0, 1, 1},
  {&__pyx_n_s_pmt_ids, __pyx_k_pmt_ids, sizeof(__pyx_k_pmt_ids), 0, 0, 1, 1},
  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1},
  {&__pyx_n_s_pos_2, __pyx_k_pos_2, sizeof(__pyx_k_pos_2), 0, 0, 1, 1},
  {&__pyx_n_s_pos_x, __pyx_k_pos_x, sizeof(__pyx_k_pos_x), 0, 0, 1, 1},
  {&__pyx_n_s_pos_xs, __pyx_k_pos_xs, sizeof(__pyx_k_pos_xs), 0, 0, 1, 1},
  {&__pyx_n_s_pos_y, __pyx_k_pos_y, sizeof(__pyx_k_pos_y), 0, 0, 1, 1},
  {&__pyx_n_s_pos_ys, __pyx_k_pos_ys, sizeof(__pyx_k_pos_ys), 0, 0, 1, 1},
  {&__pyx_n_s_pos_z, __pyx_k_pos_z, sizeof(__pyx_k_pos_z), 0, 0, 1, 1},
  {&__pyx_n_s_pos_zs, __pyx_k_pos_zs, sizeof(__pyx_k_pos_zs), 0, 0, 1, 1},
  {&__pyx_n_s_positions, __pyx_k_positions, sizeof(__pyx_k_positions), 0, 0, 1, 1},
  {&__pyx_n_s_positions_x, __pyx_k_positions_x, sizeof(__pyx_k_positions_x), 0, 0, 1, 1},
  {&__pyx_n_s_positions_y, __pyx_k_positions_y, sizeof(__pyx_k_positions_y), 0, 0, 1, 1},
  {&__pyx_n_s_positions_z, __pyx_k_positions_z, sizeof(__pyx_k_positions_z), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_kp_s_raw_hits, __pyx_k_raw_hits, sizeof(__pyx_k_raw_hits), 0, 0, 1, 0},
  {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
  {&__pyx_n_s_recfunctions, __pyx_k_recfunctions, sizeof(__pyx_k_recfunctions), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1},
  {&__pyx_n_s_reshape, __pyx_k_reshape, sizeof(__pyx_k_reshape), 0, 0, 1, 1},
  {&__pyx_n_s_rfn, __pyx_k_rfn, sizeof(__pyx_k_rfn), 0, 0, 1, 1},
  {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1},
  {&__pyx_n_s_run, __pyx_k_run, sizeof(__pyx_k_run), 0, 0, 1, 1},
  {&__pyx_n_s_run_id, __pyx_k_run_id, sizeof(__pyx_k_run_id), 0, 0, 1, 1},
  {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
  {&__pyx_n_s_sefl, __pyx_k_sefl, sizeof(__pyx_k_sefl), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_n_s_serialise, __pyx_k_serialise, sizeof(__pyx_k_serialise), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_setter, __pyx_k_setter, sizeof(__pyx_k_setter), 0, 0, 1, 1},
  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
  {&__pyx_n_s_six, __pyx_k_six, sizeof(__pyx_k_six), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_slice_generator, __pyx_k_slice_generator, sizeof(__pyx_k_slice_generator), 0, 0, 1, 1},
  {&__pyx_n_s_slice_id, __pyx_k_slice_id, sizeof(__pyx_k_slice_id), 0, 0, 1, 1},
  {&__pyx_n_s_sort_idc, __pyx_k_sort_idc, sizeof(__pyx_k_sort_idc), 0, 0, 1, 1},
  {&__pyx_n_s_sort_values, __pyx_k_sort_values, sizeof(__pyx_k_sort_values), 0, 0, 1, 1},
  {&__pyx_n_s_sorted, __pyx_k_sorted, sizeof(__pyx_k_sorted), 0, 0, 1, 1},
  {&__pyx_n_s_sqnr, __pyx_k_sqnr, sizeof(__pyx_k_sqnr), 0, 0, 1, 1},
  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {&__pyx_n_s_status, __pyx_k_status, sizeof(__pyx_k_status), 0, 0, 1, 1},
  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
  {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
  {&__pyx_n_s_stream, __pyx_k_stream, sizeof(__pyx_k_stream), 0, 0, 1, 1},
  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
  {&__pyx_n_s_structure, __pyx_k_structure, sizeof(__pyx_k_structure), 0, 0, 1, 1},
  {&__pyx_n_s_subset, __pyx_k_subset, sizeof(__pyx_k_subset), 0, 0, 1, 1},
  {&__pyx_kp_s_summary_frame_series, __pyx_k_summary_frame_series, sizeof(__pyx_k_summary_frame_series), 0, 0, 1, 0},
  {&__pyx_kp_s_summary_slice, __pyx_k_summary_slice, sizeof(__pyx_k_summary_slice), 0, 0, 1, 0},
  {&__pyx_kp_s_summary_slice_info, __pyx_k_summary_slice_info, sizeof(__pyx_k_summary_slice_info), 0, 0, 1, 0},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
  {&__pyx_n_s_t0, __pyx_k_t0, sizeof(__pyx_k_t0), 0, 0, 1, 1},
  {&__pyx_n_s_t0s, __pyx_k_t0s, sizeof(__pyx_k_t0s), 0, 0, 1, 1},
  {&__pyx_n_s_table, __pyx_k_table, sizeof(__pyx_k_table), 0, 0, 1, 1},
  {&__pyx_n_s_tabname, __pyx_k_tabname, sizeof(__pyx_k_tabname), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_kp_s_tgal_km3net_de, __pyx_k_tgal_km3net_de, sizeof(__pyx_k_tgal_km3net_de), 0, 0, 1, 0},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
  {&__pyx_n_s_time_2, __pyx_k_time_2, sizeof(__pyx_k_time_2), 0, 0, 1, 1},
  {&__pyx_kp_s_time_slice_frame_info, __pyx_k_time_slice_frame_info, sizeof(__pyx_k_time_slice_frame_info), 0, 0, 1, 0},
  {&__pyx_kp_s_time_slice_hits, __pyx_k_time_slice_hits, sizeof(__pyx_k_time_slice_hits), 0, 0, 1, 0},
  {&__pyx_n_s_times, __pyx_k_times, sizeof(__pyx_k_times), 0, 0, 1, 1},
  {&__pyx_kp_s_timeslices_slice__0, __pyx_k_timeslices_slice__0, sizeof(__pyx_k_timeslices_slice__0), 0, 0, 1, 0},
  {&__pyx_n_s_timestamp, __pyx_k_timestamp, sizeof(__pyx_k_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_to, __pyx_k_to, sizeof(__pyx_k_to), 0, 0, 1, 1},
  {&__pyx_n_s_to_records, __pyx_k_to_records, sizeof(__pyx_k_to_records), 0, 0, 1, 1},
  {&__pyx_n_s_tot, __pyx_k_tot, sizeof(__pyx_k_tot), 0, 0, 1, 1},
  {&__pyx_n_s_tots, __pyx_k_tots, sizeof(__pyx_k_tots), 0, 0, 1, 1},
  {&__pyx_n_s_track, __pyx_k_track, sizeof(__pyx_k_track), 0, 0, 1, 1},
  {&__pyx_n_s_track_args, __pyx_k_track_args, sizeof(__pyx_k_track_args), 0, 0, 1, 1},
  {&__pyx_n_s_tracks, __pyx_k_tracks, sizeof(__pyx_k_tracks), 0, 0, 1, 1},
  {&__pyx_n_s_tracks_2, __pyx_k_tracks_2, sizeof(__pyx_k_tracks_2), 0, 0, 1, 1},
  {&__pyx_kp_s_tracks_3, __pyx_k_tracks_3, sizeof(__pyx_k_tracks_3), 0, 0, 1, 0},
  {&__pyx_n_s_trig, __pyx_k_trig, sizeof(__pyx_k_trig), 0, 0, 1, 1},
  {&__pyx_n_s_trigger_counter, __pyx_k_trigger_counter, sizeof(__pyx_k_trigger_counter), 0, 0, 1, 1},
  {&__pyx_n_s_trigger_mask, __pyx_k_trigger_mask, sizeof(__pyx_k_trigger_mask), 0, 0, 1, 1},
  {&__pyx_n_s_triggered, __pyx_k_triggered, sizeof(__pyx_k_triggered), 0, 0, 1, 1},
  {&__pyx_n_s_triggered_hits, __pyx_k_triggered_hits, sizeof(__pyx_k_triggered_hits), 0, 0, 1, 1},
  {&__pyx_n_s_triggereds, __pyx_k_triggereds, sizeof(__pyx_k_triggereds), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_s_type_2, __pyx_k_type_2, sizeof(__pyx_k_type_2), 0, 0, 1, 1},
  {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
  {&__pyx_n_s_u1, __pyx_k_u1, sizeof(__pyx_k_u1), 0, 0, 1, 1},
  {&__pyx_kp_s_u4, __pyx_k_u4, sizeof(__pyx_k_u4), 0, 0, 1, 0},
  {&__pyx_kp_s_u8, __pyx_k_u8, sizeof(__pyx_k_u8), 0, 0, 1, 0},
  {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0},
  {&__pyx_n_s_unpack_from, __pyx_k_unpack_from, sizeof(__pyx_k_unpack_from), 0, 0, 1, 1},
  {&__pyx_n_s_usemask, __pyx_k_usemask, sizeof(__pyx_k_usemask), 0, 0, 1, 1},
  {&__pyx_n_s_usr, __pyx_k_usr, sizeof(__pyx_k_usr), 0, 0, 1, 1},
  {&__pyx_n_s_usr_names, __pyx_k_usr_names, sizeof(__pyx_k_usr_names), 0, 0, 1, 1},
  {&__pyx_n_s_utc_nanoseconds, __pyx_k_utc_nanoseconds, sizeof(__pyx_k_utc_nanoseconds), 0, 0, 1, 1},
  {&__pyx_n_s_utc_seconds, __pyx_k_utc_seconds, sizeof(__pyx_k_utc_seconds), 0, 0, 1, 1},
  {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
  {&__pyx_n_s_view, __pyx_k_view, sizeof(__pyx_k_view), 0, 0, 1, 1},
  {&__pyx_n_s_weight_w1, __pyx_k_weight_w1, sizeof(__pyx_k_weight_w1), 0, 0, 1, 1},
  {&__pyx_n_s_weight_w2, __pyx_k_weight_w2, sizeof(__pyx_k_weight_w2), 0, 0, 1, 1},
  {&__pyx_n_s_weight_w3, __pyx_k_weight_w3, sizeof(__pyx_k_weight_w3), 0, 0, 1, 1},
  {&__pyx_n_s_white_rabbit_status, __pyx_k_white_rabbit_status, sizeof(__pyx_k_white_rabbit_status), 0, 0, 1, 1},
  {&__pyx_n_s_with_metaclass, __pyx_k_with_metaclass, sizeof(__pyx_k_with_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_write_separate_columns, __pyx_k_write_separate_columns, sizeof(__pyx_k_write_separate_columns), 0, 0, 1, 1},
  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
  {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
  {&__pyx_n_s_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 0, 1, 1},
  {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 89, __pyx_L1_error)
  __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(0, 483, __pyx_L1_error)
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 77, __pyx_L1_error)
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 97, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 176, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 863, __pyx_L1_error)
  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 926, __pyx_L1_error)
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 1861, __pyx_L1_error)
  __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) __PYX_ERR(0, 1889, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 1985, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 2497, __pyx_L1_error)
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 823, __pyx_L1_error)
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1013, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "km3pipe/dataclasses.pyx":75
 *                 attr[name] = val
 * 
 *         def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *             """Take care of the attribute settings."""
 *             for arg, name in zip(args, self.dtype.names):
 */
  __pyx_tuple__3 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_arg, __pyx_n_s_name, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);
  __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_init, 75, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 75, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":415
 *     def __init__(self, arr, h5loc='/'):
 *         assert 'run_id' in arr.dtype.fields
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)             # <<<<<<<<<<<<<<
 *         for col in self.dtype.names:
 *             setattr(self, col, self._arr[col])
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__108 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__109 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);

  /* "km3pipe/dataclasses.pyx":1548
 *     def first_hits(self):
 *         h = self.conv_to(to='pandas')
 *         h.sort_values('time', inplace=True)             # <<<<<<<<<<<<<<
 *         h = h.drop_duplicates(subset='dom_id')
 *         return HitSeries(h.to_records(index=False))
 */
  __pyx_tuple__153 = PyTuple_Pack(1, __pyx_n_s_time); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 1548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);

  /* "km3pipe/dataclasses.pyx":1742
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):
 *         return cls([McTrack(cls.get_usr_name(t, str('by'), 1),               # bjorkeny             # <<<<<<<<<<<<<<
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 *                           t.E,
 */
  __pyx_tuple__182 = PyTuple_Pack(1, __pyx_n_s_by); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(0, 1742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__182);
  __Pyx_GIVEREF(__pyx_tuple__182);

  /* "km3pipe/dataclasses.pyx":1746
 *                           t.E,
 *                           t.id,
 *                           cls.get_usr_name(t, str('ichan'), 2),               # ichan             # <<<<<<<<<<<<<<
 *                           IS_CC[cls.get_usr_name(t, str('cc'), 0)],        # is_cc
 *                           cls.get_len(t),
 */
  __pyx_tuple__183 = PyTuple_Pack(1, __pyx_n_s_ichan); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 1746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__183);
  __Pyx_GIVEREF(__pyx_tuple__183);

  /* "km3pipe/dataclasses.pyx":1747
 *                           t.id,
 *                           cls.get_usr_name(t, str('ichan'), 2),               # ichan
 *                           IS_CC[cls.get_usr_name(t, str('cc'), 0)],        # is_cc             # <<<<<<<<<<<<<<
 *                           cls.get_len(t),
 *                           Position((t.pos.x, t.pos.y, t.pos.z)),
 */
  __pyx_tuple__184 = PyTuple_Pack(1, __pyx_n_s_cc); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 1747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__184);
  __Pyx_GIVEREF(__pyx_tuple__184);

  /* "km3pipe/dataclasses.pyx":1888
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:
 *                 raise AttributeError("No muon found")             # <<<<<<<<<<<<<<
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)
 *         return self._highest_energetic_muon
 */
  __pyx_tuple__197 = PyTuple_Pack(1, __pyx_kp_s_No_muon_found); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 1888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_GIVEREF(__pyx_tuple__197);

  /* "km3pipe/dataclasses.pyx":1980
 *             return self._slice_generator(index)
 *         else:
 *             raise TypeError("index must be int or slice")             # <<<<<<<<<<<<<<
 * 
 *     def _slice_generator(self, index):
 */
  __pyx_tuple__214 = PyTuple_Pack(1, __pyx_kp_s_index_must_be_int_or_slice); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(0, 1980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__214);
  __Pyx_GIVEREF(__pyx_tuple__214);

  /* "km3pipe/dataclasses.pyx":2045
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):
 *         return cls([Track(cls.get_usr_name(t, str('by'), 1),               # bjorkeny             # <<<<<<<<<<<<<<
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 *                           t.E,
 */
  __pyx_tuple__220 = PyTuple_Pack(1, __pyx_n_s_by); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(0, 2045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__220);
  __Pyx_GIVEREF(__pyx_tuple__220);

  /* "km3pipe/dataclasses.pyx":2049
 *                           t.E,
 *                           t.id,
 *                           cls.get_usr_name(t, str('ichan'), 2),               # ichan             # <<<<<<<<<<<<<<
 *                           IS_CC[cls.get_usr_name(t, str('cc'), 0)],        # is_cc
 *                           cls.get_len(t),
 */
  __pyx_tuple__221 = PyTuple_Pack(1, __pyx_n_s_ichan); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 2049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__221);
  __Pyx_GIVEREF(__pyx_tuple__221);

  /* "km3pipe/dataclasses.pyx":2050
 *                           t.id,
 *                           cls.get_usr_name(t, str('ichan'), 2),               # ichan
 *                           IS_CC[cls.get_usr_name(t, str('cc'), 0)],        # is_cc             # <<<<<<<<<<<<<<
 *                           cls.get_len(t),
 *                           Position((t.pos.x, t.pos.y, t.pos.z)),
 */
  __pyx_tuple__222 = PyTuple_Pack(1, __pyx_n_s_cc); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(0, 2050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__222);
  __Pyx_GIVEREF(__pyx_tuple__222);

  /* "km3pipe/dataclasses.pyx":2191
 *             muons = [track for track in self if abs(track.type) == 13]
 *             if len(muons) == 0:
 *                 raise AttributeError("No muon found")             # <<<<<<<<<<<<<<
 *             self._highest_energetic_muon = max(muons, key=lambda m: m.energy)
 *         return self._highest_energetic_muon
 */
  __pyx_tuple__235 = PyTuple_Pack(1, __pyx_kp_s_No_muon_found); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(0, 2191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);

  /* "km3pipe/dataclasses.pyx":2283
 *             return self._slice_generator(index)
 *         else:
 *             raise TypeError("index must be int or slice")             # <<<<<<<<<<<<<<
 * 
 *     def _slice_generator(self, index):
 */
  __pyx_tuple__252 = PyTuple_Pack(1, __pyx_kp_s_index_must_be_int_or_slice); if (unlikely(!__pyx_tuple__252)) __PYX_ERR(0, 2283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__252);
  __Pyx_GIVEREF(__pyx_tuple__252);

  /* "km3pipe/dataclasses.pyx":2398
 *             return self._slice_generator(index)
 *         else:
 *             raise TypeError("index must be int or slice")             # <<<<<<<<<<<<<<
 * 
 *     def _slice_generator(self, index):
 */
  __pyx_tuple__272 = PyTuple_Pack(1, __pyx_kp_s_index_must_be_int_or_slice); if (unlikely(!__pyx_tuple__272)) __PYX_ERR(0, 2398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__272);
  __Pyx_GIVEREF(__pyx_tuple__272);

  /* "km3pipe/dataclasses.pyx":2496
 * 
 *     def __init__(self, *args, **kwargs):
 *         h5loc = kwargs.pop('h5loc', '/')             # <<<<<<<<<<<<<<
 *         super(KM3DataFrame, self).__init__(*args, **kwargs)
 *         self.h5loc = h5loc
 */
  __pyx_tuple__283 = PyTuple_Pack(2, __pyx_n_s_h5loc, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__283)) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__283);
  __Pyx_GIVEREF(__pyx_tuple__283);

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":235
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
  __pyx_tuple__291 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__291)) __PYX_ERR(2, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__291);
  __Pyx_GIVEREF(__pyx_tuple__291);

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":239
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
  __pyx_tuple__292 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__292)) __PYX_ERR(2, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__292);
  __Pyx_GIVEREF(__pyx_tuple__292);

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
  __pyx_tuple__293 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__293)) __PYX_ERR(2, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__293);
  __Pyx_GIVEREF(__pyx_tuple__293);

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":823
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 */
  __pyx_tuple__294 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__294)) __PYX_ERR(2, 823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__294);
  __Pyx_GIVEREF(__pyx_tuple__294);

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
 *         if ((child.byteorder == c'>' and little_endian) or
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *             # One could encode it in the format string and have Cython
 *             # complain instead, BUT: < and > in format strings also imply
 */
  __pyx_tuple__295 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__295)) __PYX_ERR(2, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__295);
  __Pyx_GIVEREF(__pyx_tuple__295);

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":847
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
  __pyx_tuple__296 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__296)) __PYX_ERR(2, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__296);
  __Pyx_GIVEREF(__pyx_tuple__296);

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1013
 *         _import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
  __pyx_tuple__297 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(2, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__297);
  __Pyx_GIVEREF(__pyx_tuple__297);

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1019
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
  __pyx_tuple__298 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__298)) __PYX_ERR(2, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__298);
  __Pyx_GIVEREF(__pyx_tuple__298);

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1025
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__299 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__299)) __PYX_ERR(2, 1025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__299);
  __Pyx_GIVEREF(__pyx_tuple__299);

  /* "km3pipe/dataclasses.pyx":38
 * __email__ = "tgal@km3net.de"
 * __status__ = "Development"
 * __all__ = ('EventInfo', 'Point', 'Position', 'Direction', 'HitSeries',             # <<<<<<<<<<<<<<
 *            'RawHitSeries', 'TimesliceHitSeries', 'Hit', 'McHit', 'McTrack',
 *            'McTrackSeries', 'Track', 'TrackSeries', 'Serialisable',
 */
  __pyx_tuple__301 = PyTuple_Pack(16, __pyx_n_s_EventInfo, __pyx_n_s_Point, __pyx_n_s_Position, __pyx_n_s_Direction, __pyx_n_s_HitSeries, __pyx_n_s_RawHitSeries, __pyx_n_s_TimesliceHitSeries, __pyx_n_s_Hit, __pyx_n_s_McHit, __pyx_n_s_McTrack, __pyx_n_s_McTrackSeries, __pyx_n_s_Track, __pyx_n_s_TrackSeries, __pyx_n_s_Serialisable, __pyx_n_s_SummaryframeInfo, __pyx_n_s_BinaryStruct); if (unlikely(!__pyx_tuple__301)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__301);
  __Pyx_GIVEREF(__pyx_tuple__301);

  /* "km3pipe/dataclasses.pyx":67
 * 
 *     """
 *     def __new__(metaclass, class_name, class_parents, class_attr):             # <<<<<<<<<<<<<<
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():
 */
  __pyx_tuple__302 = PyTuple_Pack(9, __pyx_n_s_metaclass, __pyx_n_s_class_name, __pyx_n_s_class_parents, __pyx_n_s_class_attr, __pyx_n_s_attr, __pyx_n_s_name, __pyx_n_s_val, __pyx_n_s_init, __pyx_n_s_init); if (unlikely(!__pyx_tuple__302)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__302);
  __Pyx_GIVEREF(__pyx_tuple__302);
  __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__302, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_new, 67, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 67, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":89
 * 
 * 
 * class DTypeAttr(object):             # <<<<<<<<<<<<<<
 *     """Helper class to make dtype names accessible using the dot-syntax
 * 
 */
  __pyx_tuple__303 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__303)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__303);
  __Pyx_GIVEREF(__pyx_tuple__303);

  /* "km3pipe/dataclasses.pyx":95
 *     with ``names``.
 *     """
 *     def __getattr__(self, name):             # <<<<<<<<<<<<<<
 *         if not hasattr(self, "dtype"):
 *             raise AttributeError
 */
  __pyx_tuple__304 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__304)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__304);
  __Pyx_GIVEREF(__pyx_tuple__304);
  __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__304, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_getattr, 95, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 95, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":103
 *             raise AttributeError
 * 
 *     def sorted(self, by='time'):             # <<<<<<<<<<<<<<
 *         sort_idc = np.argsort(self._arr[by])
 *         return self.__class__(self._arr[sort_idc], self.event_id)
 */
  __pyx_tuple__305 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_by, __pyx_n_s_sort_idc); if (unlikely(!__pyx_tuple__305)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__305);
  __Pyx_GIVEREF(__pyx_tuple__305);
  __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__305, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_sorted, 103, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 103, __pyx_L1_error)
  __pyx_tuple__306 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_time)); if (unlikely(!__pyx_tuple__306)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__306);
  __Pyx_GIVEREF(__pyx_tuple__306);

  /* "km3pipe/dataclasses.pyx":107
 *         return self.__class__(self._arr[sort_idc], self.event_id)
 * 
 *     def append_fields(self, fields, values, **kwargs):             # <<<<<<<<<<<<<<
 *         """Uses `numpy.lib.recfunctions.append_fields` to append new fields."""
 *         new_arr = rfn.append_fields(self._arr, fields, values,
 */
  __pyx_tuple__307 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_fields, __pyx_n_s_values, __pyx_n_s_kwargs, __pyx_n_s_new_arr); if (unlikely(!__pyx_tuple__307)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__307);
  __Pyx_GIVEREF(__pyx_tuple__307);
  __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__307, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_append_fields, 107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 107, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":114
 *         self.dtype = new_arr.dtype
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __pyx_tuple__308 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__308)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__308);
  __Pyx_GIVEREF(__pyx_tuple__308);
  __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__308, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_array, 114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 114, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":117
 *         return self._arr
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         """Preliminary interface for accessing single elements, which
 *         otherwise return a `np.void`"""
 */
  __pyx_tuple__309 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_new_2); if (unlikely(!__pyx_tuple__309)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__309);
  __Pyx_GIVEREF(__pyx_tuple__309);
  __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__309, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_getitem, 117, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 117, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":130
 * class AttrVoid(np.ndarray):
 *     """Allow `np.void` instances to access their fields via attributes."""
 *     def __new__(cls, input_array):             # <<<<<<<<<<<<<<
 *         obj = np.asarray(input_array).view(cls)
 *         if obj.dtype.names is not None:
 */
  __pyx_tuple__310 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_input_array, __pyx_n_s_obj, __pyx_n_s_name); if (unlikely(!__pyx_tuple__310)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__310);
  __Pyx_GIVEREF(__pyx_tuple__310);
  __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__310, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_new, 130, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 130, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":138
 * 
 * 
 * class Convertible(object):             # <<<<<<<<<<<<<<
 *     """Implements basic conversion methods."""
 *     @classmethod
 */
  __pyx_tuple__311 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__311)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__311);
  __Pyx_GIVEREF(__pyx_tuple__311);

  /* "km3pipe/dataclasses.pyx":141
 *     """Implements basic conversion methods."""
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__312 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__312)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__312);
  __Pyx_GIVEREF(__pyx_tuple__312);
  __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__312, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_deserialise, 141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 141, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":144
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__313 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__313)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__313);
  __Pyx_GIVEREF(__pyx_tuple__313);
  __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__313, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_serialise, 144, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 144, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":148
 * 
 *     @classmethod
 *     def conv_from(cls, data, data_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */
  __pyx_tuple__314 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_data_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__314)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__314);
  __Pyx_GIVEREF(__pyx_tuple__314);
  __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__314, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_from, 148, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 148, __pyx_L1_error)
  __pyx_tuple__315 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__315)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__315);
  __Pyx_GIVEREF(__pyx_tuple__315);

  /* "km3pipe/dataclasses.pyx":152
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __pyx_tuple__316 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__316)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__316);
  __Pyx_GIVEREF(__pyx_tuple__316);
  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__316, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_to, 152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 152, __pyx_L1_error)
  __pyx_tuple__317 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__317)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__317);
  __Pyx_GIVEREF(__pyx_tuple__317);

  /* "km3pipe/dataclasses.pyx":164
 *     h5loc = '/summary_slice'
 *     dtype = np.dtype([
 *         ('det_id', '<i4'),             # <<<<<<<<<<<<<<
 *         ('frame_index', '<u4'),
 *         ('run_id', '<i4'),
 */
  __pyx_tuple__318 = PyTuple_Pack(2, __pyx_n_s_det_id, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__318)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__318);
  __Pyx_GIVEREF(__pyx_tuple__318);

  /* "km3pipe/dataclasses.pyx":165
 *     dtype = np.dtype([
 *         ('det_id', '<i4'),
 *         ('frame_index', '<u4'),             # <<<<<<<<<<<<<<
 *         ('run_id', '<i4'),
 *         ('slice_id', '<u4'),
 */
  __pyx_tuple__319 = PyTuple_Pack(2, __pyx_n_s_frame_index, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__319)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__319);
  __Pyx_GIVEREF(__pyx_tuple__319);

  /* "km3pipe/dataclasses.pyx":166
 *         ('det_id', '<i4'),
 *         ('frame_index', '<u4'),
 *         ('run_id', '<i4'),             # <<<<<<<<<<<<<<
 *         ('slice_id', '<u4'),
 *     ])
 */
  __pyx_tuple__320 = PyTuple_Pack(2, __pyx_n_s_run_id, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__320)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__320);
  __Pyx_GIVEREF(__pyx_tuple__320);

  /* "km3pipe/dataclasses.pyx":167
 *         ('frame_index', '<u4'),
 *         ('run_id', '<i4'),
 *         ('slice_id', '<u4'),             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
  __pyx_tuple__321 = PyTuple_Pack(2, __pyx_n_s_slice_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__321)) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__321);
  __Pyx_GIVEREF(__pyx_tuple__321);

  /* "km3pipe/dataclasses.pyx":171
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */
  __pyx_tuple__322 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_row, __pyx_n_s_args, __pyx_n_s_col); if (unlikely(!__pyx_tuple__322)) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__322);
  __Pyx_GIVEREF(__pyx_tuple__322);
  __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__322, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_table, 171, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 171, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":181
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__323 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__323)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__323);
  __Pyx_GIVEREF(__pyx_tuple__323);
  __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__323, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_deserialise, 181, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 181, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":184
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__324 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__324)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__324);
  __Pyx_GIVEREF(__pyx_tuple__324);
  __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__324, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_serialise, 184, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 184, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":188
 * 
 *     @classmethod
 *     def conv_from(cls, data, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */
  __pyx_tuple__325 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__325)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__325);
  __Pyx_GIVEREF(__pyx_tuple__325);
  __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__325, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_from, 188, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 188, __pyx_L1_error)
  __pyx_tuple__326 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__326)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__326);
  __Pyx_GIVEREF(__pyx_tuple__326);

  /* "km3pipe/dataclasses.pyx":192
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __pyx_tuple__327 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__327)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__327);
  __Pyx_GIVEREF(__pyx_tuple__327);
  __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__327, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_to, 192, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 192, __pyx_L1_error)
  __pyx_tuple__328 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__328)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__328);
  __Pyx_GIVEREF(__pyx_tuple__328);

  /* "km3pipe/dataclasses.pyx":198
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             self.det_id, self.frame_index, self.run_id, self.slice_id,
 */
  __pyx_tuple__329 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__329)) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__329);
  __Pyx_GIVEREF(__pyx_tuple__329);
  __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_array, 198, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 198, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":203
 *         ), ], dtype=self.dtype)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Summaryslice #{0}:\n" \
 *                "    detector id:     {1}\n" \
 */
  __pyx_tuple__330 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__330)) __PYX_ERR(0, 203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__330);
  __Pyx_GIVEREF(__pyx_tuple__330);
  __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__330, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_str, 203, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 203, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":212
 *                        )
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__331 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__331)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__331);
  __Pyx_GIVEREF(__pyx_tuple__331);
  __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__331, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_insp, 212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 212, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":215
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __pyx_tuple__332 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__332)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__332);
  __Pyx_GIVEREF(__pyx_tuple__332);
  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__332, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_len_2, 215, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 215, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":251
 *     h5loc = '/time_slice_frame_info'
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('fifo_status', '<u4'),
 *         ('frame_id', '<u4'),
 */
  __pyx_tuple__333 = PyTuple_Pack(2, __pyx_n_s_dom_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__333)) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__333);
  __Pyx_GIVEREF(__pyx_tuple__333);

  /* "km3pipe/dataclasses.pyx":252
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),
 *         ('fifo_status', '<u4'),             # <<<<<<<<<<<<<<
 *         ('frame_id', '<u4'),
 *         ('frame_index', '<u4'),
 */
  __pyx_tuple__334 = PyTuple_Pack(2, __pyx_n_s_fifo_status, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__334)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__334);
  __Pyx_GIVEREF(__pyx_tuple__334);

  /* "km3pipe/dataclasses.pyx":253
 *         ('dom_id', '<u4'),
 *         ('fifo_status', '<u4'),
 *         ('frame_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('frame_index', '<u4'),
 *         ('has_udp_trailer', '<u4'),
 */
  __pyx_tuple__335 = PyTuple_Pack(2, __pyx_n_s_frame_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__335)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__335);
  __Pyx_GIVEREF(__pyx_tuple__335);

  /* "km3pipe/dataclasses.pyx":254
 *         ('fifo_status', '<u4'),
 *         ('frame_id', '<u4'),
 *         ('frame_index', '<u4'),             # <<<<<<<<<<<<<<
 *         ('has_udp_trailer', '<u4'),
 *         ('high_rate_veto', '<u4'),
 */
  __pyx_tuple__336 = PyTuple_Pack(2, __pyx_n_s_frame_index, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__336)) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__336);
  __Pyx_GIVEREF(__pyx_tuple__336);

  /* "km3pipe/dataclasses.pyx":255
 *         ('frame_id', '<u4'),
 *         ('frame_index', '<u4'),
 *         ('has_udp_trailer', '<u4'),             # <<<<<<<<<<<<<<
 *         ('high_rate_veto', '<u4'),
 *         ('max_sequence_number', '<u4'),
 */
  __pyx_tuple__337 = PyTuple_Pack(2, __pyx_n_s_has_udp_trailer, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__337)) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__337);
  __Pyx_GIVEREF(__pyx_tuple__337);

  /* "km3pipe/dataclasses.pyx":256
 *         ('frame_index', '<u4'),
 *         ('has_udp_trailer', '<u4'),
 *         ('high_rate_veto', '<u4'),             # <<<<<<<<<<<<<<
 *         ('max_sequence_number', '<u4'),
 *         ('n_packets', '<u4'),
 */
  __pyx_tuple__338 = PyTuple_Pack(2, __pyx_n_s_high_rate_veto, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__338)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__338);
  __Pyx_GIVEREF(__pyx_tuple__338);

  /* "km3pipe/dataclasses.pyx":257
 *         ('has_udp_trailer', '<u4'),
 *         ('high_rate_veto', '<u4'),
 *         ('max_sequence_number', '<u4'),             # <<<<<<<<<<<<<<
 *         ('n_packets', '<u4'),
 *         ('slice_id', '<u4'),
 */
  __pyx_tuple__339 = PyTuple_Pack(2, __pyx_n_s_max_sequence_number, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__339)) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__339);
  __Pyx_GIVEREF(__pyx_tuple__339);

  /* "km3pipe/dataclasses.pyx":258
 *         ('high_rate_veto', '<u4'),
 *         ('max_sequence_number', '<u4'),
 *         ('n_packets', '<u4'),             # <<<<<<<<<<<<<<
 *         ('slice_id', '<u4'),
 *         ('utc_nanoseconds', '<u4'),
 */
  __pyx_tuple__340 = PyTuple_Pack(2, __pyx_n_s_n_packets, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__340)) __PYX_ERR(0, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__340);
  __Pyx_GIVEREF(__pyx_tuple__340);

  /* "km3pipe/dataclasses.pyx":259
 *         ('max_sequence_number', '<u4'),
 *         ('n_packets', '<u4'),
 *         ('slice_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('utc_nanoseconds', '<u4'),
 *         ('utc_seconds', '<u4'),
 */
  __pyx_tuple__341 = PyTuple_Pack(2, __pyx_n_s_slice_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__341)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__341);
  __Pyx_GIVEREF(__pyx_tuple__341);

  /* "km3pipe/dataclasses.pyx":260
 *         ('n_packets', '<u4'),
 *         ('slice_id', '<u4'),
 *         ('utc_nanoseconds', '<u4'),             # <<<<<<<<<<<<<<
 *         ('utc_seconds', '<u4'),
 *         ('white_rabbit_status', '<u4'),
 */
  __pyx_tuple__342 = PyTuple_Pack(2, __pyx_n_s_utc_nanoseconds, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__342)) __PYX_ERR(0, 260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__342);
  __Pyx_GIVEREF(__pyx_tuple__342);

  /* "km3pipe/dataclasses.pyx":261
 *         ('slice_id', '<u4'),
 *         ('utc_nanoseconds', '<u4'),
 *         ('utc_seconds', '<u4'),             # <<<<<<<<<<<<<<
 *         ('white_rabbit_status', '<u4'),
 *     ])
 */
  __pyx_tuple__343 = PyTuple_Pack(2, __pyx_n_s_utc_seconds, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__343)) __PYX_ERR(0, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__343);
  __Pyx_GIVEREF(__pyx_tuple__343);

  /* "km3pipe/dataclasses.pyx":262
 *         ('utc_nanoseconds', '<u4'),
 *         ('utc_seconds', '<u4'),
 *         ('white_rabbit_status', '<u4'),             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
  __pyx_tuple__344 = PyTuple_Pack(2, __pyx_n_s_white_rabbit_status, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__344)) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__344);
  __Pyx_GIVEREF(__pyx_tuple__344);

  /* "km3pipe/dataclasses.pyx":266
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */
  __pyx_tuple__345 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_row, __pyx_n_s_args, __pyx_n_s_col); if (unlikely(!__pyx_tuple__345)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__345);
  __Pyx_GIVEREF(__pyx_tuple__345);
  __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__345, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_table, 266, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 266, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":276
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__346 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__346)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__346);
  __Pyx_GIVEREF(__pyx_tuple__346);
  __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__346, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_deserialise, 276, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 276, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":279
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__347 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__347)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__347);
  __Pyx_GIVEREF(__pyx_tuple__347);
  __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__347, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_serialise, 279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 279, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":283
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */
  __pyx_tuple__348 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_frame_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__348)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__348);
  __Pyx_GIVEREF(__pyx_tuple__348);
  __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__348, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_from, 283, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 283, __pyx_L1_error)
  __pyx_tuple__349 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__349)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__349);
  __Pyx_GIVEREF(__pyx_tuple__349);

  /* "km3pipe/dataclasses.pyx":287
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __pyx_tuple__350 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__350)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__350);
  __Pyx_GIVEREF(__pyx_tuple__350);
  __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__350, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_to, 287, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 287, __pyx_L1_error)
  __pyx_tuple__351 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__351)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__351);
  __Pyx_GIVEREF(__pyx_tuple__351);

  /* "km3pipe/dataclasses.pyx":293
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 */
  __pyx_tuple__352 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__352)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__352);
  __Pyx_GIVEREF(__pyx_tuple__352);
  __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__352, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_array, 293, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 293, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":301
 *         ), ], dtype=self.dtype)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Timeslice frame:\n" \
 *                "    slice id: {0}\n" \
 */
  __pyx_tuple__353 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__353)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__353);
  __Pyx_GIVEREF(__pyx_tuple__353);
  __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__353, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_str, 301, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 301, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":311
 *                        self.max_sequence_number)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__354 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__354)) __PYX_ERR(0, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__354);
  __Pyx_GIVEREF(__pyx_tuple__354);
  __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_insp, 311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 311, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":314
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __pyx_tuple__355 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__355)) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__355);
  __Pyx_GIVEREF(__pyx_tuple__355);
  __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__355, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_len_2, 314, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 314, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":323
 *     h5loc = '/summary_slice_info'
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('fifo_status', '<u4'),
 *         ('frame_id', '<u4'),
 */
  __pyx_tuple__356 = PyTuple_Pack(2, __pyx_n_s_dom_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__356)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__356);
  __Pyx_GIVEREF(__pyx_tuple__356);

  /* "km3pipe/dataclasses.pyx":324
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),
 *         ('fifo_status', '<u4'),             # <<<<<<<<<<<<<<
 *         ('frame_id', '<u4'),
 *         ('frame_index', '<u4'),
 */
  __pyx_tuple__357 = PyTuple_Pack(2, __pyx_n_s_fifo_status, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__357)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__357);
  __Pyx_GIVEREF(__pyx_tuple__357);

  /* "km3pipe/dataclasses.pyx":325
 *         ('dom_id', '<u4'),
 *         ('fifo_status', '<u4'),
 *         ('frame_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('frame_index', '<u4'),
 *         ('has_udp_trailer', '<u4'),
 */
  __pyx_tuple__358 = PyTuple_Pack(2, __pyx_n_s_frame_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__358)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__358);
  __Pyx_GIVEREF(__pyx_tuple__358);

  /* "km3pipe/dataclasses.pyx":326
 *         ('fifo_status', '<u4'),
 *         ('frame_id', '<u4'),
 *         ('frame_index', '<u4'),             # <<<<<<<<<<<<<<
 *         ('has_udp_trailer', '<u4'),
 *         ('high_rate_veto', '<u4'),
 */
  __pyx_tuple__359 = PyTuple_Pack(2, __pyx_n_s_frame_index, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__359)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__359);
  __Pyx_GIVEREF(__pyx_tuple__359);

  /* "km3pipe/dataclasses.pyx":327
 *         ('frame_id', '<u4'),
 *         ('frame_index', '<u4'),
 *         ('has_udp_trailer', '<u4'),             # <<<<<<<<<<<<<<
 *         ('high_rate_veto', '<u4'),
 *         ('max_sequence_number', '<u4'),
 */
  __pyx_tuple__360 = PyTuple_Pack(2, __pyx_n_s_has_udp_trailer, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__360)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__360);
  __Pyx_GIVEREF(__pyx_tuple__360);

  /* "km3pipe/dataclasses.pyx":328
 *         ('frame_index', '<u4'),
 *         ('has_udp_trailer', '<u4'),
 *         ('high_rate_veto', '<u4'),             # <<<<<<<<<<<<<<
 *         ('max_sequence_number', '<u4'),
 *         ('n_packets', '<u4'),
 */
  __pyx_tuple__361 = PyTuple_Pack(2, __pyx_n_s_high_rate_veto, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__361)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__361);
  __Pyx_GIVEREF(__pyx_tuple__361);

  /* "km3pipe/dataclasses.pyx":329
 *         ('has_udp_trailer', '<u4'),
 *         ('high_rate_veto', '<u4'),
 *         ('max_sequence_number', '<u4'),             # <<<<<<<<<<<<<<
 *         ('n_packets', '<u4'),
 *         ('slice_id', '<u4'),
 */
  __pyx_tuple__362 = PyTuple_Pack(2, __pyx_n_s_max_sequence_number, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__362)) __PYX_ERR(0, 329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__362);
  __Pyx_GIVEREF(__pyx_tuple__362);

  /* "km3pipe/dataclasses.pyx":330
 *         ('high_rate_veto', '<u4'),
 *         ('max_sequence_number', '<u4'),
 *         ('n_packets', '<u4'),             # <<<<<<<<<<<<<<
 *         ('slice_id', '<u4'),
 *         ('utc_nanoseconds', '<u4'),
 */
  __pyx_tuple__363 = PyTuple_Pack(2, __pyx_n_s_n_packets, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__363)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__363);
  __Pyx_GIVEREF(__pyx_tuple__363);

  /* "km3pipe/dataclasses.pyx":331
 *         ('max_sequence_number', '<u4'),
 *         ('n_packets', '<u4'),
 *         ('slice_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('utc_nanoseconds', '<u4'),
 *         ('utc_seconds', '<u4'),
 */
  __pyx_tuple__364 = PyTuple_Pack(2, __pyx_n_s_slice_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__364)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__364);
  __Pyx_GIVEREF(__pyx_tuple__364);

  /* "km3pipe/dataclasses.pyx":332
 *         ('n_packets', '<u4'),
 *         ('slice_id', '<u4'),
 *         ('utc_nanoseconds', '<u4'),             # <<<<<<<<<<<<<<
 *         ('utc_seconds', '<u4'),
 *         ('white_rabbit_status', '<u4'),
 */
  __pyx_tuple__365 = PyTuple_Pack(2, __pyx_n_s_utc_nanoseconds, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__365)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__365);
  __Pyx_GIVEREF(__pyx_tuple__365);

  /* "km3pipe/dataclasses.pyx":333
 *         ('slice_id', '<u4'),
 *         ('utc_nanoseconds', '<u4'),
 *         ('utc_seconds', '<u4'),             # <<<<<<<<<<<<<<
 *         ('white_rabbit_status', '<u4'),
 *     ])
 */
  __pyx_tuple__366 = PyTuple_Pack(2, __pyx_n_s_utc_seconds, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__366)) __PYX_ERR(0, 333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__366);
  __Pyx_GIVEREF(__pyx_tuple__366);

  /* "km3pipe/dataclasses.pyx":334
 *         ('utc_nanoseconds', '<u4'),
 *         ('utc_seconds', '<u4'),
 *         ('white_rabbit_status', '<u4'),             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
  __pyx_tuple__367 = PyTuple_Pack(2, __pyx_n_s_white_rabbit_status, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__367)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__367);
  __Pyx_GIVEREF(__pyx_tuple__367);

  /* "km3pipe/dataclasses.pyx":338
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */
  __pyx_tuple__368 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_row, __pyx_n_s_args, __pyx_n_s_col); if (unlikely(!__pyx_tuple__368)) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__368);
  __Pyx_GIVEREF(__pyx_tuple__368);
  __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__368, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_table, 338, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 338, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":348
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__369 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__369)) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__369);
  __Pyx_GIVEREF(__pyx_tuple__369);
  __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__369, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_deserialise, 348, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 348, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":351
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__370 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__370)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__370);
  __Pyx_GIVEREF(__pyx_tuple__370);
  __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__370, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_serialise, 351, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 351, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":355
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */
  __pyx_tuple__371 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_frame_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__371)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__371);
  __Pyx_GIVEREF(__pyx_tuple__371);
  __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__371, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_from, 355, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 355, __pyx_L1_error)
  __pyx_tuple__372 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__372)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__372);
  __Pyx_GIVEREF(__pyx_tuple__372);

  /* "km3pipe/dataclasses.pyx":359
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __pyx_tuple__373 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__373)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__373);
  __Pyx_GIVEREF(__pyx_tuple__373);
  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__373, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_to, 359, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 359, __pyx_L1_error)
  __pyx_tuple__374 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__374)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__374);
  __Pyx_GIVEREF(__pyx_tuple__374);

  /* "km3pipe/dataclasses.pyx":365
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 */
  __pyx_tuple__375 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__375)) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__375);
  __Pyx_GIVEREF(__pyx_tuple__375);
  __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__375, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_array, 365, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 365, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":373
 *         )], dtype=self.dtype)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Summaryslice frame #{0}:\n" \
 *                "    slice id:    {1}\n" \
 */
  __pyx_tuple__376 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__376)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__376);
  __Pyx_GIVEREF(__pyx_tuple__376);
  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__376, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_str, 373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 373, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":382
 *                        self.max_sequence_number)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__377 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__377)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__377);
  __Pyx_GIVEREF(__pyx_tuple__377);
  __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__377, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_insp, 382, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 382, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":385
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __pyx_tuple__378 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__378)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__378);
  __Pyx_GIVEREF(__pyx_tuple__378);
  __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__378, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_len_2, 385, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 385, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":389
 * 
 * 
 * class EventInfo(object):             # <<<<<<<<<<<<<<
 *     """Event Metadata.
 *     """
 */
  __pyx_tuple__379 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__379)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__379);
  __Pyx_GIVEREF(__pyx_tuple__379);

  /* "km3pipe/dataclasses.pyx":394
 *     h5loc = '/event_info'
 *     dtype = np.dtype([
 *         ('det_id', '<i4'),             # <<<<<<<<<<<<<<
 *         ('frame_index', '<u4'),
 *         ('livetime_sec', '<u8'),
 */
  __pyx_tuple__380 = PyTuple_Pack(2, __pyx_n_s_det_id, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__380)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__380);
  __Pyx_GIVEREF(__pyx_tuple__380);

  /* "km3pipe/dataclasses.pyx":395
 *     dtype = np.dtype([
 *         ('det_id', '<i4'),
 *         ('frame_index', '<u4'),             # <<<<<<<<<<<<<<
 *         ('livetime_sec', '<u8'),
 *         ('mc_id', '<i4'),
 */
  __pyx_tuple__381 = PyTuple_Pack(2, __pyx_n_s_frame_index, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__381)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__381);
  __Pyx_GIVEREF(__pyx_tuple__381);

  /* "km3pipe/dataclasses.pyx":396
 *         ('det_id', '<i4'),
 *         ('frame_index', '<u4'),
 *         ('livetime_sec', '<u8'),             # <<<<<<<<<<<<<<
 *         ('mc_id', '<i4'),
 *         ('mc_t', '<f8'),
 */
  __pyx_tuple__382 = PyTuple_Pack(2, __pyx_n_s_livetime_sec, __pyx_kp_s_u8); if (unlikely(!__pyx_tuple__382)) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__382);
  __Pyx_GIVEREF(__pyx_tuple__382);

  /* "km3pipe/dataclasses.pyx":397
 *         ('frame_index', '<u4'),
 *         ('livetime_sec', '<u8'),
 *         ('mc_id', '<i4'),             # <<<<<<<<<<<<<<
 *         ('mc_t', '<f8'),
 *         ('n_events_gen', '<u8'),
 */
  __pyx_tuple__383 = PyTuple_Pack(2, __pyx_n_s_mc_id, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__383)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__383);
  __Pyx_GIVEREF(__pyx_tuple__383);

  /* "km3pipe/dataclasses.pyx":398
 *         ('livetime_sec', '<u8'),
 *         ('mc_id', '<i4'),
 *         ('mc_t', '<f8'),             # <<<<<<<<<<<<<<
 *         ('n_events_gen', '<u8'),
 *         ('n_files_gen', '<u8'),
 */
  __pyx_tuple__384 = PyTuple_Pack(2, __pyx_n_s_mc_t, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__384)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__384);
  __Pyx_GIVEREF(__pyx_tuple__384);

  /* "km3pipe/dataclasses.pyx":399
 *         ('mc_id', '<i4'),
 *         ('mc_t', '<f8'),
 *         ('n_events_gen', '<u8'),             # <<<<<<<<<<<<<<
 *         ('n_files_gen', '<u8'),
 *         ('overlays', '<u4'),
 */
  __pyx_tuple__385 = PyTuple_Pack(2, __pyx_n_s_n_events_gen, __pyx_kp_s_u8); if (unlikely(!__pyx_tuple__385)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__385);
  __Pyx_GIVEREF(__pyx_tuple__385);

  /* "km3pipe/dataclasses.pyx":400
 *         ('mc_t', '<f8'),
 *         ('n_events_gen', '<u8'),
 *         ('n_files_gen', '<u8'),             # <<<<<<<<<<<<<<
 *         ('overlays', '<u4'),
 *         ('trigger_counter', '<u8'),
 */
  __pyx_tuple__386 = PyTuple_Pack(2, __pyx_n_s_n_files_gen, __pyx_kp_s_u8); if (unlikely(!__pyx_tuple__386)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__386);
  __Pyx_GIVEREF(__pyx_tuple__386);

  /* "km3pipe/dataclasses.pyx":401
 *         ('n_events_gen', '<u8'),
 *         ('n_files_gen', '<u8'),
 *         ('overlays', '<u4'),             # <<<<<<<<<<<<<<
 *         ('trigger_counter', '<u8'),
 *         ('trigger_mask', '<u8'),
 */
  __pyx_tuple__387 = PyTuple_Pack(2, __pyx_n_s_overlays, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__387)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__387);
  __Pyx_GIVEREF(__pyx_tuple__387);

  /* "km3pipe/dataclasses.pyx":402
 *         ('n_files_gen', '<u8'),
 *         ('overlays', '<u4'),
 *         ('trigger_counter', '<u8'),             # <<<<<<<<<<<<<<
 *         ('trigger_mask', '<u8'),
 *         ('utc_nanoseconds', '<u8'),
 */
  __pyx_tuple__388 = PyTuple_Pack(2, __pyx_n_s_trigger_counter, __pyx_kp_s_u8); if (unlikely(!__pyx_tuple__388)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__388);
  __Pyx_GIVEREF(__pyx_tuple__388);

  /* "km3pipe/dataclasses.pyx":403
 *         ('overlays', '<u4'),
 *         ('trigger_counter', '<u8'),
 *         ('trigger_mask', '<u8'),             # <<<<<<<<<<<<<<
 *         ('utc_nanoseconds', '<u8'),
 *         ('utc_seconds', '<u8'),
 */
  __pyx_tuple__389 = PyTuple_Pack(2, __pyx_n_s_trigger_mask, __pyx_kp_s_u8); if (unlikely(!__pyx_tuple__389)) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__389);
  __Pyx_GIVEREF(__pyx_tuple__389);

  /* "km3pipe/dataclasses.pyx":404
 *         ('trigger_counter', '<u8'),
 *         ('trigger_mask', '<u8'),
 *         ('utc_nanoseconds', '<u8'),             # <<<<<<<<<<<<<<
 *         ('utc_seconds', '<u8'),
 *         ('weight_w1', '<f8'),
 */
  __pyx_tuple__390 = PyTuple_Pack(2, __pyx_n_s_utc_nanoseconds, __pyx_kp_s_u8); if (unlikely(!__pyx_tuple__390)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__390);
  __Pyx_GIVEREF(__pyx_tuple__390);

  /* "km3pipe/dataclasses.pyx":405
 *         ('trigger_mask', '<u8'),
 *         ('utc_nanoseconds', '<u8'),
 *         ('utc_seconds', '<u8'),             # <<<<<<<<<<<<<<
 *         ('weight_w1', '<f8'),
 *         ('weight_w2', '<f8'),
 */
  __pyx_tuple__391 = PyTuple_Pack(2, __pyx_n_s_utc_seconds, __pyx_kp_s_u8); if (unlikely(!__pyx_tuple__391)) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__391);
  __Pyx_GIVEREF(__pyx_tuple__391);

  /* "km3pipe/dataclasses.pyx":406
 *         ('utc_nanoseconds', '<u8'),
 *         ('utc_seconds', '<u8'),
 *         ('weight_w1', '<f8'),             # <<<<<<<<<<<<<<
 *         ('weight_w2', '<f8'),
 *         ('weight_w3', '<f8'),
 */
  __pyx_tuple__392 = PyTuple_Pack(2, __pyx_n_s_weight_w1, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__392)) __PYX_ERR(0, 406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__392);
  __Pyx_GIVEREF(__pyx_tuple__392);

  /* "km3pipe/dataclasses.pyx":407
 *         ('utc_seconds', '<u8'),
 *         ('weight_w1', '<f8'),
 *         ('weight_w2', '<f8'),             # <<<<<<<<<<<<<<
 *         ('weight_w3', '<f8'),
 *         ('run_id', '<u8'),
 */
  __pyx_tuple__393 = PyTuple_Pack(2, __pyx_n_s_weight_w2, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__393)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__393);
  __Pyx_GIVEREF(__pyx_tuple__393);

  /* "km3pipe/dataclasses.pyx":408
 *         ('weight_w1', '<f8'),
 *         ('weight_w2', '<f8'),
 *         ('weight_w3', '<f8'),             # <<<<<<<<<<<<<<
 *         ('run_id', '<u8'),
 *         ('event_id', '<u4'),
 */
  __pyx_tuple__394 = PyTuple_Pack(2, __pyx_n_s_weight_w3, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__394)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__394);
  __Pyx_GIVEREF(__pyx_tuple__394);

  /* "km3pipe/dataclasses.pyx":409
 *         ('weight_w2', '<f8'),
 *         ('weight_w3', '<f8'),
 *         ('run_id', '<u8'),             # <<<<<<<<<<<<<<
 *         ('event_id', '<u4'),
 *     ])
 */
  __pyx_tuple__395 = PyTuple_Pack(2, __pyx_n_s_run_id, __pyx_kp_s_u8); if (unlikely(!__pyx_tuple__395)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__395);
  __Pyx_GIVEREF(__pyx_tuple__395);

  /* "km3pipe/dataclasses.pyx":410
 *         ('weight_w3', '<f8'),
 *         ('run_id', '<u8'),
 *         ('event_id', '<u4'),             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
  __pyx_tuple__396 = PyTuple_Pack(2, __pyx_n_s_event_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__396)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__396);
  __Pyx_GIVEREF(__pyx_tuple__396);

  /* "km3pipe/dataclasses.pyx":413
 *     ])
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         assert 'run_id' in arr.dtype.fields
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)
 */
  __pyx_tuple__397 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_arr_2, __pyx_n_s_h5loc, __pyx_n_s_col); if (unlikely(!__pyx_tuple__397)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__397);
  __Pyx_GIVEREF(__pyx_tuple__397);
  __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__397, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_init, 413, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 413, __pyx_L1_error)
  __pyx_tuple__398 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__398)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__398);
  __Pyx_GIVEREF(__pyx_tuple__398);

  /* "km3pipe/dataclasses.pyx":421
 * 
 *     @classmethod
 *     def from_row(cls, row, **kwargs):             # <<<<<<<<<<<<<<
 *         args = tuple((row[col] for col in cls.dtype.names))
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 */
  __pyx_tuple__399 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_row, __pyx_n_s_kwargs, __pyx_n_s_args, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__399)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__399);
  __Pyx_GIVEREF(__pyx_tuple__399);
  __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__399, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_row, 421, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 421, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":426
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__400 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__400)) __PYX_ERR(0, 426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__400);
  __Pyx_GIVEREF(__pyx_tuple__400);
  __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__400, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_deserialise, 426, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 426, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":429
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__401 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__401)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__401);
  __Pyx_GIVEREF(__pyx_tuple__401);
  __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__401, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_serialise, 429, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 429, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":433
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_row(data, **kwargs)
 */
  __pyx_tuple__402 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_event_id, __pyx_n_s_fmt, __pyx_n_s_h5loc, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__402)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__402);
  __Pyx_GIVEREF(__pyx_tuple__402);
  __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__402, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_from, 433, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 433, __pyx_L1_error)
  __pyx_tuple__403 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__403)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__403);
  __Pyx_GIVEREF(__pyx_tuple__403);

  /* "km3pipe/dataclasses.pyx":437
 *             return cls.from_row(data, **kwargs)
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __pyx_tuple__404 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_to, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__404)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__404);
  __Pyx_GIVEREF(__pyx_tuple__404);
  __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__404, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_to, 437, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 437, __pyx_L1_error)
  __pyx_tuple__405 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__405)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__405);
  __Pyx_GIVEREF(__pyx_tuple__405);

  /* "km3pipe/dataclasses.pyx":444
 *                                 **kwargs)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __pyx_tuple__406 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__406)) __PYX_ERR(0, 444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__406);
  __Pyx_GIVEREF(__pyx_tuple__406);
  __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__406, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_array, 444, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 444, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":447
 *         return self._arr
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Event #{0}:\n" \
 *                "    run id:          {10}\n" \
 */
  __pyx_tuple__407 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__407)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__407);
  __Pyx_GIVEREF(__pyx_tuple__407);
  __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__407, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_str, 447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 447, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":466
 *                        )
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__408 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__408)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__408);
  __Pyx_GIVEREF(__pyx_tuple__408);
  __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__408, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_repr, 466, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 466, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":469
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__409 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__409)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__409);
  __Pyx_GIVEREF(__pyx_tuple__409);
  __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__409, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_insp, 469, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 469, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":472
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __pyx_tuple__410 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__410)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__410);
  __Pyx_GIVEREF(__pyx_tuple__410);
  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__410, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_len_2, 472, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 472, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":478
 * class Point(np.ndarray):
 *     """Represents a point in a 3D space"""
 *     def __new__(cls, input_array=(np.nan, np.nan, np.nan)):             # <<<<<<<<<<<<<<
 *         """Add x, y and z to the ndarray"""
 *         obj = np.asarray(input_array).view(cls)
 */
  __pyx_tuple__411 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_input_array, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__411)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__411);
  __Pyx_GIVEREF(__pyx_tuple__411);
  __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__411, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_new, 478, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 478, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":484
 * 
 *     @property
 *     def x(self):             # <<<<<<<<<<<<<<
 *         return self[0]
 * 
 */
  __pyx_tuple__412 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__412)) __PYX_ERR(0, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__412);
  __Pyx_GIVEREF(__pyx_tuple__412);
  __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__412, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_x, 484, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 484, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":488
 * 
 *     @x.setter
 *     def x(self, value):             # <<<<<<<<<<<<<<
 *         self[0] = value
 * 
 */
  __pyx_tuple__413 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__413)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__413);
  __Pyx_GIVEREF(__pyx_tuple__413);
  __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__413, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_x, 488, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 488, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":492
 * 
 *     @property
 *     def y(self):             # <<<<<<<<<<<<<<
 *         return self[1]
 * 
 */
  __pyx_tuple__414 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__414)) __PYX_ERR(0, 492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__414);
  __Pyx_GIVEREF(__pyx_tuple__414);
  __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__414, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_y, 492, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 492, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":496
 * 
 *     @y.setter
 *     def y(self, value):             # <<<<<<<<<<<<<<
 *         self[1] = value
 * 
 */
  __pyx_tuple__415 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__415)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__415);
  __Pyx_GIVEREF(__pyx_tuple__415);
  __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__415, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_y, 496, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 496, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":500
 * 
 *     @property
 *     def z(self):             # <<<<<<<<<<<<<<
 *         return self[2]
 * 
 */
  __pyx_tuple__416 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__416)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__416);
  __Pyx_GIVEREF(__pyx_tuple__416);
  __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__416, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_z, 500, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 500, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":504
 * 
 *     @z.setter
 *     def z(self, value):             # <<<<<<<<<<<<<<
 *         self[2] = value
 * 
 */
  __pyx_tuple__417 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__417)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__417);
  __Pyx_GIVEREF(__pyx_tuple__417);
  __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__417, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_z, 504, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 504, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":835
 *     h5loc = '/raw_hits'
 *     dtype = np.dtype([
 *         ('channel_id', 'u1'),             # <<<<<<<<<<<<<<
 *         ('dom_id', '<u4'),
 *         ('time', '<f8'),
 */
  __pyx_tuple__418 = PyTuple_Pack(2, __pyx_n_s_channel_id, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__418)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__418);
  __Pyx_GIVEREF(__pyx_tuple__418);

  /* "km3pipe/dataclasses.pyx":836
 *     dtype = np.dtype([
 *         ('channel_id', 'u1'),
 *         ('dom_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('time', '<f8'),
 *         ('tot', 'u1'),
 */
  __pyx_tuple__419 = PyTuple_Pack(2, __pyx_n_s_dom_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__419)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__419);
  __Pyx_GIVEREF(__pyx_tuple__419);

  /* "km3pipe/dataclasses.pyx":837
 *         ('channel_id', 'u1'),
 *         ('dom_id', '<u4'),
 *         ('time', '<f8'),             # <<<<<<<<<<<<<<
 *         ('tot', 'u1'),
 *         ('triggered', 'u1'),
 */
  __pyx_tuple__420 = PyTuple_Pack(2, __pyx_n_s_time, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__420)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__420);
  __Pyx_GIVEREF(__pyx_tuple__420);

  /* "km3pipe/dataclasses.pyx":838
 *         ('dom_id', '<u4'),
 *         ('time', '<f8'),
 *         ('tot', 'u1'),             # <<<<<<<<<<<<<<
 *         ('triggered', 'u1'),
 *         ('event_id', '<u4')
 */
  __pyx_tuple__421 = PyTuple_Pack(2, __pyx_n_s_tot, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__421)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__421);
  __Pyx_GIVEREF(__pyx_tuple__421);

  /* "km3pipe/dataclasses.pyx":839
 *         ('time', '<f8'),
 *         ('tot', 'u1'),
 *         ('triggered', 'u1'),             # <<<<<<<<<<<<<<
 *         ('event_id', '<u4')
 *     ])
 */
  __pyx_tuple__422 = PyTuple_Pack(2, __pyx_n_s_triggered, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__422)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__422);
  __Pyx_GIVEREF(__pyx_tuple__422);

  /* "km3pipe/dataclasses.pyx":840
 *         ('tot', 'u1'),
 *         ('triggered', 'u1'),
 *         ('event_id', '<u4')             # <<<<<<<<<<<<<<
 *     ])
 *     write_separate_columns = True
 */
  __pyx_tuple__423 = PyTuple_Pack(2, __pyx_n_s_event_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__423)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__423);
  __Pyx_GIVEREF(__pyx_tuple__423);

  /* "km3pipe/dataclasses.pyx":844
 *     write_separate_columns = True
 * 
 *     def __init__(self, arr, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __pyx_tuple__424 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_arr_2, __pyx_n_s_event_id, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__424)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__424);
  __Pyx_GIVEREF(__pyx_tuple__424);
  __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__424, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_init, 844, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 844, __pyx_L1_error)
  __pyx_tuple__425 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__425)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__425);
  __Pyx_GIVEREF(__pyx_tuple__425);

  /* "km3pipe/dataclasses.pyx":853
 * 
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         try:
 *             return cls(np.array([(
 */
  __pyx_tuple__426 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_hits_2, __pyx_n_s_event_id, __pyx_n_s_h); if (unlikely(!__pyx_tuple__426)) __PYX_ERR(0, 853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__426);
  __Pyx_GIVEREF(__pyx_tuple__426);
  __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__426, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_aanet, 853, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 853, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":875
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dom_ids, times, tots, triggereds,             # <<<<<<<<<<<<<<
 *                     event_id):
 *         # do we need shape[0] or does len() work too?
 */
  __pyx_tuple__427 = PyTuple_Pack(9, __pyx_n_s_cls, __pyx_n_s_channel_ids, __pyx_n_s_dom_ids, __pyx_n_s_times, __pyx_n_s_tots, __pyx_n_s_triggereds, __pyx_n_s_event_id, __pyx_n_s_length, __pyx_n_s_hits_2); if (unlikely(!__pyx_tuple__427)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__427);
  __Pyx_GIVEREF(__pyx_tuple__427);
  __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(7, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__427, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_arrays, 875, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 875, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":892
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return RawHitSeries(self._arr[self._arr['triggered'] == True],
 *                             self.event_id)  # noqa
 */
  __pyx_tuple__428 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__428)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__428);
  __Pyx_GIVEREF(__pyx_tuple__428);
  __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__428, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_triggered_hits, 892, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 892, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":897
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__429 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__429)) __PYX_ERR(0, 897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__429);
  __Pyx_GIVEREF(__pyx_tuple__429);
  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__429, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_deserialise, 897, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 897, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":900
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__430 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__430)) __PYX_ERR(0, 900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__430);
  __Pyx_GIVEREF(__pyx_tuple__430);
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__430, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_serialise, 900, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 900, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":904
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls(data, event_id)
 */
  __pyx_tuple__431 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_event_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__431)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__431);
  __Pyx_GIVEREF(__pyx_tuple__431);
  __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__431, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_from, 904, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 904, __pyx_L1_error)
  __pyx_tuple__432 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__432)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__432);
  __Pyx_GIVEREF(__pyx_tuple__432);

  /* "km3pipe/dataclasses.pyx":910
 *             return cls(data.to_records(index=False), event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __pyx_tuple__433 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__433)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__433);
  __Pyx_GIVEREF(__pyx_tuple__433);
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__433, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_to, 910, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 910, __pyx_L1_error)
  __pyx_tuple__434 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__434)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__434);
  __Pyx_GIVEREF(__pyx_tuple__434);

  /* "km3pipe/dataclasses.pyx":916
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __pyx_tuple__435 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__435)) __PYX_ERR(0, 916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__435);
  __Pyx_GIVEREF(__pyx_tuple__435);
  __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__435, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_array, 916, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 916, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":919
 *         return self._arr
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __pyx_tuple__436 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__436)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__436);
  __Pyx_GIVEREF(__pyx_tuple__436);
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__436, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_next_2, 919, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 919, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":923
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __pyx_tuple__437 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_hit); if (unlikely(!__pyx_tuple__437)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__437);
  __Pyx_GIVEREF(__pyx_tuple__437);
  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__437, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_next, 923, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 923, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":931
 *         return hit
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             # element = AttrVoid(self._arr[index])  # TODO: MemoryLeak
 */
  __pyx_tuple__438 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_hit, __pyx_n_s_new_2); if (unlikely(!__pyx_tuple__438)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__438);
  __Pyx_GIVEREF(__pyx_tuple__438);
  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__438, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_getitem, 931, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 931, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":940
 *         return new
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__439 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__439)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__439);
  __Pyx_GIVEREF(__pyx_tuple__439);
  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__439, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_iter, 940, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 940, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":943
 *         return self
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __pyx_tuple__440 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__440)) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__440);
  __Pyx_GIVEREF(__pyx_tuple__440);
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__440, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_len_2, 943, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 943, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":946
 *         return self._arr.shape[0]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */
  __pyx_tuple__441 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n_hits, __pyx_n_s_plural); if (unlikely(!__pyx_tuple__441)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__441);
  __Pyx_GIVEREF(__pyx_tuple__441);
  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__441, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_str, 946, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 946, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":951
 *         return("RawHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__442 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__442)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__442);
  __Pyx_GIVEREF(__pyx_tuple__442);
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__442, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_repr, 951, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 951, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":954
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */
  __pyx_tuple__443 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_hit); if (unlikely(!__pyx_tuple__443)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__443);
  __Pyx_GIVEREF(__pyx_tuple__443);
  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__443, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_insp, 954, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 954, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":962
 *     h5loc = '/hits'
 *     dtype = np.dtype([
 *         ('channel_id', 'u1'),             # <<<<<<<<<<<<<<
 *         ('dir_x', '<f4'),
 *         ('dir_y', '<f4'),
 */
  __pyx_tuple__444 = PyTuple_Pack(2, __pyx_n_s_channel_id, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__444)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__444);
  __Pyx_GIVEREF(__pyx_tuple__444);

  /* "km3pipe/dataclasses.pyx":963
 *     dtype = np.dtype([
 *         ('channel_id', 'u1'),
 *         ('dir_x', '<f4'),             # <<<<<<<<<<<<<<
 *         ('dir_y', '<f4'),
 *         ('dir_z', '<f4'),
 */
  __pyx_tuple__445 = PyTuple_Pack(2, __pyx_n_s_dir_x, __pyx_kp_s_f4); if (unlikely(!__pyx_tuple__445)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__445);
  __Pyx_GIVEREF(__pyx_tuple__445);

  /* "km3pipe/dataclasses.pyx":964
 *         ('channel_id', 'u1'),
 *         ('dir_x', '<f4'),
 *         ('dir_y', '<f4'),             # <<<<<<<<<<<<<<
 *         ('dir_z', '<f4'),
 *         ('dom_id', '<u4'),
 */
  __pyx_tuple__446 = PyTuple_Pack(2, __pyx_n_s_dir_y, __pyx_kp_s_f4); if (unlikely(!__pyx_tuple__446)) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__446);
  __Pyx_GIVEREF(__pyx_tuple__446);

  /* "km3pipe/dataclasses.pyx":965
 *         ('dir_x', '<f4'),
 *         ('dir_y', '<f4'),
 *         ('dir_z', '<f4'),             # <<<<<<<<<<<<<<
 *         ('dom_id', '<u4'),
 *         ('du', 'u1'),
 */
  __pyx_tuple__447 = PyTuple_Pack(2, __pyx_n_s_dir_z, __pyx_kp_s_f4); if (unlikely(!__pyx_tuple__447)) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__447);
  __Pyx_GIVEREF(__pyx_tuple__447);

  /* "km3pipe/dataclasses.pyx":966
 *         ('dir_y', '<f4'),
 *         ('dir_z', '<f4'),
 *         ('dom_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('du', 'u1'),
 *         ('floor', 'u1'),
 */
  __pyx_tuple__448 = PyTuple_Pack(2, __pyx_n_s_dom_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__448)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__448);
  __Pyx_GIVEREF(__pyx_tuple__448);

  /* "km3pipe/dataclasses.pyx":967
 *         ('dir_z', '<f4'),
 *         ('dom_id', '<u4'),
 *         ('du', 'u1'),             # <<<<<<<<<<<<<<
 *         ('floor', 'u1'),
 *         ('pos_x', '<f4'),
 */
  __pyx_tuple__449 = PyTuple_Pack(2, __pyx_n_s_du, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__449)) __PYX_ERR(0, 967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__449);
  __Pyx_GIVEREF(__pyx_tuple__449);

  /* "km3pipe/dataclasses.pyx":968
 *         ('dom_id', '<u4'),
 *         ('du', 'u1'),
 *         ('floor', 'u1'),             # <<<<<<<<<<<<<<
 *         ('pos_x', '<f4'),
 *         ('pos_y', '<f4'),
 */
  __pyx_tuple__450 = PyTuple_Pack(2, __pyx_n_s_floor, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__450)) __PYX_ERR(0, 968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__450);
  __Pyx_GIVEREF(__pyx_tuple__450);

  /* "km3pipe/dataclasses.pyx":969
 *         ('du', 'u1'),
 *         ('floor', 'u1'),
 *         ('pos_x', '<f4'),             # <<<<<<<<<<<<<<
 *         ('pos_y', '<f4'),
 *         ('pos_z', '<f4'),
 */
  __pyx_tuple__451 = PyTuple_Pack(2, __pyx_n_s_pos_x, __pyx_kp_s_f4); if (unlikely(!__pyx_tuple__451)) __PYX_ERR(0, 969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__451);
  __Pyx_GIVEREF(__pyx_tuple__451);

  /* "km3pipe/dataclasses.pyx":970
 *         ('floor', 'u1'),
 *         ('pos_x', '<f4'),
 *         ('pos_y', '<f4'),             # <<<<<<<<<<<<<<
 *         ('pos_z', '<f4'),
 *         ('t0', '<f4'),
 */
  __pyx_tuple__452 = PyTuple_Pack(2, __pyx_n_s_pos_y, __pyx_kp_s_f4); if (unlikely(!__pyx_tuple__452)) __PYX_ERR(0, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__452);
  __Pyx_GIVEREF(__pyx_tuple__452);

  /* "km3pipe/dataclasses.pyx":971
 *         ('pos_x', '<f4'),
 *         ('pos_y', '<f4'),
 *         ('pos_z', '<f4'),             # <<<<<<<<<<<<<<
 *         ('t0', '<f4'),
 *         ('time', '<f8'),
 */
  __pyx_tuple__453 = PyTuple_Pack(2, __pyx_n_s_pos_z, __pyx_kp_s_f4); if (unlikely(!__pyx_tuple__453)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__453);
  __Pyx_GIVEREF(__pyx_tuple__453);

  /* "km3pipe/dataclasses.pyx":972
 *         ('pos_y', '<f4'),
 *         ('pos_z', '<f4'),
 *         ('t0', '<f4'),             # <<<<<<<<<<<<<<
 *         ('time', '<f8'),
 *         ('tot', 'u1'),
 */
  __pyx_tuple__454 = PyTuple_Pack(2, __pyx_n_s_t0, __pyx_kp_s_f4); if (unlikely(!__pyx_tuple__454)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__454);
  __Pyx_GIVEREF(__pyx_tuple__454);

  /* "km3pipe/dataclasses.pyx":973
 *         ('pos_z', '<f4'),
 *         ('t0', '<f4'),
 *         ('time', '<f8'),             # <<<<<<<<<<<<<<
 *         ('tot', 'u1'),
 *         ('triggered', 'u1'),
 */
  __pyx_tuple__455 = PyTuple_Pack(2, __pyx_n_s_time, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__455)) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__455);
  __Pyx_GIVEREF(__pyx_tuple__455);

  /* "km3pipe/dataclasses.pyx":974
 *         ('t0', '<f4'),
 *         ('time', '<f8'),
 *         ('tot', 'u1'),             # <<<<<<<<<<<<<<
 *         ('triggered', 'u1'),
 *         ('event_id', '<u4')
 */
  __pyx_tuple__456 = PyTuple_Pack(2, __pyx_n_s_tot, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__456)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__456);
  __Pyx_GIVEREF(__pyx_tuple__456);

  /* "km3pipe/dataclasses.pyx":975
 *         ('time', '<f8'),
 *         ('tot', 'u1'),
 *         ('triggered', 'u1'),             # <<<<<<<<<<<<<<
 *         ('event_id', '<u4')
 *     ])
 */
  __pyx_tuple__457 = PyTuple_Pack(2, __pyx_n_s_triggered, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__457)) __PYX_ERR(0, 975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__457);
  __Pyx_GIVEREF(__pyx_tuple__457);

  /* "km3pipe/dataclasses.pyx":976
 *         ('tot', 'u1'),
 *         ('triggered', 'u1'),
 *         ('event_id', '<u4')             # <<<<<<<<<<<<<<
 *     ])
 *     write_separate_columns = True
 */
  __pyx_tuple__458 = PyTuple_Pack(2, __pyx_n_s_event_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__458)) __PYX_ERR(0, 976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__458);
  __Pyx_GIVEREF(__pyx_tuple__458);

  /* "km3pipe/dataclasses.pyx":980
 *     write_separate_columns = True
 * 
 *     def __init__(self, arr, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __pyx_tuple__459 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_arr_2, __pyx_n_s_event_id, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__459)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__459);
  __Pyx_GIVEREF(__pyx_tuple__459);
  __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__459, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_init, 980, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 980, __pyx_L1_error)
  __pyx_tuple__460 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__460)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__460);
  __Pyx_GIVEREF(__pyx_tuple__460);

  /* "km3pipe/dataclasses.pyx":987
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, dus,             # <<<<<<<<<<<<<<
 *                     floors, pos_xs, pos_ys, pos_zs, t0s, times, tots,
 *                     triggereds, event_id):
 */
  __pyx_tuple__461 = PyTuple_Pack(18, __pyx_n_s_cls, __pyx_n_s_channel_ids, __pyx_n_s_dir_xs, __pyx_n_s_dir_ys, __pyx_n_s_dir_zs, __pyx_n_s_dom_ids, __pyx_n_s_dus, __pyx_n_s_floors, __pyx_n_s_pos_xs, __pyx_n_s_pos_ys, __pyx_n_s_pos_zs, __pyx_n_s_t0s, __pyx_n_s_times, __pyx_n_s_tots, __pyx_n_s_triggereds, __pyx_n_s_event_id, __pyx_n_s_length, __pyx_n_s_hits_2); if (unlikely(!__pyx_tuple__461)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__461);
  __Pyx_GIVEREF(__pyx_tuple__461);
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(16, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__461, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_arrays, 987, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 987, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1014
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return CRawHitSeries(self._arr[self._arr['triggered'] == True],
 *                             self.event_id)  # noqa
 */
  __pyx_tuple__462 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__462)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__462);
  __Pyx_GIVEREF(__pyx_tuple__462);
  __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__462, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_triggered_hits, 1014, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 1014, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1019
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__463 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__463)) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__463);
  __Pyx_GIVEREF(__pyx_tuple__463);
  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__463, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_deserialise, 1019, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 1019, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1022
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__464 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__464)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__464);
  __Pyx_GIVEREF(__pyx_tuple__464);
  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__464, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_serialise, 1022, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 1022, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1026
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls(data, event_id)
 */
  __pyx_tuple__465 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_event_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__465)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__465);
  __Pyx_GIVEREF(__pyx_tuple__465);
  __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__465, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_from, 1026, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __pyx_tuple__466 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__466)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__466);
  __Pyx_GIVEREF(__pyx_tuple__466);

  /* "km3pipe/dataclasses.pyx":1032
 *             return cls(data.to_records(index=False), event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __pyx_tuple__467 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__467)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__467);
  __Pyx_GIVEREF(__pyx_tuple__467);
  __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__467, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_to, 1032, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __pyx_tuple__468 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__468)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__468);
  __Pyx_GIVEREF(__pyx_tuple__468);

  /* "km3pipe/dataclasses.pyx":1039
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return CRawHitSeries(self._arr[self._arr['triggered'] == True],
 *                              self.event_id)  # noqa
 */
  __pyx_tuple__469 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__469)) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__469);
  __Pyx_GIVEREF(__pyx_tuple__469);
  __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__469, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_triggered_hits, 1039, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 1039, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1043
 *                              self.event_id)  # noqa
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __pyx_tuple__470 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__470)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__470);
  __Pyx_GIVEREF(__pyx_tuple__470);
  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__470, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_array, 1043, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 1043, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1046
 *         return self._arr
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __pyx_tuple__471 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__471)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__471);
  __Pyx_GIVEREF(__pyx_tuple__471);
  __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__471, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_next_2, 1046, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 1046, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1050
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __pyx_tuple__472 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_hit); if (unlikely(!__pyx_tuple__472)) __PYX_ERR(0, 1050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__472);
  __Pyx_GIVEREF(__pyx_tuple__472);
  __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__472, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_next, 1050, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 1050, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1058
 *         return hit
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             hit = CRawHit(*self._arr[index])
 */
  __pyx_tuple__473 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_hit); if (unlikely(!__pyx_tuple__473)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__473);
  __Pyx_GIVEREF(__pyx_tuple__473);
  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__473, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_getitem, 1058, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 1058, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1064
 *         return self.__class__(self._arr[index], self.event_id)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__474 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__474)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__474);
  __Pyx_GIVEREF(__pyx_tuple__474);
  __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__474, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_iter, 1064, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 1064, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1067
 *         return self
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __pyx_tuple__475 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__475)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__475);
  __Pyx_GIVEREF(__pyx_tuple__475);
  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__475, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_len_2, 1067, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 1067, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1070
 *         return self._arr.shape[0]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */
  __pyx_tuple__476 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n_hits, __pyx_n_s_plural); if (unlikely(!__pyx_tuple__476)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__476);
  __Pyx_GIVEREF(__pyx_tuple__476);
  __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__476, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_str, 1070, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 1070, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1075
 *         return("CRawHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__477 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__477)) __PYX_ERR(0, 1075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__477);
  __Pyx_GIVEREF(__pyx_tuple__477);
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__477, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_repr, 1075, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 1075, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1142
 *     h5loc = '/mc_hits'
 *     dtype = np.dtype([
 *         ('a', 'f4'),             # <<<<<<<<<<<<<<
 *         ('origin', '<u4'),
 *         ('pmt_id', '<u4'),
 */
  __pyx_tuple__478 = PyTuple_Pack(2, __pyx_n_s_a, __pyx_n_s_f4_2); if (unlikely(!__pyx_tuple__478)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__478);
  __Pyx_GIVEREF(__pyx_tuple__478);

  /* "km3pipe/dataclasses.pyx":1143
 *     dtype = np.dtype([
 *         ('a', 'f4'),
 *         ('origin', '<u4'),             # <<<<<<<<<<<<<<
 *         ('pmt_id', '<u4'),
 *         ('time', 'f8'),
 */
  __pyx_tuple__479 = PyTuple_Pack(2, __pyx_n_s_origin, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__479)) __PYX_ERR(0, 1143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__479);
  __Pyx_GIVEREF(__pyx_tuple__479);

  /* "km3pipe/dataclasses.pyx":1144
 *         ('a', 'f4'),
 *         ('origin', '<u4'),
 *         ('pmt_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('time', 'f8'),
 *         ('event_id', '<u4'),
 */
  __pyx_tuple__480 = PyTuple_Pack(2, __pyx_n_s_pmt_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__480)) __PYX_ERR(0, 1144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__480);
  __Pyx_GIVEREF(__pyx_tuple__480);

  /* "km3pipe/dataclasses.pyx":1145
 *         ('origin', '<u4'),
 *         ('pmt_id', '<u4'),
 *         ('time', 'f8'),             # <<<<<<<<<<<<<<
 *         ('event_id', '<u4'),
 *     ])
 */
  __pyx_tuple__481 = PyTuple_Pack(2, __pyx_n_s_time, __pyx_n_s_f8_2); if (unlikely(!__pyx_tuple__481)) __PYX_ERR(0, 1145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__481);
  __Pyx_GIVEREF(__pyx_tuple__481);

  /* "km3pipe/dataclasses.pyx":1146
 *         ('pmt_id', '<u4'),
 *         ('time', 'f8'),
 *         ('event_id', '<u4'),             # <<<<<<<<<<<<<<
 *     ])
 *     write_separate_columns = True
 */
  __pyx_tuple__482 = PyTuple_Pack(2, __pyx_n_s_event_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__482)) __PYX_ERR(0, 1146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__482);
  __Pyx_GIVEREF(__pyx_tuple__482);

  /* "km3pipe/dataclasses.pyx":1150
 *     write_separate_columns = True
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __pyx_tuple__483 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_arr_2, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__483)) __PYX_ERR(0, 1150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__483);
  __Pyx_GIVEREF(__pyx_tuple__483);
  __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__483, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_init, 1150, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 1150, __pyx_L1_error)
  __pyx_tuple__484 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__484)) __PYX_ERR(0, 1150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__484);
  __Pyx_GIVEREF(__pyx_tuple__484);

  /* "km3pipe/dataclasses.pyx":1157
 * 
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             h.a,
 */
  __pyx_tuple__485 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_hits_2, __pyx_n_s_event_id, __pyx_n_s_h); if (unlikely(!__pyx_tuple__485)) __PYX_ERR(0, 1157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__485);
  __Pyx_GIVEREF(__pyx_tuple__485);
  __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__485, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_aanet, 1157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 1157, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1167
 * 
 *     @classmethod
 *     def from_evt(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             h.a,
 */
  __pyx_tuple__486 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_hits_2, __pyx_n_s_event_id, __pyx_n_s_h); if (unlikely(!__pyx_tuple__486)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__486);
  __Pyx_GIVEREF(__pyx_tuple__486);
  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__486, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_evt, 1167, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 1167, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1177
 * 
 *     @classmethod
 *     def from_arrays(cls, a, origin, pmt_id, time, event_id):             # <<<<<<<<<<<<<<
 *         # do we need shape[0] or does len() work too?
 *         try:
 */
  __pyx_tuple__487 = PyTuple_Pack(8, __pyx_n_s_cls, __pyx_n_s_a, __pyx_n_s_origin, __pyx_n_s_pmt_id, __pyx_n_s_time, __pyx_n_s_event_id, __pyx_n_s_length, __pyx_n_s_hits_2); if (unlikely(!__pyx_tuple__487)) __PYX_ERR(0, 1177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__487);
  __Pyx_GIVEREF(__pyx_tuple__487);
  __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(6, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__487, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_arrays, 1177, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 1177, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1192
 * 
 *     @classmethod
 *     def from_dict(cls, map, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = map['event_id']
 */
  __pyx_tuple__488 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_map, __pyx_n_s_event_id); if (unlikely(!__pyx_tuple__488)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__488);
  __Pyx_GIVEREF(__pyx_tuple__488);
  __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__488, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_dict, 1192, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 1192, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1204
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 */
  __pyx_tuple__489 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_table, __pyx_n_s_event_id, __pyx_n_s_row); if (unlikely(!__pyx_tuple__489)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__489);
  __Pyx_GIVEREF(__pyx_tuple__489);
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__489, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_table, 1204, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 1204, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1215
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__490 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__490)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__490);
  __Pyx_GIVEREF(__pyx_tuple__490);
  __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__490, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_deserialise, 1215, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 1215, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1218
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__491 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__491)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__491);
  __Pyx_GIVEREF(__pyx_tuple__491);
  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__491, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_serialise, 1218, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 1218, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1222
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 */
  __pyx_tuple__492 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_event_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__492)) __PYX_ERR(0, 1222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__492);
  __Pyx_GIVEREF(__pyx_tuple__492);
  __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__492, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_from, 1222, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 1222, __pyx_L1_error)
  __pyx_tuple__493 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__493)) __PYX_ERR(0, 1222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__493);
  __Pyx_GIVEREF(__pyx_tuple__493);

  /* "km3pipe/dataclasses.pyx":1229
 *             return cls(data.to_records(index=False))
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __pyx_tuple__494 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__494)) __PYX_ERR(0, 1229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__494);
  __Pyx_GIVEREF(__pyx_tuple__494);
  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__494, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_to, 1229, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 1229, __pyx_L1_error)
  __pyx_tuple__495 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__495)) __PYX_ERR(0, 1229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__495);
  __Pyx_GIVEREF(__pyx_tuple__495);

  /* "km3pipe/dataclasses.pyx":1235
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __pyx_tuple__496 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__496)) __PYX_ERR(0, 1235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__496);
  __Pyx_GIVEREF(__pyx_tuple__496);
  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__496, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_array, 1235, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 1235, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1238
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__497 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__497)) __PYX_ERR(0, 1238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__497);
  __Pyx_GIVEREF(__pyx_tuple__497);
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__497, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_iter, 1238, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 1238, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1241
 *         return self
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __pyx_tuple__498 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__498)) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__498);
  __Pyx_GIVEREF(__pyx_tuple__498);
  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__498, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_next_2, 1241, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 1241, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1245
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __pyx_tuple__499 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_hit); if (unlikely(!__pyx_tuple__499)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__499);
  __Pyx_GIVEREF(__pyx_tuple__499);
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__499, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_next, 1245, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 1245, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1253
 *         return hit
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __pyx_tuple__500 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__500)) __PYX_ERR(0, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__500);
  __Pyx_GIVEREF(__pyx_tuple__500);
  __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__500, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_len_2, 1253, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 1253, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1256
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return McHit(*self._arr[index])
 */
  __pyx_tuple__501 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_index); if (unlikely(!__pyx_tuple__501)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__501);
  __Pyx_GIVEREF(__pyx_tuple__501);
  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__501, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_getitem, 1256, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 1256, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1261
 *         return self.__class__(self._arr[index], self.event_id)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */
  __pyx_tuple__502 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n_hits, __pyx_n_s_plural); if (unlikely(!__pyx_tuple__502)) __PYX_ERR(0, 1261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__502);
  __Pyx_GIVEREF(__pyx_tuple__502);
  __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__502, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_str, 1261, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 1261, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1266
 *         return("McHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__503 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__503)) __PYX_ERR(0, 1266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__503);
  __Pyx_GIVEREF(__pyx_tuple__503);
  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__503, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_repr, 1266, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 1266, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1269
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */
  __pyx_tuple__504 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_hit); if (unlikely(!__pyx_tuple__504)) __PYX_ERR(0, 1269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__504);
  __Pyx_GIVEREF(__pyx_tuple__504);
  __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__504, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_insp, 1269, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 1269, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1278
 *     h5loc = '/mc_hits'
 *     dtype = np.dtype([
 *         ('a', 'f4'),             # <<<<<<<<<<<<<<
 *         ('dir_x', '<f4'),
 *         ('dir_y', '<f4'),
 */
  __pyx_tuple__505 = PyTuple_Pack(2, __pyx_n_s_a, __pyx_n_s_f4_2); if (unlikely(!__pyx_tuple__505)) __PYX_ERR(0, 1278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__505);
  __Pyx_GIVEREF(__pyx_tuple__505);

  /* "km3pipe/dataclasses.pyx":1279
 *     dtype = np.dtype([
 *         ('a', 'f4'),
 *         ('dir_x', '<f4'),             # <<<<<<<<<<<<<<
 *         ('dir_y', '<f4'),
 *         ('dir_z', '<f4'),
 */
  __pyx_tuple__506 = PyTuple_Pack(2, __pyx_n_s_dir_x, __pyx_kp_s_f4); if (unlikely(!__pyx_tuple__506)) __PYX_ERR(0, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__506);
  __Pyx_GIVEREF(__pyx_tuple__506);

  /* "km3pipe/dataclasses.pyx":1280
 *         ('a', 'f4'),
 *         ('dir_x', '<f4'),
 *         ('dir_y', '<f4'),             # <<<<<<<<<<<<<<
 *         ('dir_z', '<f4'),
 *         ('origin', '<u4'),
 */
  __pyx_tuple__507 = PyTuple_Pack(2, __pyx_n_s_dir_y, __pyx_kp_s_f4); if (unlikely(!__pyx_tuple__507)) __PYX_ERR(0, 1280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__507);
  __Pyx_GIVEREF(__pyx_tuple__507);

  /* "km3pipe/dataclasses.pyx":1281
 *         ('dir_x', '<f4'),
 *         ('dir_y', '<f4'),
 *         ('dir_z', '<f4'),             # <<<<<<<<<<<<<<
 *         ('origin', '<u4'),
 *         ('pmt_id', '<u4'),
 */
  __pyx_tuple__508 = PyTuple_Pack(2, __pyx_n_s_dir_z, __pyx_kp_s_f4); if (unlikely(!__pyx_tuple__508)) __PYX_ERR(0, 1281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__508);
  __Pyx_GIVEREF(__pyx_tuple__508);

  /* "km3pipe/dataclasses.pyx":1282
 *         ('dir_y', '<f4'),
 *         ('dir_z', '<f4'),
 *         ('origin', '<u4'),             # <<<<<<<<<<<<<<
 *         ('pmt_id', '<u4'),
 *         ('pos_x', '<f4'),
 */
  __pyx_tuple__509 = PyTuple_Pack(2, __pyx_n_s_origin, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__509)) __PYX_ERR(0, 1282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__509);
  __Pyx_GIVEREF(__pyx_tuple__509);

  /* "km3pipe/dataclasses.pyx":1283
 *         ('dir_z', '<f4'),
 *         ('origin', '<u4'),
 *         ('pmt_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('pos_x', '<f4'),
 *         ('pos_y', '<f4'),
 */
  __pyx_tuple__510 = PyTuple_Pack(2, __pyx_n_s_pmt_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__510)) __PYX_ERR(0, 1283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__510);
  __Pyx_GIVEREF(__pyx_tuple__510);

  /* "km3pipe/dataclasses.pyx":1284
 *         ('origin', '<u4'),
 *         ('pmt_id', '<u4'),
 *         ('pos_x', '<f4'),             # <<<<<<<<<<<<<<
 *         ('pos_y', '<f4'),
 *         ('pos_z', '<f4'),
 */
  __pyx_tuple__511 = PyTuple_Pack(2, __pyx_n_s_pos_x, __pyx_kp_s_f4); if (unlikely(!__pyx_tuple__511)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__511);
  __Pyx_GIVEREF(__pyx_tuple__511);

  /* "km3pipe/dataclasses.pyx":1285
 *         ('pmt_id', '<u4'),
 *         ('pos_x', '<f4'),
 *         ('pos_y', '<f4'),             # <<<<<<<<<<<<<<
 *         ('pos_z', '<f4'),
 *         ('time', 'f8'),
 */
  __pyx_tuple__512 = PyTuple_Pack(2, __pyx_n_s_pos_y, __pyx_kp_s_f4); if (unlikely(!__pyx_tuple__512)) __PYX_ERR(0, 1285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__512);
  __Pyx_GIVEREF(__pyx_tuple__512);

  /* "km3pipe/dataclasses.pyx":1286
 *         ('pos_x', '<f4'),
 *         ('pos_y', '<f4'),
 *         ('pos_z', '<f4'),             # <<<<<<<<<<<<<<
 *         ('time', 'f8'),
 *         ('event_id', '<u4'),
 */
  __pyx_tuple__513 = PyTuple_Pack(2, __pyx_n_s_pos_z, __pyx_kp_s_f4); if (unlikely(!__pyx_tuple__513)) __PYX_ERR(0, 1286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__513);
  __Pyx_GIVEREF(__pyx_tuple__513);

  /* "km3pipe/dataclasses.pyx":1287
 *         ('pos_y', '<f4'),
 *         ('pos_z', '<f4'),
 *         ('time', 'f8'),             # <<<<<<<<<<<<<<
 *         ('event_id', '<u4'),
 *     ])
 */
  __pyx_tuple__514 = PyTuple_Pack(2, __pyx_n_s_time, __pyx_n_s_f8_2); if (unlikely(!__pyx_tuple__514)) __PYX_ERR(0, 1287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__514);
  __Pyx_GIVEREF(__pyx_tuple__514);

  /* "km3pipe/dataclasses.pyx":1288
 *         ('pos_z', '<f4'),
 *         ('time', 'f8'),
 *         ('event_id', '<u4'),             # <<<<<<<<<<<<<<
 *     ])
 *     write_separate_columns = True
 */
  __pyx_tuple__515 = PyTuple_Pack(2, __pyx_n_s_event_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__515)) __PYX_ERR(0, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__515);
  __Pyx_GIVEREF(__pyx_tuple__515);

  /* "km3pipe/dataclasses.pyx":1292
 *     write_separate_columns = True
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __pyx_tuple__516 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_arr_2, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__516)) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__516);
  __Pyx_GIVEREF(__pyx_tuple__516);
  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__516, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_init, 1292, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 1292, __pyx_L1_error)
  __pyx_tuple__517 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__517)) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__517);
  __Pyx_GIVEREF(__pyx_tuple__517);

  /* "km3pipe/dataclasses.pyx":1299
 * 
 *     @classmethod
 *     def from_arrays(cls, a, dir_x, dir_y, dir_z, origin,             # <<<<<<<<<<<<<<
 *                     pmt_id, pos_x, pos_y, pos_z, time, event_id):
 *         # do we need shape[0] or does len() work too?
 */
  __pyx_tuple__518 = PyTuple_Pack(14, __pyx_n_s_cls, __pyx_n_s_a, __pyx_n_s_dir_x, __pyx_n_s_dir_y, __pyx_n_s_dir_z, __pyx_n_s_origin, __pyx_n_s_pmt_id, __pyx_n_s_pos_x, __pyx_n_s_pos_y, __pyx_n_s_pos_z, __pyx_n_s_time, __pyx_n_s_event_id, __pyx_n_s_length, __pyx_n_s_hits_2); if (unlikely(!__pyx_tuple__518)) __PYX_ERR(0, 1299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__518);
  __Pyx_GIVEREF(__pyx_tuple__518);
  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(12, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__518, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_arrays, 1299, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 1299, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1321
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__519 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__519)) __PYX_ERR(0, 1321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__519);
  __Pyx_GIVEREF(__pyx_tuple__519);
  __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__519, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_deserialise, 1321, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 1321, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1324
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__520 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__520)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__520);
  __Pyx_GIVEREF(__pyx_tuple__520);
  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__520, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_serialise, 1324, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 1324, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1328
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 */
  __pyx_tuple__521 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_event_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__521)) __PYX_ERR(0, 1328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__521);
  __Pyx_GIVEREF(__pyx_tuple__521);
  __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__521, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_from, 1328, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 1328, __pyx_L1_error)
  __pyx_tuple__522 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__522)) __PYX_ERR(0, 1328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__522);
  __Pyx_GIVEREF(__pyx_tuple__522);

  /* "km3pipe/dataclasses.pyx":1335
 *             return cls(data.to_records(index=False))
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __pyx_tuple__523 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__523)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__523);
  __Pyx_GIVEREF(__pyx_tuple__523);
  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__523, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_to, 1335, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __pyx_tuple__524 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__524)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__524);
  __Pyx_GIVEREF(__pyx_tuple__524);

  /* "km3pipe/dataclasses.pyx":1341
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __pyx_tuple__525 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__525)) __PYX_ERR(0, 1341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__525);
  __Pyx_GIVEREF(__pyx_tuple__525);
  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__525, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_array, 1341, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 1341, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1344
 *         return self._arr
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __pyx_tuple__526 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__526)) __PYX_ERR(0, 1344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__526);
  __Pyx_GIVEREF(__pyx_tuple__526);
  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__526, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_len_2, 1344, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 1344, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1347
 *         return self._arr.shape[0]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */
  __pyx_tuple__527 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n_hits, __pyx_n_s_plural); if (unlikely(!__pyx_tuple__527)) __PYX_ERR(0, 1347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__527);
  __Pyx_GIVEREF(__pyx_tuple__527);
  __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__527, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_str, 1347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 1347, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1352
 *         return("CMcHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__528 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__528)) __PYX_ERR(0, 1352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__528);
  __Pyx_GIVEREF(__pyx_tuple__528);
  __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__528, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_repr, 1352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 1352, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1361
 *     h5loc = '/hits'
 *     dtype = np.dtype([
 *         ('channel_id', 'u1'),             # <<<<<<<<<<<<<<
 *         ('dir_x', '<f8'),
 *         ('dir_y', '<f8'),
 */
  __pyx_tuple__529 = PyTuple_Pack(2, __pyx_n_s_channel_id, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__529)) __PYX_ERR(0, 1361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__529);
  __Pyx_GIVEREF(__pyx_tuple__529);

  /* "km3pipe/dataclasses.pyx":1362
 *     dtype = np.dtype([
 *         ('channel_id', 'u1'),
 *         ('dir_x', '<f8'),             # <<<<<<<<<<<<<<
 *         ('dir_y', '<f8'),
 *         ('dir_z', '<f8'),
 */
  __pyx_tuple__530 = PyTuple_Pack(2, __pyx_n_s_dir_x, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__530)) __PYX_ERR(0, 1362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__530);
  __Pyx_GIVEREF(__pyx_tuple__530);

  /* "km3pipe/dataclasses.pyx":1363
 *         ('channel_id', 'u1'),
 *         ('dir_x', '<f8'),
 *         ('dir_y', '<f8'),             # <<<<<<<<<<<<<<
 *         ('dir_z', '<f8'),
 *         ('dom_id', '<u4'),
 */
  __pyx_tuple__531 = PyTuple_Pack(2, __pyx_n_s_dir_y, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__531)) __PYX_ERR(0, 1363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__531);
  __Pyx_GIVEREF(__pyx_tuple__531);

  /* "km3pipe/dataclasses.pyx":1364
 *         ('dir_x', '<f8'),
 *         ('dir_y', '<f8'),
 *         ('dir_z', '<f8'),             # <<<<<<<<<<<<<<
 *         ('dom_id', '<u4'),
 *         ('id', '<u4'),
 */
  __pyx_tuple__532 = PyTuple_Pack(2, __pyx_n_s_dir_z, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__532)) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__532);
  __Pyx_GIVEREF(__pyx_tuple__532);

  /* "km3pipe/dataclasses.pyx":1365
 *         ('dir_y', '<f8'),
 *         ('dir_z', '<f8'),
 *         ('dom_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('id', '<u4'),
 *         ('pmt_id', '<u4'),
 */
  __pyx_tuple__533 = PyTuple_Pack(2, __pyx_n_s_dom_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__533)) __PYX_ERR(0, 1365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__533);
  __Pyx_GIVEREF(__pyx_tuple__533);

  /* "km3pipe/dataclasses.pyx":1366
 *         ('dir_z', '<f8'),
 *         ('dom_id', '<u4'),
 *         ('id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('pmt_id', '<u4'),
 *         ('pos_x', '<f8'),
 */
  __pyx_tuple__534 = PyTuple_Pack(2, __pyx_n_s_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__534)) __PYX_ERR(0, 1366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__534);
  __Pyx_GIVEREF(__pyx_tuple__534);

  /* "km3pipe/dataclasses.pyx":1367
 *         ('dom_id', '<u4'),
 *         ('id', '<u4'),
 *         ('pmt_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('pos_x', '<f8'),
 *         ('pos_y', '<f8'),
 */
  __pyx_tuple__535 = PyTuple_Pack(2, __pyx_n_s_pmt_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__535)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__535);
  __Pyx_GIVEREF(__pyx_tuple__535);

  /* "km3pipe/dataclasses.pyx":1368
 *         ('id', '<u4'),
 *         ('pmt_id', '<u4'),
 *         ('pos_x', '<f8'),             # <<<<<<<<<<<<<<
 *         ('pos_y', '<f8'),
 *         ('pos_z', '<f8'),
 */
  __pyx_tuple__536 = PyTuple_Pack(2, __pyx_n_s_pos_x, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__536)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__536);
  __Pyx_GIVEREF(__pyx_tuple__536);

  /* "km3pipe/dataclasses.pyx":1369
 *         ('pmt_id', '<u4'),
 *         ('pos_x', '<f8'),
 *         ('pos_y', '<f8'),             # <<<<<<<<<<<<<<
 *         ('pos_z', '<f8'),
 *         ('t0', '<i4'),
 */
  __pyx_tuple__537 = PyTuple_Pack(2, __pyx_n_s_pos_y, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__537)) __PYX_ERR(0, 1369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__537);
  __Pyx_GIVEREF(__pyx_tuple__537);

  /* "km3pipe/dataclasses.pyx":1370
 *         ('pos_x', '<f8'),
 *         ('pos_y', '<f8'),
 *         ('pos_z', '<f8'),             # <<<<<<<<<<<<<<
 *         ('t0', '<i4'),
 *         ('time', '<i4'),
 */
  __pyx_tuple__538 = PyTuple_Pack(2, __pyx_n_s_pos_z, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__538)) __PYX_ERR(0, 1370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__538);
  __Pyx_GIVEREF(__pyx_tuple__538);

  /* "km3pipe/dataclasses.pyx":1371
 *         ('pos_y', '<f8'),
 *         ('pos_z', '<f8'),
 *         ('t0', '<i4'),             # <<<<<<<<<<<<<<
 *         ('time', '<i4'),
 *         ('tot', 'u1'),
 */
  __pyx_tuple__539 = PyTuple_Pack(2, __pyx_n_s_t0, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__539)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__539);
  __Pyx_GIVEREF(__pyx_tuple__539);

  /* "km3pipe/dataclasses.pyx":1372
 *         ('pos_z', '<f8'),
 *         ('t0', '<i4'),
 *         ('time', '<i4'),             # <<<<<<<<<<<<<<
 *         ('tot', 'u1'),
 *         ('triggered', 'u1'),
 */
  __pyx_tuple__540 = PyTuple_Pack(2, __pyx_n_s_time, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__540)) __PYX_ERR(0, 1372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__540);
  __Pyx_GIVEREF(__pyx_tuple__540);

  /* "km3pipe/dataclasses.pyx":1373
 *         ('t0', '<i4'),
 *         ('time', '<i4'),
 *         ('tot', 'u1'),             # <<<<<<<<<<<<<<
 *         ('triggered', 'u1'),
 *         ('event_id', '<u4'),
 */
  __pyx_tuple__541 = PyTuple_Pack(2, __pyx_n_s_tot, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__541)) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__541);
  __Pyx_GIVEREF(__pyx_tuple__541);

  /* "km3pipe/dataclasses.pyx":1374
 *         ('time', '<i4'),
 *         ('tot', 'u1'),
 *         ('triggered', 'u1'),             # <<<<<<<<<<<<<<
 *         ('event_id', '<u4'),
 *     ])
 */
  __pyx_tuple__542 = PyTuple_Pack(2, __pyx_n_s_triggered, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__542)) __PYX_ERR(0, 1374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__542);
  __Pyx_GIVEREF(__pyx_tuple__542);

  /* "km3pipe/dataclasses.pyx":1375
 *         ('tot', 'u1'),
 *         ('triggered', 'u1'),
 *         ('event_id', '<u4'),             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
  __pyx_tuple__543 = PyTuple_Pack(2, __pyx_n_s_event_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__543)) __PYX_ERR(0, 1375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__543);
  __Pyx_GIVEREF(__pyx_tuple__543);

  /* "km3pipe/dataclasses.pyx":1378
 *     ])
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __pyx_tuple__544 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_arr_2, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__544)) __PYX_ERR(0, 1378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__544);
  __Pyx_GIVEREF(__pyx_tuple__544);
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__544, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_init, 1378, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 1378, __pyx_L1_error)
  __pyx_tuple__545 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__545)) __PYX_ERR(0, 1378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__545);
  __Pyx_GIVEREF(__pyx_tuple__545);

  /* "km3pipe/dataclasses.pyx":1385
 * 
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         try:
 *             return cls(np.array([(
 */
  __pyx_tuple__546 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_hits_2, __pyx_n_s_event_id, __pyx_n_s_h); if (unlikely(!__pyx_tuple__546)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__546);
  __Pyx_GIVEREF(__pyx_tuple__546);
  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__546, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_aanet, 1385, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 1385, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1425
 * 
 *     @classmethod
 *     def from_evt(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             0,     # channel_id
 */
  __pyx_tuple__547 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_hits_2, __pyx_n_s_event_id, __pyx_n_s_h); if (unlikely(!__pyx_tuple__547)) __PYX_ERR(0, 1425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__547);
  __Pyx_GIVEREF(__pyx_tuple__547);
  __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__547, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_evt, 1425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 1425, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1445
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, ids,             # <<<<<<<<<<<<<<
 *                     pmt_ids, pos_xs, pos_ys, pos_zs, t0s, times, tots,
 *                     triggereds, event_id):
 */
  __pyx_tuple__548 = PyTuple_Pack(18, __pyx_n_s_cls, __pyx_n_s_channel_ids, __pyx_n_s_dir_xs, __pyx_n_s_dir_ys, __pyx_n_s_dir_zs, __pyx_n_s_dom_ids, __pyx_n_s_ids, __pyx_n_s_pmt_ids, __pyx_n_s_pos_xs, __pyx_n_s_pos_ys, __pyx_n_s_pos_zs, __pyx_n_s_t0s, __pyx_n_s_times, __pyx_n_s_tots, __pyx_n_s_triggereds, __pyx_n_s_event_id, __pyx_n_s_length, __pyx_n_s_hits_2); if (unlikely(!__pyx_tuple__548)) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__548);
  __Pyx_GIVEREF(__pyx_tuple__548);
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(16, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__548, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_arrays, 1445, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 1445, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1472
 * 
 *     @classmethod
 *     def from_dict(cls, map, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = map['event_id']
 */
  __pyx_tuple__549 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_map, __pyx_n_s_event_id); if (unlikely(!__pyx_tuple__549)) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__549);
  __Pyx_GIVEREF(__pyx_tuple__549);
  __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__549, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_dict, 1472, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(0, 1472, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1494
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 */
  __pyx_tuple__550 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_table, __pyx_n_s_event_id, __pyx_n_s_row); if (unlikely(!__pyx_tuple__550)) __PYX_ERR(0, 1494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__550);
  __Pyx_GIVEREF(__pyx_tuple__550);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__550, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_table, 1494, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 1494, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1515
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__551 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__551)) __PYX_ERR(0, 1515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__551);
  __Pyx_GIVEREF(__pyx_tuple__551);
  __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__551, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_deserialise, 1515, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 1515, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1518
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__552 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__552)) __PYX_ERR(0, 1518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__552);
  __Pyx_GIVEREF(__pyx_tuple__552);
  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__552, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_serialise, 1518, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 1518, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1522
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 */
  __pyx_tuple__553 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_event_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__553)) __PYX_ERR(0, 1522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__553);
  __Pyx_GIVEREF(__pyx_tuple__553);
  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__553, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_from, 1522, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 1522, __pyx_L1_error)
  __pyx_tuple__554 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__554)) __PYX_ERR(0, 1522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__554);
  __Pyx_GIVEREF(__pyx_tuple__554);

  /* "km3pipe/dataclasses.pyx":1529
 *             return cls(data.to_records(index=False))
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __pyx_tuple__555 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__555)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__555);
  __Pyx_GIVEREF(__pyx_tuple__555);
  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__555, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_to, 1529, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __pyx_tuple__556 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__556)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__556);
  __Pyx_GIVEREF(__pyx_tuple__556);

  /* "km3pipe/dataclasses.pyx":1535
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __pyx_tuple__557 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__557)) __PYX_ERR(0, 1535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__557);
  __Pyx_GIVEREF(__pyx_tuple__557);
  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__557, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_array, 1535, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 1535, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1538
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__558 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__558)) __PYX_ERR(0, 1538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__558);
  __Pyx_GIVEREF(__pyx_tuple__558);
  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__558, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_iter, 1538, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 1538, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1542
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return HitSeries(self._arr[self._arr['triggered'] == True])     # noqa
 * 
 */
  __pyx_tuple__559 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__559)) __PYX_ERR(0, 1542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__559);
  __Pyx_GIVEREF(__pyx_tuple__559);
  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__559, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_triggered_hits, 1542, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 1542, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1546
 * 
 *     @property
 *     def first_hits(self):             # <<<<<<<<<<<<<<
 *         h = self.conv_to(to='pandas')
 *         h.sort_values('time', inplace=True)
 */
  __pyx_tuple__560 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_h); if (unlikely(!__pyx_tuple__560)) __PYX_ERR(0, 1546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__560);
  __Pyx_GIVEREF(__pyx_tuple__560);
  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__560, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_first_hits, 1546, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 1546, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1552
 *         return HitSeries(h.to_records(index=False))
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __pyx_tuple__561 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__561)) __PYX_ERR(0, 1552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__561);
  __Pyx_GIVEREF(__pyx_tuple__561);
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__561, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_next_2, 1552, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 1552, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1556
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __pyx_tuple__562 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_hit); if (unlikely(!__pyx_tuple__562)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__562);
  __Pyx_GIVEREF(__pyx_tuple__562);
  __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__562, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_next, 1556, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 1556, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1564
 *         return hit
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __pyx_tuple__563 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__563)) __PYX_ERR(0, 1564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__563);
  __Pyx_GIVEREF(__pyx_tuple__563);
  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__563, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_len_2, 1564, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 1564, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1567
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return Hit(*self._arr[index])
 */
  __pyx_tuple__564 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_index); if (unlikely(!__pyx_tuple__564)) __PYX_ERR(0, 1567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__564);
  __Pyx_GIVEREF(__pyx_tuple__564);
  __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__564, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_getitem, 1567, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 1567, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1572
 *         return self.__class__(self._arr[index])
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */
  __pyx_tuple__565 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n_hits, __pyx_n_s_plural); if (unlikely(!__pyx_tuple__565)) __PYX_ERR(0, 1572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__565);
  __Pyx_GIVEREF(__pyx_tuple__565);
  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__565, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_str, 1572, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 1572, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1577
 *         return("HitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__566 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__566)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__566);
  __Pyx_GIVEREF(__pyx_tuple__566);
  __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__566, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_repr, 1577, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 1577, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1580
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */
  __pyx_tuple__567 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_hit); if (unlikely(!__pyx_tuple__567)) __PYX_ERR(0, 1580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__567);
  __Pyx_GIVEREF(__pyx_tuple__567);
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__567, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_insp, 1580, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 1580, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1589
 *     h5loc = '/time_slice_hits'
 *     dtype = np.dtype([
 *         ('channel_id', 'u1'),             # <<<<<<<<<<<<<<
 *         ('dom_id', '<u4'),
 *         ('time', '<i4'),
 */
  __pyx_tuple__568 = PyTuple_Pack(2, __pyx_n_s_channel_id, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__568)) __PYX_ERR(0, 1589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__568);
  __Pyx_GIVEREF(__pyx_tuple__568);

  /* "km3pipe/dataclasses.pyx":1590
 *     dtype = np.dtype([
 *         ('channel_id', 'u1'),
 *         ('dom_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('time', '<i4'),
 *         ('tot', 'u1'),
 */
  __pyx_tuple__569 = PyTuple_Pack(2, __pyx_n_s_dom_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__569)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__569);
  __Pyx_GIVEREF(__pyx_tuple__569);

  /* "km3pipe/dataclasses.pyx":1591
 *         ('channel_id', 'u1'),
 *         ('dom_id', '<u4'),
 *         ('time', '<i4'),             # <<<<<<<<<<<<<<
 *         ('tot', 'u1'),
 *     ])
 */
  __pyx_tuple__570 = PyTuple_Pack(2, __pyx_n_s_time, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__570)) __PYX_ERR(0, 1591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__570);
  __Pyx_GIVEREF(__pyx_tuple__570);

  /* "km3pipe/dataclasses.pyx":1592
 *         ('dom_id', '<u4'),
 *         ('time', '<i4'),
 *         ('tot', 'u1'),             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
  __pyx_tuple__571 = PyTuple_Pack(2, __pyx_n_s_tot, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__571)) __PYX_ERR(0, 1592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__571);
  __Pyx_GIVEREF(__pyx_tuple__571);

  /* "km3pipe/dataclasses.pyx":1595
 *     ])
 * 
 *     def __init__(self, arr, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __pyx_tuple__572 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_arr_2, __pyx_n_s_slice_id, __pyx_n_s_frame_id); if (unlikely(!__pyx_tuple__572)) __PYX_ERR(0, 1595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__572);
  __Pyx_GIVEREF(__pyx_tuple__572);
  __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__572, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_init, 1595, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(0, 1595, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1603
 * 
 *     @property
 *     def h5loc(self):             # <<<<<<<<<<<<<<
 *         return "/timeslices/slice_{0}".format(self.slice_id)
 * 
 */
  __pyx_tuple__573 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__573)) __PYX_ERR(0, 1603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__573);
  __Pyx_GIVEREF(__pyx_tuple__573);
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__573, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_h5loc, 1603, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 1603, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1607
 * 
 *     @property
 *     def tabname(self):             # <<<<<<<<<<<<<<
 *         return "frame_{0}".format(self.frame_id)
 * 
 */
  __pyx_tuple__574 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__574)) __PYX_ERR(0, 1607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__574);
  __Pyx_GIVEREF(__pyx_tuple__574);
  __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__574, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_tabname, 1607, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(0, 1607, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1611
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dom_ids, times, tots, slice_id,             # <<<<<<<<<<<<<<
 *                     frame_id):
 *         len = channel_ids.shape[0]
 */
  __pyx_tuple__575 = PyTuple_Pack(9, __pyx_n_s_cls, __pyx_n_s_channel_ids, __pyx_n_s_dom_ids, __pyx_n_s_times, __pyx_n_s_tots, __pyx_n_s_slice_id, __pyx_n_s_frame_id, __pyx_n_s_len, __pyx_n_s_hits_2); if (unlikely(!__pyx_tuple__575)) __PYX_ERR(0, 1611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__575);
  __Pyx_GIVEREF(__pyx_tuple__575);
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(7, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__575, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_arrays, 1611, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 1611, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1622
 * 
 *     @classmethod
 *     def from_dict(cls, map, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         return cls.from_arrays(
 *             map['channel_id'],
 */
  __pyx_tuple__576 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_map, __pyx_n_s_slice_id, __pyx_n_s_frame_id); if (unlikely(!__pyx_tuple__576)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__576);
  __Pyx_GIVEREF(__pyx_tuple__576);
  __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__576, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_dict, 1622, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(0, 1622, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1632
 *         )
 * 
 *     def from_table(cls, table, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             row['channel_id'],
 */
  __pyx_tuple__577 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_table, __pyx_n_s_slice_id, __pyx_n_s_frame_id, __pyx_n_s_row); if (unlikely(!__pyx_tuple__577)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__577);
  __Pyx_GIVEREF(__pyx_tuple__577);
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__577, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_table, 1632, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 1632, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1641
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__578 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__578)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__578);
  __Pyx_GIVEREF(__pyx_tuple__578);
  __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__578, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_deserialise, 1641, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) __PYX_ERR(0, 1641, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1644
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__579 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__579)) __PYX_ERR(0, 1644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__579);
  __Pyx_GIVEREF(__pyx_tuple__579);
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__579, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_serialise, 1644, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 1644, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1648
 * 
 *     @classmethod
 *     def conv_from(cls, data, slice_id, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, frame_id)
 */
  __pyx_tuple__580 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_slice_id, __pyx_n_s_frame_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__580)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__580);
  __Pyx_GIVEREF(__pyx_tuple__580);
  __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__580, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_from, 1648, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __pyx_tuple__581 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__581)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__581);
  __Pyx_GIVEREF(__pyx_tuple__581);

  /* "km3pipe/dataclasses.pyx":1653
 *             return cls(data, slice_id, frame_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __pyx_tuple__582 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__582)) __PYX_ERR(0, 1653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__582);
  __Pyx_GIVEREF(__pyx_tuple__582);
  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__582, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_to, 1653, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 1653, __pyx_L1_error)
  __pyx_tuple__583 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__583)) __PYX_ERR(0, 1653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__583);
  __Pyx_GIVEREF(__pyx_tuple__583);

  /* "km3pipe/dataclasses.pyx":1659
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __pyx_tuple__584 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__584)) __PYX_ERR(0, 1659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__584);
  __Pyx_GIVEREF(__pyx_tuple__584);
  __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__584, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_array, 1659, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(0, 1659, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1662
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__585 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__585)) __PYX_ERR(0, 1662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__585);
  __Pyx_GIVEREF(__pyx_tuple__585);
  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__585, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_iter, 1662, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 1662, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1665
 *         return self
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __pyx_tuple__586 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__586)) __PYX_ERR(0, 1665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__586);
  __Pyx_GIVEREF(__pyx_tuple__586);
  __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__586, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_next_2, 1665, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) __PYX_ERR(0, 1665, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1669
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __pyx_tuple__587 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_hits_2); if (unlikely(!__pyx_tuple__587)) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__587);
  __Pyx_GIVEREF(__pyx_tuple__587);
  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__587, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_next, 1669, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 1669, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1677
 *         return hits
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __pyx_tuple__588 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__588)) __PYX_ERR(0, 1677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__588);
  __Pyx_GIVEREF(__pyx_tuple__588);
  __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__588, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_len_2, 1677, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(0, 1677, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1680
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return TimesliceHit(*self._arr[index])
 */
  __pyx_tuple__589 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_index); if (unlikely(!__pyx_tuple__589)) __PYX_ERR(0, 1680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__589);
  __Pyx_GIVEREF(__pyx_tuple__589);
  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__589, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_getitem, 1680, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 1680, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1685
 *         return self.__class__(self._arr[index], self.slice_id, self.frame_id)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */
  __pyx_tuple__590 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n_hits, __pyx_n_s_plural); if (unlikely(!__pyx_tuple__590)) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__590);
  __Pyx_GIVEREF(__pyx_tuple__590);
  __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__590, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_str, 1685, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(0, 1685, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1690
 *         return("TimesliceHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__591 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__591)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__591);
  __Pyx_GIVEREF(__pyx_tuple__591);
  __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__591, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_repr, 1690, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 1690, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1693
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */
  __pyx_tuple__592 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_hit); if (unlikely(!__pyx_tuple__592)) __PYX_ERR(0, 1693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__592);
  __Pyx_GIVEREF(__pyx_tuple__592);
  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__592, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_insp, 1693, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(0, 1693, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1697
 * 
 * 
 * class McTrackSeries(object):             # <<<<<<<<<<<<<<
 *     """Collection of multiple McTracks.
 * 
 */
  __pyx_tuple__593 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__593)) __PYX_ERR(0, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__593);
  __Pyx_GIVEREF(__pyx_tuple__593);

  /* "km3pipe/dataclasses.pyx":1706
 *     h5loc = '/tracks'
 *     dtype = np.dtype([
 *         ('bjorkeny', '<f8'),             # <<<<<<<<<<<<<<
 *         ('dir_x', '<f8'),
 *         ('dir_y', '<f8'),
 */
  __pyx_tuple__594 = PyTuple_Pack(2, __pyx_n_s_bjorkeny, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__594)) __PYX_ERR(0, 1706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__594);
  __Pyx_GIVEREF(__pyx_tuple__594);

  /* "km3pipe/dataclasses.pyx":1707
 *     dtype = np.dtype([
 *         ('bjorkeny', '<f8'),
 *         ('dir_x', '<f8'),             # <<<<<<<<<<<<<<
 *         ('dir_y', '<f8'),
 *         ('dir_z', '<f8'),
 */
  __pyx_tuple__595 = PyTuple_Pack(2, __pyx_n_s_dir_x, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__595)) __PYX_ERR(0, 1707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__595);
  __Pyx_GIVEREF(__pyx_tuple__595);

  /* "km3pipe/dataclasses.pyx":1708
 *         ('bjorkeny', '<f8'),
 *         ('dir_x', '<f8'),
 *         ('dir_y', '<f8'),             # <<<<<<<<<<<<<<
 *         ('dir_z', '<f8'),
 *         ('energy', '<f8'),
 */
  __pyx_tuple__596 = PyTuple_Pack(2, __pyx_n_s_dir_y, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__596)) __PYX_ERR(0, 1708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__596);
  __Pyx_GIVEREF(__pyx_tuple__596);

  /* "km3pipe/dataclasses.pyx":1709
 *         ('dir_x', '<f8'),
 *         ('dir_y', '<f8'),
 *         ('dir_z', '<f8'),             # <<<<<<<<<<<<<<
 *         ('energy', '<f8'),
 *         ('id', '<u4'),
 */
  __pyx_tuple__597 = PyTuple_Pack(2, __pyx_n_s_dir_z, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__597)) __PYX_ERR(0, 1709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__597);
  __Pyx_GIVEREF(__pyx_tuple__597);

  /* "km3pipe/dataclasses.pyx":1710
 *         ('dir_y', '<f8'),
 *         ('dir_z', '<f8'),
 *         ('energy', '<f8'),             # <<<<<<<<<<<<<<
 *         ('id', '<u4'),
 *         ('interaction_channel', '<u4'),
 */
  __pyx_tuple__598 = PyTuple_Pack(2, __pyx_n_s_energy, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__598)) __PYX_ERR(0, 1710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__598);
  __Pyx_GIVEREF(__pyx_tuple__598);

  /* "km3pipe/dataclasses.pyx":1711
 *         ('dir_z', '<f8'),
 *         ('energy', '<f8'),
 *         ('id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('interaction_channel', '<u4'),
 *         ('is_cc', '<u4'),
 */
  __pyx_tuple__599 = PyTuple_Pack(2, __pyx_n_s_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__599)) __PYX_ERR(0, 1711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__599);
  __Pyx_GIVEREF(__pyx_tuple__599);

  /* "km3pipe/dataclasses.pyx":1712
 *         ('energy', '<f8'),
 *         ('id', '<u4'),
 *         ('interaction_channel', '<u4'),             # <<<<<<<<<<<<<<
 *         ('is_cc', '<u4'),
 *         ('length', '<f8'),
 */
  __pyx_tuple__600 = PyTuple_Pack(2, __pyx_n_s_interaction_channel, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__600)) __PYX_ERR(0, 1712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__600);
  __Pyx_GIVEREF(__pyx_tuple__600);

  /* "km3pipe/dataclasses.pyx":1713
 *         ('id', '<u4'),
 *         ('interaction_channel', '<u4'),
 *         ('is_cc', '<u4'),             # <<<<<<<<<<<<<<
 *         ('length', '<f8'),
 *         ('pos_x', '<f8'),
 */
  __pyx_tuple__601 = PyTuple_Pack(2, __pyx_n_s_is_cc, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__601)) __PYX_ERR(0, 1713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__601);
  __Pyx_GIVEREF(__pyx_tuple__601);

  /* "km3pipe/dataclasses.pyx":1714
 *         ('interaction_channel', '<u4'),
 *         ('is_cc', '<u4'),
 *         ('length', '<f8'),             # <<<<<<<<<<<<<<
 *         ('pos_x', '<f8'),
 *         ('pos_y', '<f8'),
 */
  __pyx_tuple__602 = PyTuple_Pack(2, __pyx_n_s_length, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__602)) __PYX_ERR(0, 1714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__602);
  __Pyx_GIVEREF(__pyx_tuple__602);

  /* "km3pipe/dataclasses.pyx":1715
 *         ('is_cc', '<u4'),
 *         ('length', '<f8'),
 *         ('pos_x', '<f8'),             # <<<<<<<<<<<<<<
 *         ('pos_y', '<f8'),
 *         ('pos_z', '<f8'),
 */
  __pyx_tuple__603 = PyTuple_Pack(2, __pyx_n_s_pos_x, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__603)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__603);
  __Pyx_GIVEREF(__pyx_tuple__603);

  /* "km3pipe/dataclasses.pyx":1716
 *         ('length', '<f8'),
 *         ('pos_x', '<f8'),
 *         ('pos_y', '<f8'),             # <<<<<<<<<<<<<<
 *         ('pos_z', '<f8'),
 *         ('time', '<i4'),
 */
  __pyx_tuple__604 = PyTuple_Pack(2, __pyx_n_s_pos_y, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__604)) __PYX_ERR(0, 1716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__604);
  __Pyx_GIVEREF(__pyx_tuple__604);

  /* "km3pipe/dataclasses.pyx":1717
 *         ('pos_x', '<f8'),
 *         ('pos_y', '<f8'),
 *         ('pos_z', '<f8'),             # <<<<<<<<<<<<<<
 *         ('time', '<i4'),
 *         ('type', '<i4'),
 */
  __pyx_tuple__605 = PyTuple_Pack(2, __pyx_n_s_pos_z, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__605)) __PYX_ERR(0, 1717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__605);
  __Pyx_GIVEREF(__pyx_tuple__605);

  /* "km3pipe/dataclasses.pyx":1718
 *         ('pos_y', '<f8'),
 *         ('pos_z', '<f8'),
 *         ('time', '<i4'),             # <<<<<<<<<<<<<<
 *         ('type', '<i4'),
 *         ('event_id', '<u4'),
 */
  __pyx_tuple__606 = PyTuple_Pack(2, __pyx_n_s_time, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__606)) __PYX_ERR(0, 1718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__606);
  __Pyx_GIVEREF(__pyx_tuple__606);

  /* "km3pipe/dataclasses.pyx":1719
 *         ('pos_z', '<f8'),
 *         ('time', '<i4'),
 *         ('type', '<i4'),             # <<<<<<<<<<<<<<
 *         ('event_id', '<u4'),
 *     ])
 */
  __pyx_tuple__607 = PyTuple_Pack(2, __pyx_n_s_type, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__607)) __PYX_ERR(0, 1719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__607);
  __Pyx_GIVEREF(__pyx_tuple__607);

  /* "km3pipe/dataclasses.pyx":1720
 *         ('time', '<i4'),
 *         ('type', '<i4'),
 *         ('event_id', '<u4'),             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
  __pyx_tuple__608 = PyTuple_Pack(2, __pyx_n_s_event_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__608)) __PYX_ERR(0, 1720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__608);
  __Pyx_GIVEREF(__pyx_tuple__608);

  /* "km3pipe/dataclasses.pyx":1723
 *     ])
 * 
 *     def __init__(self, tracks, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._bjorkeny = None
 *         self._dir = None
 */
  __pyx_tuple__609 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tracks, __pyx_n_s_event_id, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__609)) __PYX_ERR(0, 1723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__609);
  __Pyx_GIVEREF(__pyx_tuple__609);
  __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__609, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_init, 1723, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(0, 1723, __pyx_L1_error)
  __pyx_tuple__610 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__610)) __PYX_ERR(0, 1723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__610);
  __Pyx_GIVEREF(__pyx_tuple__610);

  /* "km3pipe/dataclasses.pyx":1741
 * 
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):             # <<<<<<<<<<<<<<
 *         return cls([McTrack(cls.get_usr_name(t, str('by'), 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 */
  __pyx_tuple__611 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_tracks, __pyx_n_s_event_id, __pyx_n_s_t); if (unlikely(!__pyx_tuple__611)) __PYX_ERR(0, 1741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__611);
  __Pyx_GIVEREF(__pyx_tuple__611);
  __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__611, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_aanet, 1741, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(0, 1741, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1766
 * 
 *     @classmethod
 *     def from_arrays(cls,             # <<<<<<<<<<<<<<
 *                     bjorkenys,
 *                     directions_x,
 */
  __pyx_tuple__612 = PyTuple_Pack(21, __pyx_n_s_cls, __pyx_n_s_bjorkenys, __pyx_n_s_directions_x, __pyx_n_s_directions_y, __pyx_n_s_directions_z, __pyx_n_s_energies, __pyx_n_s_ids, __pyx_n_s_interaction_channels, __pyx_n_s_is_ccs, __pyx_n_s_lengths, __pyx_n_s_positions_x, __pyx_n_s_positions_y, __pyx_n_s_positions_z, __pyx_n_s_times, __pyx_n_s_types, __pyx_n_s_event_id, __pyx_n_s_directions, __pyx_n_s_positions, __pyx_n_s_args, __pyx_n_s_tracks, __pyx_n_s_track_args); if (unlikely(!__pyx_tuple__612)) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__612);
  __Pyx_GIVEREF(__pyx_tuple__612);
  __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(16, 0, 21, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__612, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_arrays, 1766, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(0, 1766, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1805
 * 
 *     @classmethod
 *     def from_km3df(cls, km3df):             # <<<<<<<<<<<<<<
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 *                               event_id=int(km3df['event_id']))
 */
  __pyx_tuple__613 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_km3df); if (unlikely(!__pyx_tuple__613)) __PYX_ERR(0, 1805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__613);
  __Pyx_GIVEREF(__pyx_tuple__613);
  __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__613, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_km3df, 1805, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 1805, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1810
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         return cls([McTrack(
 *             row['bjorkeny'],
 */
  __pyx_tuple__614 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_table, __pyx_n_s_event_id, __pyx_n_s_row); if (unlikely(!__pyx_tuple__614)) __PYX_ERR(0, 1810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__614);
  __Pyx_GIVEREF(__pyx_tuple__614);
  __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__614, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_table, 1810, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(0, 1810, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1825
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__615 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__615)) __PYX_ERR(0, 1825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__615);
  __Pyx_GIVEREF(__pyx_tuple__615);
  __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__615, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_deserialise, 1825, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 1825, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1828
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__616 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__616)) __PYX_ERR(0, 1828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__616);
  __Pyx_GIVEREF(__pyx_tuple__616);
  __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__616, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_serialise, 1828, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(0, 1828, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1832
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data, event_id)
 */
  __pyx_tuple__617 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_event_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__617)) __PYX_ERR(0, 1832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__617);
  __Pyx_GIVEREF(__pyx_tuple__617);
  __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__617, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_from, 1832, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(0, 1832, __pyx_L1_error)
  __pyx_tuple__618 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__618)) __PYX_ERR(0, 1832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__618);
  __Pyx_GIVEREF(__pyx_tuple__618);

  /* "km3pipe/dataclasses.pyx":1836
 *             return cls.from_table(data, event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __pyx_tuple__619 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__619)) __PYX_ERR(0, 1836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__619);
  __Pyx_GIVEREF(__pyx_tuple__619);
  __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__619, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_to, 1836, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(0, 1836, __pyx_L1_error)
  __pyx_tuple__620 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__620)) __PYX_ERR(0, 1836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__620);
  __Pyx_GIVEREF(__pyx_tuple__620);

  /* "km3pipe/dataclasses.pyx":1842
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 */
  __pyx_tuple__621 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__621)) __PYX_ERR(0, 1842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__621);
  __Pyx_GIVEREF(__pyx_tuple__621);
  __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__621, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_array, 1842, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(0, 1842, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1851
 * 
 *     @classmethod
 *     def get_len(cls, track):             # <<<<<<<<<<<<<<
 *         try:
 *             return track.len
 */
  __pyx_tuple__622 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_track); if (unlikely(!__pyx_tuple__622)) __PYX_ERR(0, 1851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__622);
  __Pyx_GIVEREF(__pyx_tuple__622);
  __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__622, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_get_len, 1851, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) __PYX_ERR(0, 1851, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1858
 * 
 *     @classmethod
 *     def get_usr_item(cls, track, index=None):             # <<<<<<<<<<<<<<
 *         try:
 *             item = track.usr[index]
 */
  __pyx_tuple__623 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_track, __pyx_n_s_index, __pyx_n_s_item); if (unlikely(!__pyx_tuple__623)) __PYX_ERR(0, 1858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__623);
  __Pyx_GIVEREF(__pyx_tuple__623);
  __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__623, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_get_usr_item, 1858, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(0, 1858, __pyx_L1_error)
  __pyx_tuple__624 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__624)) __PYX_ERR(0, 1858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__624);
  __Pyx_GIVEREF(__pyx_tuple__624);

  /* "km3pipe/dataclasses.pyx":1866
 * 
 *     @classmethod
 *     def get_usr_name(cls, track, name, index=None):             # <<<<<<<<<<<<<<
 *         """Try to retrieve item based on name from aanet.
 * 
 */
  __pyx_tuple__625 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_track, __pyx_n_s_name, __pyx_n_s_index, __pyx_n_s_name_len, __pyx_n_s_out); if (unlikely(!__pyx_tuple__625)) __PYX_ERR(0, 1866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__625);
  __Pyx_GIVEREF(__pyx_tuple__625);
  __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__625, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_get_usr_name, 1866, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) __PYX_ERR(0, 1866, __pyx_L1_error)
  __pyx_tuple__626 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__626)) __PYX_ERR(0, 1866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__626);
  __Pyx_GIVEREF(__pyx_tuple__626);

  /* "km3pipe/dataclasses.pyx":1884
 * 
 *     @property
 *     def highest_energetic_muon(self):             # <<<<<<<<<<<<<<
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 */
  __pyx_tuple__627 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_muons, __pyx_n_s_track); if (unlikely(!__pyx_tuple__627)) __PYX_ERR(0, 1884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__627);
  __Pyx_GIVEREF(__pyx_tuple__627);
  __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__627, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_highest_energetic_muon_2, 1884, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 1884, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1892
 *         return self._highest_energetic_muon
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__628 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__628)) __PYX_ERR(0, 1892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__628);
  __Pyx_GIVEREF(__pyx_tuple__628);
  __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__628, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_iter, 1892, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 1892, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1895
 *         return self
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__629 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__629)) __PYX_ERR(0, 1895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__629);
  __Pyx_GIVEREF(__pyx_tuple__629);
  __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__629, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_iter, 1895, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) __PYX_ERR(0, 1895, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1899
 * 
 *     @property
 *     def bjorkeny(self):             # <<<<<<<<<<<<<<
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 */
  __pyx_tuple__630 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__630)) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__630);
  __Pyx_GIVEREF(__pyx_tuple__630);
  __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__630, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_bjorkeny, 1899, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 1899, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1905
 * 
 *     @property
 *     def is_cc(self):             # <<<<<<<<<<<<<<
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 */
  __pyx_tuple__631 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__631)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__631);
  __Pyx_GIVEREF(__pyx_tuple__631);
  __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__631, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_is_cc, 1905, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) __PYX_ERR(0, 1905, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1911
 * 
 *     @property
 *     def interaction_channel(self):             # <<<<<<<<<<<<<<
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for
 */
  __pyx_tuple__632 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__632)) __PYX_ERR(0, 1911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__632);
  __Pyx_GIVEREF(__pyx_tuple__632);
  __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__632, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_interaction_channel, 1911, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 1911, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1918
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])
 */
  __pyx_tuple__633 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__633)) __PYX_ERR(0, 1918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__633);
  __Pyx_GIVEREF(__pyx_tuple__633);
  __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__633, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_id, 1918, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(0, 1918, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1924
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])
 */
  __pyx_tuple__634 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__634)) __PYX_ERR(0, 1924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__634);
  __Pyx_GIVEREF(__pyx_tuple__634);
  __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__634, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_time, 1924, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(0, 1924, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1930
 * 
 *     @property
 *     def energy(self):             # <<<<<<<<<<<<<<
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])
 */
  __pyx_tuple__635 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__635)) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__635);
  __Pyx_GIVEREF(__pyx_tuple__635);
  __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__635, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_energy, 1930, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(0, 1930, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1936
 * 
 *     @property
 *     def length(self):             # <<<<<<<<<<<<<<
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])
 */
  __pyx_tuple__636 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__636)) __PYX_ERR(0, 1936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__636);
  __Pyx_GIVEREF(__pyx_tuple__636);
  __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__636, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_length, 1936, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(0, 1936, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1942
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])
 */
  __pyx_tuple__637 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__637)) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__637);
  __Pyx_GIVEREF(__pyx_tuple__637);
  __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__637, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_type, 1942, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(0, 1942, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1948
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])
 */
  __pyx_tuple__638 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__638)) __PYX_ERR(0, 1948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__638);
  __Pyx_GIVEREF(__pyx_tuple__638);
  __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__638, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_pos, 1948, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(0, 1948, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1954
 * 
 *     @property
 *     def dir(self):             # <<<<<<<<<<<<<<
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])
 */
  __pyx_tuple__639 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__639)) __PYX_ERR(0, 1954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__639);
  __Pyx_GIVEREF(__pyx_tuple__639);
  __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__639, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_dir, 1954, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(0, 1954, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1959
 *         return self._dir
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __pyx_tuple__640 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__640)) __PYX_ERR(0, 1959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__640);
  __Pyx_GIVEREF(__pyx_tuple__640);
  __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__640, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_next_2, 1959, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(0, 1959, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1963
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __pyx_tuple__641 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_item); if (unlikely(!__pyx_tuple__641)) __PYX_ERR(0, 1963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__641);
  __Pyx_GIVEREF(__pyx_tuple__641);
  __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__641, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_next, 1963, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(0, 1963, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1971
 *         return item
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return len(self._tracks)
 * 
 */
  __pyx_tuple__642 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__642)) __PYX_ERR(0, 1971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__642);
  __Pyx_GIVEREF(__pyx_tuple__642);
  __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__642, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_len_2, 1971, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(0, 1971, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1974
 *         return len(self._tracks)
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._tracks[index]
 */
  __pyx_tuple__643 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_index); if (unlikely(!__pyx_tuple__643)) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__643);
  __Pyx_GIVEREF(__pyx_tuple__643);
  __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__643, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_getitem, 1974, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) __PYX_ERR(0, 1974, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1982
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
  __pyx_tuple__644 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_start, __pyx_n_s_stop, __pyx_n_s_step, __pyx_n_s_i); if (unlikely(!__pyx_tuple__644)) __PYX_ERR(0, 1982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__644);
  __Pyx_GIVEREF(__pyx_tuple__644);
  __pyx_codeobj__645 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__644, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_slice_generator, 1982, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__645)) __PYX_ERR(0, 1982, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1988
 *             yield self._tracks[i]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 */
  __pyx_tuple__646 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n_tracks, __pyx_n_s_plural); if (unlikely(!__pyx_tuple__646)) __PYX_ERR(0, 1988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__646);
  __Pyx_GIVEREF(__pyx_tuple__646);
  __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__646, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_str, 1988, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(0, 1988, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1993
 *         return("McTrackSeries with {0} track{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__647 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__647)) __PYX_ERR(0, 1993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__647);
  __Pyx_GIVEREF(__pyx_tuple__647);
  __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__647, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_repr, 1993, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(0, 1993, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1996
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(track) for track in self._tracks])
 * 
 */
  __pyx_tuple__648 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_track); if (unlikely(!__pyx_tuple__648)) __PYX_ERR(0, 1996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__648);
  __Pyx_GIVEREF(__pyx_tuple__648);
  __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__648, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_insp, 1996, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(0, 1996, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2000
 * 
 * 
 * class TrackSeries(object):             # <<<<<<<<<<<<<<
 *     """Collection of multiple Tracks.
 * 
 */
  __pyx_tuple__649 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__649)) __PYX_ERR(0, 2000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__649);
  __Pyx_GIVEREF(__pyx_tuple__649);

  /* "km3pipe/dataclasses.pyx":2009
 *     h5loc = '/tracks'
 *     dtype = np.dtype([
 *         ('bjorkeny', '<f8'),             # <<<<<<<<<<<<<<
 *         ('dir_x', '<f8'),
 *         ('dir_y', '<f8'),
 */
  __pyx_tuple__650 = PyTuple_Pack(2, __pyx_n_s_bjorkeny, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__650)) __PYX_ERR(0, 2009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__650);
  __Pyx_GIVEREF(__pyx_tuple__650);

  /* "km3pipe/dataclasses.pyx":2010
 *     dtype = np.dtype([
 *         ('bjorkeny', '<f8'),
 *         ('dir_x', '<f8'),             # <<<<<<<<<<<<<<
 *         ('dir_y', '<f8'),
 *         ('dir_z', '<f8'),
 */
  __pyx_tuple__651 = PyTuple_Pack(2, __pyx_n_s_dir_x, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__651)) __PYX_ERR(0, 2010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__651);
  __Pyx_GIVEREF(__pyx_tuple__651);

  /* "km3pipe/dataclasses.pyx":2011
 *         ('bjorkeny', '<f8'),
 *         ('dir_x', '<f8'),
 *         ('dir_y', '<f8'),             # <<<<<<<<<<<<<<
 *         ('dir_z', '<f8'),
 *         ('energy', '<f8'),
 */
  __pyx_tuple__652 = PyTuple_Pack(2, __pyx_n_s_dir_y, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__652)) __PYX_ERR(0, 2011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__652);
  __Pyx_GIVEREF(__pyx_tuple__652);

  /* "km3pipe/dataclasses.pyx":2012
 *         ('dir_x', '<f8'),
 *         ('dir_y', '<f8'),
 *         ('dir_z', '<f8'),             # <<<<<<<<<<<<<<
 *         ('energy', '<f8'),
 *         ('id', '<u4'),
 */
  __pyx_tuple__653 = PyTuple_Pack(2, __pyx_n_s_dir_z, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__653)) __PYX_ERR(0, 2012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__653);
  __Pyx_GIVEREF(__pyx_tuple__653);

  /* "km3pipe/dataclasses.pyx":2013
 *         ('dir_y', '<f8'),
 *         ('dir_z', '<f8'),
 *         ('energy', '<f8'),             # <<<<<<<<<<<<<<
 *         ('id', '<u4'),
 *         ('interaction_channel', '<u4'),
 */
  __pyx_tuple__654 = PyTuple_Pack(2, __pyx_n_s_energy, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__654)) __PYX_ERR(0, 2013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__654);
  __Pyx_GIVEREF(__pyx_tuple__654);

  /* "km3pipe/dataclasses.pyx":2014
 *         ('dir_z', '<f8'),
 *         ('energy', '<f8'),
 *         ('id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('interaction_channel', '<u4'),
 *         ('is_cc', '<u4'),
 */
  __pyx_tuple__655 = PyTuple_Pack(2, __pyx_n_s_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__655)) __PYX_ERR(0, 2014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__655);
  __Pyx_GIVEREF(__pyx_tuple__655);

  /* "km3pipe/dataclasses.pyx":2015
 *         ('energy', '<f8'),
 *         ('id', '<u4'),
 *         ('interaction_channel', '<u4'),             # <<<<<<<<<<<<<<
 *         ('is_cc', '<u4'),
 *         ('length', '<f8'),
 */
  __pyx_tuple__656 = PyTuple_Pack(2, __pyx_n_s_interaction_channel, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__656)) __PYX_ERR(0, 2015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__656);
  __Pyx_GIVEREF(__pyx_tuple__656);

  /* "km3pipe/dataclasses.pyx":2016
 *         ('id', '<u4'),
 *         ('interaction_channel', '<u4'),
 *         ('is_cc', '<u4'),             # <<<<<<<<<<<<<<
 *         ('length', '<f8'),
 *         ('pos_x', '<f8'),
 */
  __pyx_tuple__657 = PyTuple_Pack(2, __pyx_n_s_is_cc, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__657)) __PYX_ERR(0, 2016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__657);
  __Pyx_GIVEREF(__pyx_tuple__657);

  /* "km3pipe/dataclasses.pyx":2017
 *         ('interaction_channel', '<u4'),
 *         ('is_cc', '<u4'),
 *         ('length', '<f8'),             # <<<<<<<<<<<<<<
 *         ('pos_x', '<f8'),
 *         ('pos_y', '<f8'),
 */
  __pyx_tuple__658 = PyTuple_Pack(2, __pyx_n_s_length, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__658)) __PYX_ERR(0, 2017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__658);
  __Pyx_GIVEREF(__pyx_tuple__658);

  /* "km3pipe/dataclasses.pyx":2018
 *         ('is_cc', '<u4'),
 *         ('length', '<f8'),
 *         ('pos_x', '<f8'),             # <<<<<<<<<<<<<<
 *         ('pos_y', '<f8'),
 *         ('pos_z', '<f8'),
 */
  __pyx_tuple__659 = PyTuple_Pack(2, __pyx_n_s_pos_x, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__659)) __PYX_ERR(0, 2018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__659);
  __Pyx_GIVEREF(__pyx_tuple__659);

  /* "km3pipe/dataclasses.pyx":2019
 *         ('length', '<f8'),
 *         ('pos_x', '<f8'),
 *         ('pos_y', '<f8'),             # <<<<<<<<<<<<<<
 *         ('pos_z', '<f8'),
 *         ('time', '<i4'),
 */
  __pyx_tuple__660 = PyTuple_Pack(2, __pyx_n_s_pos_y, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__660)) __PYX_ERR(0, 2019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__660);
  __Pyx_GIVEREF(__pyx_tuple__660);

  /* "km3pipe/dataclasses.pyx":2020
 *         ('pos_x', '<f8'),
 *         ('pos_y', '<f8'),
 *         ('pos_z', '<f8'),             # <<<<<<<<<<<<<<
 *         ('time', '<i4'),
 *         ('type', '<i4'),
 */
  __pyx_tuple__661 = PyTuple_Pack(2, __pyx_n_s_pos_z, __pyx_kp_s_f8); if (unlikely(!__pyx_tuple__661)) __PYX_ERR(0, 2020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__661);
  __Pyx_GIVEREF(__pyx_tuple__661);

  /* "km3pipe/dataclasses.pyx":2021
 *         ('pos_y', '<f8'),
 *         ('pos_z', '<f8'),
 *         ('time', '<i4'),             # <<<<<<<<<<<<<<
 *         ('type', '<i4'),
 *         ('event_id', '<u4'),
 */
  __pyx_tuple__662 = PyTuple_Pack(2, __pyx_n_s_time, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__662)) __PYX_ERR(0, 2021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__662);
  __Pyx_GIVEREF(__pyx_tuple__662);

  /* "km3pipe/dataclasses.pyx":2022
 *         ('pos_z', '<f8'),
 *         ('time', '<i4'),
 *         ('type', '<i4'),             # <<<<<<<<<<<<<<
 *         ('event_id', '<u4'),
 *     ])
 */
  __pyx_tuple__663 = PyTuple_Pack(2, __pyx_n_s_type, __pyx_kp_s_i4); if (unlikely(!__pyx_tuple__663)) __PYX_ERR(0, 2022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__663);
  __Pyx_GIVEREF(__pyx_tuple__663);

  /* "km3pipe/dataclasses.pyx":2023
 *         ('time', '<i4'),
 *         ('type', '<i4'),
 *         ('event_id', '<u4'),             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
  __pyx_tuple__664 = PyTuple_Pack(2, __pyx_n_s_event_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__664)) __PYX_ERR(0, 2023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__664);
  __Pyx_GIVEREF(__pyx_tuple__664);

  /* "km3pipe/dataclasses.pyx":2026
 *     ])
 * 
 *     def __init__(self, tracks, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._bjorkeny = None
 *         self._dir = None
 */
  __pyx_tuple__665 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tracks, __pyx_n_s_event_id, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__665)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__665);
  __Pyx_GIVEREF(__pyx_tuple__665);
  __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__665, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_init, 2026, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __pyx_tuple__666 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__666)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__666);
  __Pyx_GIVEREF(__pyx_tuple__666);

  /* "km3pipe/dataclasses.pyx":2044
 * 
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):             # <<<<<<<<<<<<<<
 *         return cls([Track(cls.get_usr_name(t, str('by'), 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 */
  __pyx_tuple__667 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_tracks, __pyx_n_s_event_id, __pyx_n_s_t); if (unlikely(!__pyx_tuple__667)) __PYX_ERR(0, 2044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__667);
  __Pyx_GIVEREF(__pyx_tuple__667);
  __pyx_codeobj__219 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__667, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_aanet, 2044, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) __PYX_ERR(0, 2044, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2069
 * 
 *     @classmethod
 *     def from_arrays(cls,             # <<<<<<<<<<<<<<
 *                     bjorkenys,
 *                     directions_x,
 */
  __pyx_tuple__668 = PyTuple_Pack(21, __pyx_n_s_cls, __pyx_n_s_bjorkenys, __pyx_n_s_directions_x, __pyx_n_s_directions_y, __pyx_n_s_directions_z, __pyx_n_s_energies, __pyx_n_s_ids, __pyx_n_s_interaction_channels, __pyx_n_s_is_ccs, __pyx_n_s_lengths, __pyx_n_s_positions_x, __pyx_n_s_positions_y, __pyx_n_s_positions_z, __pyx_n_s_times, __pyx_n_s_types, __pyx_n_s_event_id, __pyx_n_s_directions, __pyx_n_s_positions, __pyx_n_s_args, __pyx_n_s_tracks, __pyx_n_s_track_args); if (unlikely(!__pyx_tuple__668)) __PYX_ERR(0, 2069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__668);
  __Pyx_GIVEREF(__pyx_tuple__668);
  __pyx_codeobj__223 = (PyObject*)__Pyx_PyCode_New(16, 0, 21, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__668, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_arrays, 2069, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__223)) __PYX_ERR(0, 2069, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2108
 * 
 *     @classmethod
 *     def from_km3df(cls, km3df):             # <<<<<<<<<<<<<<
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 *                               event_id=int(km3df['event_id']))
 */
  __pyx_tuple__669 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_km3df); if (unlikely(!__pyx_tuple__669)) __PYX_ERR(0, 2108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__669);
  __Pyx_GIVEREF(__pyx_tuple__669);
  __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__669, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_km3df, 2108, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(0, 2108, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2113
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         return cls([Track(
 *             row['bjorkeny'],
 */
  __pyx_tuple__670 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_table, __pyx_n_s_event_id, __pyx_n_s_row); if (unlikely(!__pyx_tuple__670)) __PYX_ERR(0, 2113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__670);
  __Pyx_GIVEREF(__pyx_tuple__670);
  __pyx_codeobj__225 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__670, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_table, 2113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) __PYX_ERR(0, 2113, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2128
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__671 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__671)) __PYX_ERR(0, 2128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__671);
  __Pyx_GIVEREF(__pyx_tuple__671);
  __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__671, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_deserialise, 2128, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(0, 2128, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2131
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__672 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__672)) __PYX_ERR(0, 2131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__672);
  __Pyx_GIVEREF(__pyx_tuple__672);
  __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__672, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_serialise, 2131, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(0, 2131, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2135
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data, event_id)
 */
  __pyx_tuple__673 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_event_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__673)) __PYX_ERR(0, 2135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__673);
  __Pyx_GIVEREF(__pyx_tuple__673);
  __pyx_codeobj__228 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__673, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_from, 2135, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__228)) __PYX_ERR(0, 2135, __pyx_L1_error)
  __pyx_tuple__674 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__674)) __PYX_ERR(0, 2135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__674);
  __Pyx_GIVEREF(__pyx_tuple__674);

  /* "km3pipe/dataclasses.pyx":2139
 *             return cls.from_table(data, event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __pyx_tuple__675 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__675)) __PYX_ERR(0, 2139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__675);
  __Pyx_GIVEREF(__pyx_tuple__675);
  __pyx_codeobj__229 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__675, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_to, 2139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) __PYX_ERR(0, 2139, __pyx_L1_error)
  __pyx_tuple__676 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__676)) __PYX_ERR(0, 2139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__676);
  __Pyx_GIVEREF(__pyx_tuple__676);

  /* "km3pipe/dataclasses.pyx":2145
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 */
  __pyx_tuple__677 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__677)) __PYX_ERR(0, 2145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__677);
  __Pyx_GIVEREF(__pyx_tuple__677);
  __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__677, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_array, 2145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(0, 2145, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2154
 * 
 *     @classmethod
 *     def get_len(cls, track):             # <<<<<<<<<<<<<<
 *         try:
 *             return track.len
 */
  __pyx_tuple__678 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_track); if (unlikely(!__pyx_tuple__678)) __PYX_ERR(0, 2154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__678);
  __Pyx_GIVEREF(__pyx_tuple__678);
  __pyx_codeobj__231 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__678, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_get_len, 2154, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__231)) __PYX_ERR(0, 2154, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2161
 * 
 *     @classmethod
 *     def get_usr_item(cls, track, index=None):             # <<<<<<<<<<<<<<
 *         try:
 *             item = track.usr[index]
 */
  __pyx_tuple__679 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_track, __pyx_n_s_index, __pyx_n_s_item); if (unlikely(!__pyx_tuple__679)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__679);
  __Pyx_GIVEREF(__pyx_tuple__679);
  __pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__679, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_get_usr_item, 2161, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__232)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __pyx_tuple__680 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__680)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__680);
  __Pyx_GIVEREF(__pyx_tuple__680);

  /* "km3pipe/dataclasses.pyx":2169
 * 
 *     @classmethod
 *     def get_usr_name(cls, track, name, index=None):             # <<<<<<<<<<<<<<
 *         """Try to retrieve item based on name from aanet.
 * 
 */
  __pyx_tuple__681 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_track, __pyx_n_s_name, __pyx_n_s_index, __pyx_n_s_name_len, __pyx_n_s_out); if (unlikely(!__pyx_tuple__681)) __PYX_ERR(0, 2169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__681);
  __Pyx_GIVEREF(__pyx_tuple__681);
  __pyx_codeobj__233 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__681, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_get_usr_name, 2169, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__233)) __PYX_ERR(0, 2169, __pyx_L1_error)
  __pyx_tuple__682 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__682)) __PYX_ERR(0, 2169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__682);
  __Pyx_GIVEREF(__pyx_tuple__682);

  /* "km3pipe/dataclasses.pyx":2187
 * 
 *     @property
 *     def highest_energetic_muon(self):             # <<<<<<<<<<<<<<
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 */
  __pyx_tuple__683 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_muons, __pyx_n_s_track); if (unlikely(!__pyx_tuple__683)) __PYX_ERR(0, 2187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__683);
  __Pyx_GIVEREF(__pyx_tuple__683);
  __pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__683, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_highest_energetic_muon_2, 2187, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) __PYX_ERR(0, 2187, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2195
 *         return self._highest_energetic_muon
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__684 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__684)) __PYX_ERR(0, 2195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__684);
  __Pyx_GIVEREF(__pyx_tuple__684);
  __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__684, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_iter, 2195, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(0, 2195, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2198
 *         return self
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__685 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__685)) __PYX_ERR(0, 2198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__685);
  __Pyx_GIVEREF(__pyx_tuple__685);
  __pyx_codeobj__237 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__685, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_iter, 2198, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) __PYX_ERR(0, 2198, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2202
 * 
 *     @property
 *     def bjorkeny(self):             # <<<<<<<<<<<<<<
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 */
  __pyx_tuple__686 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__686)) __PYX_ERR(0, 2202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__686);
  __Pyx_GIVEREF(__pyx_tuple__686);
  __pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__686, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_bjorkeny, 2202, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) __PYX_ERR(0, 2202, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2208
 * 
 *     @property
 *     def is_cc(self):             # <<<<<<<<<<<<<<
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 */
  __pyx_tuple__687 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__687)) __PYX_ERR(0, 2208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__687);
  __Pyx_GIVEREF(__pyx_tuple__687);
  __pyx_codeobj__239 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__687, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_is_cc, 2208, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__239)) __PYX_ERR(0, 2208, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2214
 * 
 *     @property
 *     def interaction_channel(self):             # <<<<<<<<<<<<<<
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for
 */
  __pyx_tuple__688 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__688)) __PYX_ERR(0, 2214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__688);
  __Pyx_GIVEREF(__pyx_tuple__688);
  __pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__688, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_interaction_channel, 2214, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) __PYX_ERR(0, 2214, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2221
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])
 */
  __pyx_tuple__689 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__689)) __PYX_ERR(0, 2221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__689);
  __Pyx_GIVEREF(__pyx_tuple__689);
  __pyx_codeobj__241 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__689, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_id, 2221, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__241)) __PYX_ERR(0, 2221, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2227
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])
 */
  __pyx_tuple__690 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__690)) __PYX_ERR(0, 2227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__690);
  __Pyx_GIVEREF(__pyx_tuple__690);
  __pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__690, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_time, 2227, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) __PYX_ERR(0, 2227, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2233
 * 
 *     @property
 *     def energy(self):             # <<<<<<<<<<<<<<
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])
 */
  __pyx_tuple__691 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__691)) __PYX_ERR(0, 2233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__691);
  __Pyx_GIVEREF(__pyx_tuple__691);
  __pyx_codeobj__243 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__691, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_energy, 2233, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__243)) __PYX_ERR(0, 2233, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2239
 * 
 *     @property
 *     def length(self):             # <<<<<<<<<<<<<<
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])
 */
  __pyx_tuple__692 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__692)) __PYX_ERR(0, 2239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__692);
  __Pyx_GIVEREF(__pyx_tuple__692);
  __pyx_codeobj__244 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__692, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_length, 2239, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__244)) __PYX_ERR(0, 2239, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2245
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])
 */
  __pyx_tuple__693 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__693)) __PYX_ERR(0, 2245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__693);
  __Pyx_GIVEREF(__pyx_tuple__693);
  __pyx_codeobj__245 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__693, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_type, 2245, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__245)) __PYX_ERR(0, 2245, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2251
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])
 */
  __pyx_tuple__694 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__694)) __PYX_ERR(0, 2251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__694);
  __Pyx_GIVEREF(__pyx_tuple__694);
  __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__694, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_pos, 2251, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) __PYX_ERR(0, 2251, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2257
 * 
 *     @property
 *     def dir(self):             # <<<<<<<<<<<<<<
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])
 */
  __pyx_tuple__695 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_t); if (unlikely(!__pyx_tuple__695)) __PYX_ERR(0, 2257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__695);
  __Pyx_GIVEREF(__pyx_tuple__695);
  __pyx_codeobj__247 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__695, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_dir, 2257, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__247)) __PYX_ERR(0, 2257, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2262
 *         return self._dir
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __pyx_tuple__696 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__696)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__696);
  __Pyx_GIVEREF(__pyx_tuple__696);
  __pyx_codeobj__248 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__696, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_next_2, 2262, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__248)) __PYX_ERR(0, 2262, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2266
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __pyx_tuple__697 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_item); if (unlikely(!__pyx_tuple__697)) __PYX_ERR(0, 2266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__697);
  __Pyx_GIVEREF(__pyx_tuple__697);
  __pyx_codeobj__249 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__697, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_next, 2266, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__249)) __PYX_ERR(0, 2266, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2274
 *         return item
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return len(self._tracks)
 * 
 */
  __pyx_tuple__698 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__698)) __PYX_ERR(0, 2274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__698);
  __Pyx_GIVEREF(__pyx_tuple__698);
  __pyx_codeobj__250 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__698, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_len_2, 2274, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__250)) __PYX_ERR(0, 2274, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2277
 *         return len(self._tracks)
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._tracks[index]
 */
  __pyx_tuple__699 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_index); if (unlikely(!__pyx_tuple__699)) __PYX_ERR(0, 2277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__699);
  __Pyx_GIVEREF(__pyx_tuple__699);
  __pyx_codeobj__251 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__699, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_getitem, 2277, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__251)) __PYX_ERR(0, 2277, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2285
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
  __pyx_tuple__700 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_start, __pyx_n_s_stop, __pyx_n_s_step, __pyx_n_s_i); if (unlikely(!__pyx_tuple__700)) __PYX_ERR(0, 2285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__700);
  __Pyx_GIVEREF(__pyx_tuple__700);
  __pyx_codeobj__701 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__700, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_slice_generator, 2285, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__701)) __PYX_ERR(0, 2285, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2291
 *             yield self._tracks[i]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 */
  __pyx_tuple__702 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n_tracks, __pyx_n_s_plural); if (unlikely(!__pyx_tuple__702)) __PYX_ERR(0, 2291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__702);
  __Pyx_GIVEREF(__pyx_tuple__702);
  __pyx_codeobj__253 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__702, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_str, 2291, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__253)) __PYX_ERR(0, 2291, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2296
 *         return("TrackSeries with {0} track{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __pyx_tuple__703 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__703)) __PYX_ERR(0, 2296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__703);
  __Pyx_GIVEREF(__pyx_tuple__703);
  __pyx_codeobj__254 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__703, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_repr, 2296, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__254)) __PYX_ERR(0, 2296, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2299
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(track) for track in self._tracks])
 * 
 */
  __pyx_tuple__704 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_track); if (unlikely(!__pyx_tuple__704)) __PYX_ERR(0, 2299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__704);
  __Pyx_GIVEREF(__pyx_tuple__704);
  __pyx_codeobj__255 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__704, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_insp, 2299, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__255)) __PYX_ERR(0, 2299, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2303
 * 
 * 
 * class SummaryframeSeries(object):             # <<<<<<<<<<<<<<
 *     """Collection of summary frames.
 *     """
 */
  __pyx_tuple__705 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__705)) __PYX_ERR(0, 2303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__705);
  __Pyx_GIVEREF(__pyx_tuple__705);

  /* "km3pipe/dataclasses.pyx":2308
 *     h5loc = '/summary_frame_series'
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ('max_sequence_number', '<u4'),
 *         ('n_received_packets', '<u4'),
 */
  __pyx_tuple__706 = PyTuple_Pack(2, __pyx_n_s_dom_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__706)) __PYX_ERR(0, 2308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__706);
  __Pyx_GIVEREF(__pyx_tuple__706);

  /* "km3pipe/dataclasses.pyx":2309
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),
 *         ('max_sequence_number', '<u4'),             # <<<<<<<<<<<<<<
 *         ('n_received_packets', '<u4'),
 *         ('slice_id', '<u4'),
 */
  __pyx_tuple__707 = PyTuple_Pack(2, __pyx_n_s_max_sequence_number, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__707)) __PYX_ERR(0, 2309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__707);
  __Pyx_GIVEREF(__pyx_tuple__707);

  /* "km3pipe/dataclasses.pyx":2310
 *         ('dom_id', '<u4'),
 *         ('max_sequence_number', '<u4'),
 *         ('n_received_packets', '<u4'),             # <<<<<<<<<<<<<<
 *         ('slice_id', '<u4'),
 *         ])
 */
  __pyx_tuple__708 = PyTuple_Pack(2, __pyx_n_s_n_received_packets, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__708)) __PYX_ERR(0, 2310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__708);
  __Pyx_GIVEREF(__pyx_tuple__708);

  /* "km3pipe/dataclasses.pyx":2311
 *         ('max_sequence_number', '<u4'),
 *         ('n_received_packets', '<u4'),
 *         ('slice_id', '<u4'),             # <<<<<<<<<<<<<<
 *         ])
 *     h5loc = '/'
 */
  __pyx_tuple__709 = PyTuple_Pack(2, __pyx_n_s_slice_id, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__709)) __PYX_ERR(0, 2311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__709);
  __Pyx_GIVEREF(__pyx_tuple__709);

  /* "km3pipe/dataclasses.pyx":2315
 *     h5loc = '/'
 * 
 *     def __init__(self, arr):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __pyx_tuple__710 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_arr_2); if (unlikely(!__pyx_tuple__710)) __PYX_ERR(0, 2315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__710);
  __Pyx_GIVEREF(__pyx_tuple__710);
  __pyx_codeobj__256 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__710, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_init, 2315, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__256)) __PYX_ERR(0, 2315, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2321
 * 
 *     @classmethod
 *     def from_arrays(cls, dom_ids, max_sequence_numbers, n_received_packets,             # <<<<<<<<<<<<<<
 *                     slice_id):
 *         length = dom_ids.shape[0]
 */
  __pyx_tuple__711 = PyTuple_Pack(7, __pyx_n_s_cls, __pyx_n_s_dom_ids, __pyx_n_s_max_sequence_numbers, __pyx_n_s_n_received_packets, __pyx_n_s_slice_id, __pyx_n_s_length, __pyx_n_s_frames_2); if (unlikely(!__pyx_tuple__711)) __PYX_ERR(0, 2321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__711);
  __Pyx_GIVEREF(__pyx_tuple__711);
  __pyx_codeobj__257 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__711, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_arrays, 2321, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__257)) __PYX_ERR(0, 2321, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2331
 *         return cls(frames)
 * 
 *     def from_table(cls, table, slice_id):             # <<<<<<<<<<<<<<
 *         if slice_id is None:
 *             slice_id = table[0]['slice_id']
 */
  __pyx_tuple__712 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_table, __pyx_n_s_slice_id, __pyx_n_s_row); if (unlikely(!__pyx_tuple__712)) __PYX_ERR(0, 2331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__712);
  __Pyx_GIVEREF(__pyx_tuple__712);
  __pyx_codeobj__258 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__712, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_table, 2331, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__258)) __PYX_ERR(0, 2331, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2341
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__713 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__713)) __PYX_ERR(0, 2341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__713);
  __Pyx_GIVEREF(__pyx_tuple__713);
  __pyx_codeobj__259 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__713, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_deserialise, 2341, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) __PYX_ERR(0, 2341, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2344
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__714 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__714)) __PYX_ERR(0, 2344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__714);
  __Pyx_GIVEREF(__pyx_tuple__714);
  __pyx_codeobj__260 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__714, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_serialise, 2344, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__260)) __PYX_ERR(0, 2344, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2348
 * 
 *     @classmethod
 *     def conv_from(cls, data, slice_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, event_id)
 */
  __pyx_tuple__715 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_slice_id, __pyx_n_s_fmt, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__715)) __PYX_ERR(0, 2348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__715);
  __Pyx_GIVEREF(__pyx_tuple__715);
  __pyx_codeobj__261 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__715, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_from, 2348, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__261)) __PYX_ERR(0, 2348, __pyx_L1_error)
  __pyx_tuple__716 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_numpy), ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__716)) __PYX_ERR(0, 2348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__716);
  __Pyx_GIVEREF(__pyx_tuple__716);

  /* "km3pipe/dataclasses.pyx":2353
 *             return cls(data)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __pyx_tuple__717 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_to); if (unlikely(!__pyx_tuple__717)) __PYX_ERR(0, 2353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__717);
  __Pyx_GIVEREF(__pyx_tuple__717);
  __pyx_codeobj__262 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__717, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_to, 2353, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__262)) __PYX_ERR(0, 2353, __pyx_L1_error)
  __pyx_tuple__718 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__718)) __PYX_ERR(0, 2353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__718);
  __Pyx_GIVEREF(__pyx_tuple__718);

  /* "km3pipe/dataclasses.pyx":2360
 * 
 *     @property
 *     def n_received_packets(self):             # <<<<<<<<<<<<<<
 *         return self._arr['n_received_packets']
 * 
 */
  __pyx_tuple__719 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__719)) __PYX_ERR(0, 2360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__719);
  __Pyx_GIVEREF(__pyx_tuple__719);
  __pyx_codeobj__263 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__719, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_n_received_packets, 2360, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__263)) __PYX_ERR(0, 2360, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2364
 * 
 *     @property
 *     def dom_ids(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dom_ids']
 * 
 */
  __pyx_tuple__720 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__720)) __PYX_ERR(0, 2364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__720);
  __Pyx_GIVEREF(__pyx_tuple__720);
  __pyx_codeobj__264 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__720, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_dom_ids, 2364, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__264)) __PYX_ERR(0, 2364, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2368
 * 
 *     @property
 *     def max_sequence_numbers(self):             # <<<<<<<<<<<<<<
 *         return self._arr['max_sequence_numbers']
 * 
 */
  __pyx_tuple__721 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__721)) __PYX_ERR(0, 2368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__721);
  __Pyx_GIVEREF(__pyx_tuple__721);
  __pyx_codeobj__265 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__721, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_max_sequence_numbers, 2368, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__265)) __PYX_ERR(0, 2368, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2371
 *         return self._arr['max_sequence_numbers']
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __pyx_tuple__722 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__722)) __PYX_ERR(0, 2371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__722);
  __Pyx_GIVEREF(__pyx_tuple__722);
  __pyx_codeobj__266 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__722, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_array, 2371, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__266)) __PYX_ERR(0, 2371, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2374
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__723 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__723)) __PYX_ERR(0, 2374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__723);
  __Pyx_GIVEREF(__pyx_tuple__723);
  __pyx_codeobj__267 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__723, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_iter, 2374, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__267)) __PYX_ERR(0, 2374, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2377
 *         return self
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __pyx_tuple__724 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__724)) __PYX_ERR(0, 2377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__724);
  __Pyx_GIVEREF(__pyx_tuple__724);
  __pyx_codeobj__268 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__724, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_next_2, 2377, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__268)) __PYX_ERR(0, 2377, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2381
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __pyx_tuple__725 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__725)) __PYX_ERR(0, 2381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__725);
  __Pyx_GIVEREF(__pyx_tuple__725);
  __pyx_codeobj__269 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__725, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_next, 2381, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__269)) __PYX_ERR(0, 2381, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2389
 *         return data
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __pyx_tuple__726 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__726)) __PYX_ERR(0, 2389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__726);
  __Pyx_GIVEREF(__pyx_tuple__726);
  __pyx_codeobj__270 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__726, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_len_2, 2389, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__270)) __PYX_ERR(0, 2389, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2392
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._arr[index]
 */
  __pyx_tuple__727 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_index); if (unlikely(!__pyx_tuple__727)) __PYX_ERR(0, 2392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__727);
  __Pyx_GIVEREF(__pyx_tuple__727);
  __pyx_codeobj__271 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__727, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_getitem, 2392, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__271)) __PYX_ERR(0, 2392, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2400
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
  __pyx_tuple__728 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_start, __pyx_n_s_stop, __pyx_n_s_step, __pyx_n_s_i); if (unlikely(!__pyx_tuple__728)) __PYX_ERR(0, 2400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__728);
  __Pyx_GIVEREF(__pyx_tuple__728);
  __pyx_codeobj__729 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__728, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_slice_generator, 2400, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__729)) __PYX_ERR(0, 2400, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2424
 *         Convert for storage.
 *     """
 *     def __new__(cls, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         obj = np.asarray(arr).view(cls)
 *         obj.h5loc = h5loc
 */
  __pyx_tuple__730 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_arr_2, __pyx_n_s_h5loc, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__730)) __PYX_ERR(0, 2424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__730);
  __Pyx_GIVEREF(__pyx_tuple__730);
  __pyx_codeobj__273 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__730, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_new, 2424, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__273)) __PYX_ERR(0, 2424, __pyx_L1_error)
  __pyx_tuple__731 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__731)) __PYX_ERR(0, 2424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__731);
  __Pyx_GIVEREF(__pyx_tuple__731);

  /* "km3pipe/dataclasses.pyx":2429
 *         return obj
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self.array = arr
 *         self.h5loc = h5loc
 */
  __pyx_tuple__732 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_arr_2, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__732)) __PYX_ERR(0, 2429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__732);
  __Pyx_GIVEREF(__pyx_tuple__732);
  __pyx_codeobj__274 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__732, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_init, 2429, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__274)) __PYX_ERR(0, 2429, __pyx_L1_error)
  __pyx_tuple__733 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__2)); if (unlikely(!__pyx_tuple__733)) __PYX_ERR(0, 2429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__733);
  __Pyx_GIVEREF(__pyx_tuple__733);

  /* "km3pipe/dataclasses.pyx":2433
 *         self.h5loc = h5loc
 * 
 *     def __array_finalize__(self, obj):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             return
 */
  __pyx_tuple__734 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__734)) __PYX_ERR(0, 2433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__734);
  __Pyx_GIVEREF(__pyx_tuple__734);
  __pyx_codeobj__275 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__734, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_array_finalize, 2433, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__275)) __PYX_ERR(0, 2433, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2439
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__735 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__735)) __PYX_ERR(0, 2439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__735);
  __Pyx_GIVEREF(__pyx_tuple__735);
  __pyx_codeobj__276 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__735, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_deserialise, 2439, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__276)) __PYX_ERR(0, 2439, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2442
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__736 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__736)) __PYX_ERR(0, 2442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__736);
  __Pyx_GIVEREF(__pyx_tuple__736);
  __pyx_codeobj__277 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__736, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_serialise, 2442, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__277)) __PYX_ERR(0, 2442, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2446
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             arr = cls(data, h5loc, **kwargs)
 */
  __pyx_tuple__737 = PyTuple_Pack(7, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_event_id, __pyx_n_s_h5loc, __pyx_n_s_fmt, __pyx_n_s_kwargs, __pyx_n_s_arr_2); if (unlikely(!__pyx_tuple__737)) __PYX_ERR(0, 2446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__737);
  __Pyx_GIVEREF(__pyx_tuple__737);
  __pyx_codeobj__278 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__737, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_from, 2446, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__278)) __PYX_ERR(0, 2446, __pyx_L1_error)
  __pyx_tuple__738 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject*)__pyx_kp_s__2), ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__738)) __PYX_ERR(0, 2446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__738);
  __Pyx_GIVEREF(__pyx_tuple__738);

  /* "km3pipe/dataclasses.pyx":2451
 *             return arr
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self
 */
  __pyx_tuple__739 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_to, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__739)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__739);
  __Pyx_GIVEREF(__pyx_tuple__739);
  __pyx_codeobj__279 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__739, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_to, 2451, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__279)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __pyx_tuple__740 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__740)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__740);
  __Pyx_GIVEREF(__pyx_tuple__740);

  /* "km3pipe/dataclasses.pyx":2458
 * 
 *     @classmethod
 *     def from_dict(cls, map, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 */
  __pyx_tuple__741 = PyTuple_Pack(7, __pyx_n_s_cls, __pyx_n_s_map, __pyx_n_s_dtype, __pyx_n_s_kwargs, __pyx_n_s_key, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__741)) __PYX_ERR(0, 2458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__741);
  __Pyx_GIVEREF(__pyx_tuple__741);
  __pyx_codeobj__280 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__741, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_from_dict, 2458, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__280)) __PYX_ERR(0, 2458, __pyx_L1_error)
  __pyx_tuple__742 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__742)) __PYX_ERR(0, 2458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__742);
  __Pyx_GIVEREF(__pyx_tuple__742);

  /* "km3pipe/dataclasses.pyx":2492
 * 
 *     @property
 *     def _constructor(self):             # <<<<<<<<<<<<<<
 *         return KM3DataFrame
 * 
 */
  __pyx_tuple__743 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__743)) __PYX_ERR(0, 2492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__743);
  __Pyx_GIVEREF(__pyx_tuple__743);
  __pyx_codeobj__281 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__743, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_constructor, 2492, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__281)) __PYX_ERR(0, 2492, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2495
 *         return KM3DataFrame
 * 
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         h5loc = kwargs.pop('h5loc', '/')
 *         super(KM3DataFrame, self).__init__(*args, **kwargs)
 */
  __pyx_tuple__744 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_h5loc); if (unlikely(!__pyx_tuple__744)) __PYX_ERR(0, 2495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__744);
  __Pyx_GIVEREF(__pyx_tuple__744);
  __pyx_codeobj__282 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__744, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_init, 2495, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__282)) __PYX_ERR(0, 2495, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2501
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __pyx_tuple__745 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__745)) __PYX_ERR(0, 2501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__745);
  __Pyx_GIVEREF(__pyx_tuple__745);
  __pyx_codeobj__284 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__745, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_deserialise, 2501, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__284)) __PYX_ERR(0, 2501, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2504
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __pyx_tuple__746 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__746)) __PYX_ERR(0, 2504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__746);
  __Pyx_GIVEREF(__pyx_tuple__746);
  __pyx_codeobj__285 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__746, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_serialise, 2504, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__285)) __PYX_ERR(0, 2504, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2508
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt in {'numpy', 'pandas'}:
 *             return cls(data, h5loc=h5loc, **kwargs)
 */
  __pyx_tuple__747 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_data, __pyx_n_s_event_id, __pyx_n_s_h5loc, __pyx_n_s_fmt, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__747)) __PYX_ERR(0, 2508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__747);
  __Pyx_GIVEREF(__pyx_tuple__747);
  __pyx_codeobj__286 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__747, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_from, 2508, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__286)) __PYX_ERR(0, 2508, __pyx_L1_error)
  __pyx_tuple__748 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject*)__pyx_kp_s__2), ((PyObject*)__pyx_n_s_pandas)); if (unlikely(!__pyx_tuple__748)) __PYX_ERR(0, 2508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__748);
  __Pyx_GIVEREF(__pyx_tuple__748);

  /* "km3pipe/dataclasses.pyx":2514
 *             return cls(data, index=[0], h5loc=h5loc, **kwargs)
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __pyx_tuple__749 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_to, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__749)) __PYX_ERR(0, 2514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__749);
  __Pyx_GIVEREF(__pyx_tuple__749);
  __pyx_codeobj__287 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__749, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_conv_to, 2514, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__287)) __PYX_ERR(0, 2514, __pyx_L1_error)
  __pyx_tuple__750 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_numpy)); if (unlikely(!__pyx_tuple__750)) __PYX_ERR(0, 2514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__750);
  __Pyx_GIVEREF(__pyx_tuple__750);

  /* "km3pipe/dataclasses.pyx":2534
 * 
 * 
 * class BinaryStruct(object):             # <<<<<<<<<<<<<<
 *     """A binary struct superclass which parses itself from a given stream.
 * 
 */
  __pyx_tuple__751 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__751)) __PYX_ERR(0, 2534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__751);
  __Pyx_GIVEREF(__pyx_tuple__751);

  /* "km3pipe/dataclasses.pyx":2551
 *     _fields = ()
 * 
 *     def __init__(self, stream):             # <<<<<<<<<<<<<<
 *         data = Struct(self._structure).unpack_from(stream.read(self._size))
 *         for attr, value in zip(self._fields, data):
 */
  __pyx_tuple__752 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_data, __pyx_n_s_attr, __pyx_n_s_value); if (unlikely(!__pyx_tuple__752)) __PYX_ERR(0, 2551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__752);
  __Pyx_GIVEREF(__pyx_tuple__752);
  __pyx_codeobj__288 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__752, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_init, 2551, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__288)) __PYX_ERR(0, 2551, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2557
 * 
 *     @property
 *     def _size(self):             # <<<<<<<<<<<<<<
 *         return calcsize(self._structure)
 * 
 */
  __pyx_tuple__753 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__753)) __PYX_ERR(0, 2557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__753);
  __Pyx_GIVEREF(__pyx_tuple__753);
  __pyx_codeobj__289 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__753, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_size, 2557, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__289)) __PYX_ERR(0, 2557, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2561
 * 
 * 
 * class BinaryComposite(object):             # <<<<<<<<<<<<<<
 *     """A composition of BinaryStructs."""
 *     _structure = ''
 */
  __pyx_tuple__754 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__754)) __PYX_ERR(0, 2561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__754);
  __Pyx_GIVEREF(__pyx_tuple__754);

  /* "km3pipe/dataclasses.pyx":2565
 *     _structure = ''
 * 
 *     def __init__(sefl, stream):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_tuple__755 = PyTuple_Pack(2, __pyx_n_s_sefl, __pyx_n_s_stream); if (unlikely(!__pyx_tuple__755)) __PYX_ERR(0, 2565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__755);
  __Pyx_GIVEREF(__pyx_tuple__755);
  __pyx_codeobj__290 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__755, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_km3pipe_dataclasses_pyx, __pyx_n_s_init, 2565, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__290)) __PYX_ERR(0, 2565, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_float_0_ = PyFloat_FromDouble(0.); if (unlikely(!__pyx_float_0_)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initdataclasses(void); /*proto*/
PyMODINIT_FUNC initdataclasses(void)
#else
PyMODINIT_FUNC PyInit_dataclasses(void); /*proto*/
PyMODINIT_FUNC PyInit_dataclasses(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        result = PyDict_SetItemString(moddict, to_name, value);
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static int __pyx_pymod_exec_dataclasses(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
  #endif
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_dataclasses(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("dataclasses", __pyx_methods, __pyx_k__300, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_km3pipe__dataclasses) {
    if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "km3pipe.dataclasses")) {
      if (unlikely(PyDict_SetItemString(modules, "km3pipe.dataclasses", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses_Hit) < 0) __PYX_ERR(0, 511, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses_Hit.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "Hit", (PyObject *)&__pyx_type_7km3pipe_11dataclasses_Hit) < 0) __PYX_ERR(0, 511, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7km3pipe_11dataclasses_Hit) < 0) __PYX_ERR(0, 511, __pyx_L1_error)
  __pyx_ptype_7km3pipe_11dataclasses_Hit = &__pyx_type_7km3pipe_11dataclasses_Hit;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses_RawHit) < 0) __PYX_ERR(0, 589, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses_RawHit.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "RawHit", (PyObject *)&__pyx_type_7km3pipe_11dataclasses_RawHit) < 0) __PYX_ERR(0, 589, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7km3pipe_11dataclasses_RawHit) < 0) __PYX_ERR(0, 589, __pyx_L1_error)
  __pyx_ptype_7km3pipe_11dataclasses_RawHit = &__pyx_type_7km3pipe_11dataclasses_RawHit;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses_CRawHit) < 0) __PYX_ERR(0, 632, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses_CRawHit.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "CRawHit", (PyObject *)&__pyx_type_7km3pipe_11dataclasses_CRawHit) < 0) __PYX_ERR(0, 632, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7km3pipe_11dataclasses_CRawHit) < 0) __PYX_ERR(0, 632, __pyx_L1_error)
  __pyx_ptype_7km3pipe_11dataclasses_CRawHit = &__pyx_type_7km3pipe_11dataclasses_CRawHit;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses_TimesliceHit) < 0) __PYX_ERR(0, 697, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses_TimesliceHit.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "TimesliceHit", (PyObject *)&__pyx_type_7km3pipe_11dataclasses_TimesliceHit) < 0) __PYX_ERR(0, 697, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7km3pipe_11dataclasses_TimesliceHit) < 0) __PYX_ERR(0, 697, __pyx_L1_error)
  __pyx_ptype_7km3pipe_11dataclasses_TimesliceHit = &__pyx_type_7km3pipe_11dataclasses_TimesliceHit;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses_McHit) < 0) __PYX_ERR(0, 736, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses_McHit.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "McHit", (PyObject *)&__pyx_type_7km3pipe_11dataclasses_McHit) < 0) __PYX_ERR(0, 736, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7km3pipe_11dataclasses_McHit) < 0) __PYX_ERR(0, 736, __pyx_L1_error)
  __pyx_ptype_7km3pipe_11dataclasses_McHit = &__pyx_type_7km3pipe_11dataclasses_McHit;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses_Track) < 0) __PYX_ERR(0, 774, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses_Track.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "Track", (PyObject *)&__pyx_type_7km3pipe_11dataclasses_Track) < 0) __PYX_ERR(0, 774, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7km3pipe_11dataclasses_Track) < 0) __PYX_ERR(0, 774, __pyx_L1_error)
  __pyx_ptype_7km3pipe_11dataclasses_Track = &__pyx_type_7km3pipe_11dataclasses_Track;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses_McTrack) < 0) __PYX_ERR(0, 1079, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses_McTrack.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "McTrack", (PyObject *)&__pyx_type_7km3pipe_11dataclasses_McTrack) < 0) __PYX_ERR(0, 1079, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7km3pipe_11dataclasses_McTrack) < 0) __PYX_ERR(0, 1079, __pyx_L1_error)
  __pyx_ptype_7km3pipe_11dataclasses_McTrack = &__pyx_type_7km3pipe_11dataclasses_McTrack;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct__from_row) < 0) __PYX_ERR(0, 421, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct__from_row.tp_print = 0;
  __pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct__from_row = &__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct__from_row;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 422, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr.tp_print = 0;
  __pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr = &__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_1_genexpr;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator) < 0) __PYX_ERR(0, 1982, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator.tp_print = 0;
  __pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator = &__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_2__slice_generator;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator) < 0) __PYX_ERR(0, 2285, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator.tp_print = 0;
  __pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator = &__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_3__slice_generator;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator) < 0) __PYX_ERR(0, 2400, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator.tp_print = 0;
  __pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator = &__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_4__slice_generator;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict) < 0) __PYX_ERR(0, 2458, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict.tp_print = 0;
  __pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict = &__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_5_from_dict;
  if (PyType_Ready(&__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr) < 0) __PYX_ERR(0, 2461, __pyx_L1_error)
  __pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr.tp_print = 0;
  __pyx_ptype_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr = &__pyx_type_7km3pipe_11dataclasses___pyx_scope_struct_6_genexpr;
  /*--- Type import code ---*/
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
  #if CYTHON_COMPILING_IN_PYPY
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(3, 9, __pyx_L1_error)
  __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) __PYX_ERR(2, 163, __pyx_L1_error)
  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) __PYX_ERR(2, 185, __pyx_L1_error)
  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) __PYX_ERR(2, 189, __pyx_L1_error)
  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) __PYX_ERR(2, 198, __pyx_L1_error)
  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) __PYX_ERR(2, 885, __pyx_L1_error)
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __Pyx_TraceCall("PyMODINIT_FUNC PyInit_dataclasses(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));

  /* "km3pipe/dataclasses.pyx":14
 * from __future__ import division, absolute_import, print_function
 * 
 * from collections import namedtuple             # <<<<<<<<<<<<<<
 * import ctypes
 * from libcpp cimport bool as c_bool  # noqa
 */
  __Pyx_TraceLine(14,0,__PYX_ERR(0, 14, __pyx_L1_error))
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_namedtuple);
  __Pyx_GIVEREF(__pyx_n_s_namedtuple);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_namedtuple);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_namedtuple, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":15
 * 
 * from collections import namedtuple
 * import ctypes             # <<<<<<<<<<<<<<
 * from libcpp cimport bool as c_bool  # noqa
 * from six import with_metaclass
 */
  __Pyx_TraceLine(15,0,__PYX_ERR(0, 15, __pyx_L1_error))
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_ctypes, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ctypes, __pyx_t_2) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":17
 * import ctypes
 * from libcpp cimport bool as c_bool  # noqa
 * from six import with_metaclass             # <<<<<<<<<<<<<<
 * from struct import Struct, calcsize
 * 
 */
  __Pyx_TraceLine(17,0,__PYX_ERR(0, 17, __pyx_L1_error))
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_with_metaclass);
  __Pyx_GIVEREF(__pyx_n_s_with_metaclass);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_with_metaclass);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_six, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_with_metaclass); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_with_metaclass, __pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":18
 * from libcpp cimport bool as c_bool  # noqa
 * from six import with_metaclass
 * from struct import Struct, calcsize             # <<<<<<<<<<<<<<
 * 
 * import numpy as np
 */
  __Pyx_TraceLine(18,0,__PYX_ERR(0, 18, __pyx_L1_error))
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Struct);
  __Pyx_GIVEREF(__pyx_n_s_Struct);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Struct);
  __Pyx_INCREF(__pyx_n_s_calcsize);
  __Pyx_GIVEREF(__pyx_n_s_calcsize);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_calcsize);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_struct, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Struct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Struct, __pyx_t_1) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_calcsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calcsize, __pyx_t_1) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":20
 * from struct import Struct, calcsize
 * 
 * import numpy as np             # <<<<<<<<<<<<<<
 * from numpy.lib import recfunctions as rfn
 * cimport numpy as np
 */
  __Pyx_TraceLine(20,0,__PYX_ERR(0, 20, __pyx_L1_error))
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":21
 * 
 * import numpy as np
 * from numpy.lib import recfunctions as rfn             # <<<<<<<<<<<<<<
 * cimport numpy as np
 * cimport cython
 */
  __Pyx_TraceLine(21,0,__PYX_ERR(0, 21, __pyx_L1_error))
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_recfunctions);
  __Pyx_GIVEREF(__pyx_n_s_recfunctions);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_recfunctions);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy_lib, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_recfunctions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_rfn, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":24
 * cimport numpy as np
 * cimport cython
 * import pandas as pd             # <<<<<<<<<<<<<<
 * 
 * np.import_array()
 */
  __Pyx_TraceLine(24,0,__PYX_ERR(0, 24, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_pandas, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pd, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":26
 * import pandas as pd
 * 
 * np.import_array()             # <<<<<<<<<<<<<<
 * 
 * from .math import angle_between
 */
  __Pyx_TraceLine(26,0,__PYX_ERR(0, 26, __pyx_L1_error))
  __pyx_t_3 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 26, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":28
 * np.import_array()
 * 
 * from .math import angle_between             # <<<<<<<<<<<<<<
 * from .mc import geant2pdg, pdg2name
 * 
 */
  __Pyx_TraceLine(28,0,__PYX_ERR(0, 28, __pyx_L1_error))
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_angle_between);
  __Pyx_GIVEREF(__pyx_n_s_angle_between);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_angle_between);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_math, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_angle_between); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_angle_between, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":29
 * 
 * from .math import angle_between
 * from .mc import geant2pdg, pdg2name             # <<<<<<<<<<<<<<
 * 
 * __author__ = "Tamas Gal and Moritz Lotze"
 */
  __Pyx_TraceLine(29,0,__PYX_ERR(0, 29, __pyx_L1_error))
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_geant2pdg);
  __Pyx_GIVEREF(__pyx_n_s_geant2pdg);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_geant2pdg);
  __Pyx_INCREF(__pyx_n_s_pdg2name);
  __Pyx_GIVEREF(__pyx_n_s_pdg2name);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_pdg2name);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_mc, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_geant2pdg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_geant2pdg, __pyx_t_2) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_pdg2name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pdg2name, __pyx_t_2) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":31
 * from .mc import geant2pdg, pdg2name
 * 
 * __author__ = "Tamas Gal and Moritz Lotze"             # <<<<<<<<<<<<<<
 * __copyright__ = "Copyright 2016, Tamas Gal and the KM3NeT collaboration."
 * __credits__ = []
 */
  __Pyx_TraceLine(31,0,__PYX_ERR(0, 31, __pyx_L1_error))
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_author, __pyx_kp_s_Tamas_Gal_and_Moritz_Lotze) < 0) __PYX_ERR(0, 31, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":32
 * 
 * __author__ = "Tamas Gal and Moritz Lotze"
 * __copyright__ = "Copyright 2016, Tamas Gal and the KM3NeT collaboration."             # <<<<<<<<<<<<<<
 * __credits__ = []
 * __license__ = "MIT"
 */
  __Pyx_TraceLine(32,0,__PYX_ERR(0, 32, __pyx_L1_error))
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_copyright, __pyx_kp_s_Copyright_2016_Tamas_Gal_and_the) < 0) __PYX_ERR(0, 32, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":33
 * __author__ = "Tamas Gal and Moritz Lotze"
 * __copyright__ = "Copyright 2016, Tamas Gal and the KM3NeT collaboration."
 * __credits__ = []             # <<<<<<<<<<<<<<
 * __license__ = "MIT"
 * __maintainer__ = "Tamas Gal and Moritz Lotze"
 */
  __Pyx_TraceLine(33,0,__PYX_ERR(0, 33, __pyx_L1_error))
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_credits, __pyx_t_1) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":34
 * __copyright__ = "Copyright 2016, Tamas Gal and the KM3NeT collaboration."
 * __credits__ = []
 * __license__ = "MIT"             # <<<<<<<<<<<<<<
 * __maintainer__ = "Tamas Gal and Moritz Lotze"
 * __email__ = "tgal@km3net.de"
 */
  __Pyx_TraceLine(34,0,__PYX_ERR(0, 34, __pyx_L1_error))
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_license, __pyx_n_s_MIT) < 0) __PYX_ERR(0, 34, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":35
 * __credits__ = []
 * __license__ = "MIT"
 * __maintainer__ = "Tamas Gal and Moritz Lotze"             # <<<<<<<<<<<<<<
 * __email__ = "tgal@km3net.de"
 * __status__ = "Development"
 */
  __Pyx_TraceLine(35,0,__PYX_ERR(0, 35, __pyx_L1_error))
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_maintainer, __pyx_kp_s_Tamas_Gal_and_Moritz_Lotze) < 0) __PYX_ERR(0, 35, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":36
 * __license__ = "MIT"
 * __maintainer__ = "Tamas Gal and Moritz Lotze"
 * __email__ = "tgal@km3net.de"             # <<<<<<<<<<<<<<
 * __status__ = "Development"
 * __all__ = ('EventInfo', 'Point', 'Position', 'Direction', 'HitSeries',
 */
  __Pyx_TraceLine(36,0,__PYX_ERR(0, 36, __pyx_L1_error))
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_email, __pyx_kp_s_tgal_km3net_de) < 0) __PYX_ERR(0, 36, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":37
 * __maintainer__ = "Tamas Gal and Moritz Lotze"
 * __email__ = "tgal@km3net.de"
 * __status__ = "Development"             # <<<<<<<<<<<<<<
 * __all__ = ('EventInfo', 'Point', 'Position', 'Direction', 'HitSeries',
 *            'RawHitSeries', 'TimesliceHitSeries', 'Hit', 'McHit', 'McTrack',
 */
  __Pyx_TraceLine(37,0,__PYX_ERR(0, 37, __pyx_L1_error))
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_status, __pyx_n_s_Development) < 0) __PYX_ERR(0, 37, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":38
 * __email__ = "tgal@km3net.de"
 * __status__ = "Development"
 * __all__ = ('EventInfo', 'Point', 'Position', 'Direction', 'HitSeries',             # <<<<<<<<<<<<<<
 *            'RawHitSeries', 'TimesliceHitSeries', 'Hit', 'McHit', 'McTrack',
 *            'McTrackSeries', 'Track', 'TrackSeries', 'Serialisable',
 */
  __Pyx_TraceLine(38,0,__PYX_ERR(0, 38, __pyx_L1_error))
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_tuple__301) < 0) __PYX_ERR(0, 38, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":45
 * 
 * IS_CC = {
 *     3: 0,         # False,             # <<<<<<<<<<<<<<
 *     2: 1,         # True,
 *     1: 0,         # False,
 */
  __Pyx_TraceLine(45,0,__PYX_ERR(0, 45, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_int_3, __pyx_int_0) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_int_2, __pyx_int_1) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_int_1, __pyx_int_0) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_int_0, __pyx_int_1) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_IS_CC, __pyx_t_1) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":52
 * 
 * 
 * class Serialisable(type):             # <<<<<<<<<<<<<<
 *     """A metaclass for serialisable classes.
 * 
 */
  __Pyx_TraceLine(52,0,__PYX_ERR(0, 52, __pyx_L1_error))
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)(&PyType_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyType_Type)));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyType_Type)));
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_Serialisable, __pyx_n_s_Serialisable, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_A_metaclass_for_serialisable_cla); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":67
 * 
 *     """
 *     def __new__(metaclass, class_name, class_parents, class_attr):             # <<<<<<<<<<<<<<
 *         attr = {'h5loc': '/'}
 *         for name, val in class_attr.items():
 */
  __Pyx_TraceLine(67,0,__PYX_ERR(0, 67, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12Serialisable_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Serialisable___new, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj_)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_new, __pyx_t_5) < 0) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":52
 * 
 * 
 * class Serialisable(type):             # <<<<<<<<<<<<<<
 *     """A metaclass for serialisable classes.
 * 
 */
  __Pyx_TraceLine(52,0,__PYX_ERR(0, 52, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_Serialisable, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Serialisable, __pyx_t_5) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":89
 * 
 * 
 * class DTypeAttr(object):             # <<<<<<<<<<<<<<
 *     """Helper class to make dtype names accessible using the dot-syntax
 * 
 */
  __Pyx_TraceLine(89,0,__PYX_ERR(0, 89, __pyx_L1_error))
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__303); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__303, __pyx_n_s_DTypeAttr, __pyx_n_s_DTypeAttr, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Helper_class_to_make_dtype_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "km3pipe/dataclasses.pyx":95
 *     with ``names``.
 *     """
 *     def __getattr__(self, name):             # <<<<<<<<<<<<<<
 *         if not hasattr(self, "dtype"):
 *             raise AttributeError
 */
  __Pyx_TraceLine(95,0,__PYX_ERR(0, 95, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9DTypeAttr_1__getattr__, 0, __pyx_n_s_DTypeAttr___getattr, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_getattr, __pyx_t_4) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":103
 *             raise AttributeError
 * 
 *     def sorted(self, by='time'):             # <<<<<<<<<<<<<<
 *         sort_idc = np.argsort(self._arr[by])
 *         return self.__class__(self._arr[sort_idc], self.event_id)
 */
  __Pyx_TraceLine(103,0,__PYX_ERR(0, 103, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9DTypeAttr_3sorted, 0, __pyx_n_s_DTypeAttr_sorted, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__306);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_sorted, __pyx_t_4) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":107
 *         return self.__class__(self._arr[sort_idc], self.event_id)
 * 
 *     def append_fields(self, fields, values, **kwargs):             # <<<<<<<<<<<<<<
 *         """Uses `numpy.lib.recfunctions.append_fields` to append new fields."""
 *         new_arr = rfn.append_fields(self._arr, fields, values,
 */
  __Pyx_TraceLine(107,0,__PYX_ERR(0, 107, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9DTypeAttr_5append_fields, 0, __pyx_n_s_DTypeAttr_append_fields, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_append_fields, __pyx_t_4) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":114
 *         self.dtype = new_arr.dtype
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __Pyx_TraceLine(114,0,__PYX_ERR(0, 114, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9DTypeAttr_7__array__, 0, __pyx_n_s_DTypeAttr___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_array, __pyx_t_4) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":117
 *         return self._arr
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         """Preliminary interface for accessing single elements, which
 *         otherwise return a `np.void`"""
 */
  __Pyx_TraceLine(117,0,__PYX_ERR(0, 117, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9DTypeAttr_9__getitem__, 0, __pyx_n_s_DTypeAttr___getitem, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_getitem, __pyx_t_4) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":89
 * 
 * 
 * class DTypeAttr(object):             # <<<<<<<<<<<<<<
 *     """Helper class to make dtype names accessible using the dot-syntax
 * 
 */
  __Pyx_TraceLine(89,0,__PYX_ERR(0, 89, __pyx_L1_error))
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DTypeAttr, __pyx_tuple__303, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DTypeAttr, __pyx_t_4) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":128
 * 
 * 
 * class AttrVoid(np.ndarray):             # <<<<<<<<<<<<<<
 *     """Allow `np.void` instances to access their fields via attributes."""
 *     def __new__(cls, input_array):
 */
  __Pyx_TraceLine(128,0,__PYX_ERR(0, 128, __pyx_L1_error))
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_5numpy_ndarray));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_5numpy_ndarray));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_5numpy_ndarray));
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_AttrVoid, __pyx_n_s_AttrVoid, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Allow_np_void_instances_to_acces); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":130
 * class AttrVoid(np.ndarray):
 *     """Allow `np.void` instances to access their fields via attributes."""
 *     def __new__(cls, input_array):             # <<<<<<<<<<<<<<
 *         obj = np.asarray(input_array).view(cls)
 *         if obj.dtype.names is not None:
 */
  __Pyx_TraceLine(130,0,__PYX_ERR(0, 130, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_8AttrVoid_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_AttrVoid___new, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_new, __pyx_t_5) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":128
 * 
 * 
 * class AttrVoid(np.ndarray):             # <<<<<<<<<<<<<<
 *     """Allow `np.void` instances to access their fields via attributes."""
 *     def __new__(cls, input_array):
 */
  __Pyx_TraceLine(128,0,__PYX_ERR(0, 128, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AttrVoid, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_AttrVoid, __pyx_t_5) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":138
 * 
 * 
 * class Convertible(object):             # <<<<<<<<<<<<<<
 *     """Implements basic conversion methods."""
 *     @classmethod
 */
  __Pyx_TraceLine(138,0,__PYX_ERR(0, 138, __pyx_L1_error))
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__311); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__311, __pyx_n_s_Convertible, __pyx_n_s_Convertible, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Implements_basic_conversion_meth); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "km3pipe/dataclasses.pyx":141
 *     """Implements basic conversion methods."""
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(141,0,__PYX_ERR(0, 141, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11Convertible_1deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_Convertible_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":140
 * class Convertible(object):
 *     """Implements basic conversion methods."""
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(140,0,__PYX_ERR(0, 140, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_deserialise, __pyx_t_5) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":144
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(144,0,__PYX_ERR(0, 144, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11Convertible_3serialise, 0, __pyx_n_s_Convertible_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_serialise, __pyx_t_5) < 0) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":148
 * 
 *     @classmethod
 *     def conv_from(cls, data, data_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */
  __Pyx_TraceLine(148,0,__PYX_ERR(0, 148, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11Convertible_5conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_Convertible_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__315);

  /* "km3pipe/dataclasses.pyx":147
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, data_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(147,0,__PYX_ERR(0, 147, __pyx_L1_error))
  __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_conv_from, __pyx_t_4) < 0) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":152
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __Pyx_TraceLine(152,0,__PYX_ERR(0, 152, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11Convertible_7conv_to, 0, __pyx_n_s_Convertible_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__317);
  if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_conv_to, __pyx_t_4) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":138
 * 
 * 
 * class Convertible(object):             # <<<<<<<<<<<<<<
 *     """Implements basic conversion methods."""
 *     @classmethod
 */
  __Pyx_TraceLine(138,0,__PYX_ERR(0, 138, __pyx_L1_error))
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Convertible, __pyx_tuple__311, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Convertible, __pyx_t_4) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":159
 * 
 * 
 * class SummarysliceInfo(with_metaclass(Serialisable)):             # <<<<<<<<<<<<<<
 *     """JDAQSummaryslice Metadata.
 *     """
 */
  __Pyx_TraceLine(159,0,__PYX_ERR(0, 159, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_with_metaclass); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Serialisable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_SummarysliceInfo, __pyx_n_s_SummarysliceInfo, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_JDAQSummaryslice_Metadata); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":162
 *     """JDAQSummaryslice Metadata.
 *     """
 *     h5loc = '/summary_slice'             # <<<<<<<<<<<<<<
 *     dtype = np.dtype([
 *         ('det_id', '<i4'),
 */
  __Pyx_TraceLine(162,0,__PYX_ERR(0, 162, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_h5loc, __pyx_kp_s_summary_slice) < 0) __PYX_ERR(0, 162, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":163
 *     """
 *     h5loc = '/summary_slice'
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('det_id', '<i4'),
 *         ('frame_index', '<u4'),
 */
  __Pyx_TraceLine(163,0,__PYX_ERR(0, 163, __pyx_L1_error))
  __pyx_t_4 = PyList_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_tuple__318);
  __Pyx_GIVEREF(__pyx_tuple__318);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_tuple__318);
  __Pyx_INCREF(__pyx_tuple__319);
  __Pyx_GIVEREF(__pyx_tuple__319);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_tuple__319);
  __Pyx_INCREF(__pyx_tuple__320);
  __Pyx_GIVEREF(__pyx_tuple__320);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_tuple__320);
  __Pyx_INCREF(__pyx_tuple__321);
  __Pyx_GIVEREF(__pyx_tuple__321);
  PyList_SET_ITEM(__pyx_t_4, 3, __pyx_tuple__321);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":171
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */
  __Pyx_TraceLine(171,0,__PYX_ERR(0, 171, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_1from_table, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummarysliceInfo_from_table, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":170
 *     ])
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_table(cls, row):
 *         args = []
 */
  __Pyx_TraceLine(170,0,__PYX_ERR(0, 170, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_from_table, __pyx_t_5) < 0) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":181
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(181,0,__PYX_ERR(0, 181, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_3deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummarysliceInfo_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":180
 *         return cls(*args)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(180,0,__PYX_ERR(0, 180, __pyx_L1_error))
  __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_deserialise, __pyx_t_4) < 0) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":184
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(184,0,__PYX_ERR(0, 184, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_5serialise, 0, __pyx_n_s_SummarysliceInfo_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_serialise, __pyx_t_4) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":188
 * 
 *     @classmethod
 *     def conv_from(cls, data, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */
  __Pyx_TraceLine(188,0,__PYX_ERR(0, 188, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_7conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummarysliceInfo_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__326);

  /* "km3pipe/dataclasses.pyx":187
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(187,0,__PYX_ERR(0, 187, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_conv_from, __pyx_t_5) < 0) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":192
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __Pyx_TraceLine(192,0,__PYX_ERR(0, 192, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_9conv_to, 0, __pyx_n_s_SummarysliceInfo_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__328);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_conv_to, __pyx_t_5) < 0) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":198
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             self.det_id, self.frame_index, self.run_id, self.slice_id,
 */
  __Pyx_TraceLine(198,0,__PYX_ERR(0, 198, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_11__array__, 0, __pyx_n_s_SummarysliceInfo___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_array, __pyx_t_5) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":203
 *         ), ], dtype=self.dtype)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Summaryslice #{0}:\n" \
 *                "    detector id:     {1}\n" \
 */
  __Pyx_TraceLine(203,0,__PYX_ERR(0, 203, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_13__str__, 0, __pyx_n_s_SummarysliceInfo___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_str, __pyx_t_5) < 0) __PYX_ERR(0, 203, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":212
 *                        )
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(212,0,__PYX_ERR(0, 212, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_15__insp__, 0, __pyx_n_s_SummarysliceInfo___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_insp, __pyx_t_5) < 0) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":215
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __Pyx_TraceLine(215,0,__PYX_ERR(0, 215, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummarysliceInfo_17__len__, 0, __pyx_n_s_SummarysliceInfo___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_len_2, __pyx_t_5) < 0) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":159
 * 
 * 
 * class SummarysliceInfo(with_metaclass(Serialisable)):             # <<<<<<<<<<<<<<
 *     """JDAQSummaryslice Metadata.
 *     """
 */
  __Pyx_TraceLine(159,0,__PYX_ERR(0, 159, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SummarysliceInfo, __pyx_t_2, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SummarysliceInfo, __pyx_t_5) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":219
 * 
 * 
 * TimesliceInfo = namedtuple('TimesliceInfo',             # <<<<<<<<<<<<<<
 *                            ['frame_index',
 *                             'slice_id',
 */
  __Pyx_TraceLine(219,0,__PYX_ERR(0, 219, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_namedtuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "km3pipe/dataclasses.pyx":220
 * 
 * TimesliceInfo = namedtuple('TimesliceInfo',
 *                            ['frame_index',             # <<<<<<<<<<<<<<
 *                             'slice_id',
 *                             'timestamp',
 */
  __Pyx_TraceLine(220,0,__PYX_ERR(0, 220, __pyx_L1_error))
  __pyx_t_6 = PyList_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_frame_index);
  __Pyx_GIVEREF(__pyx_n_s_frame_index);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_frame_index);
  __Pyx_INCREF(__pyx_n_s_slice_id);
  __Pyx_GIVEREF(__pyx_n_s_slice_id);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_slice_id);
  __Pyx_INCREF(__pyx_n_s_timestamp);
  __Pyx_GIVEREF(__pyx_n_s_timestamp);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_n_s_timestamp);
  __Pyx_INCREF(__pyx_n_s_nanoseconds);
  __Pyx_GIVEREF(__pyx_n_s_nanoseconds);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_n_s_nanoseconds);
  __Pyx_INCREF(__pyx_n_s_n_frames);
  __Pyx_GIVEREF(__pyx_n_s_n_frames);
  PyList_SET_ITEM(__pyx_t_6, 4, __pyx_n_s_n_frames);
  __pyx_t_5 = NULL;
  __pyx_t_3 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_3 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_TimesliceInfo, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_TimesliceInfo, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_TimesliceInfo);
    __Pyx_GIVEREF(__pyx_n_s_TimesliceInfo);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_3, __pyx_n_s_TimesliceInfo);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_3, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TimesliceInfo, __pyx_t_2) < 0) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":227
 * 
 * 
 * TimesliceFrameInfo = namedtuple('TimesliceFrameInfo',             # <<<<<<<<<<<<<<
 *                                 ['det_id',
 *                                  'run',
 */
  __Pyx_TraceLine(227,0,__PYX_ERR(0, 227, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_namedtuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "km3pipe/dataclasses.pyx":228
 * 
 * TimesliceFrameInfo = namedtuple('TimesliceFrameInfo',
 *                                 ['det_id',             # <<<<<<<<<<<<<<
 *                                  'run',
 *                                  'sqnr',  # frame_index ?
 */
  __Pyx_TraceLine(228,0,__PYX_ERR(0, 228, __pyx_L1_error))
  __pyx_t_4 = PyList_New(8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_s_det_id);
  __Pyx_GIVEREF(__pyx_n_s_det_id);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_det_id);
  __Pyx_INCREF(__pyx_n_s_run);
  __Pyx_GIVEREF(__pyx_n_s_run);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_run);
  __Pyx_INCREF(__pyx_n_s_sqnr);
  __Pyx_GIVEREF(__pyx_n_s_sqnr);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_s_sqnr);
  __Pyx_INCREF(__pyx_n_s_timestamp);
  __Pyx_GIVEREF(__pyx_n_s_timestamp);
  PyList_SET_ITEM(__pyx_t_4, 3, __pyx_n_s_timestamp);
  __Pyx_INCREF(__pyx_n_s_nanoseconds);
  __Pyx_GIVEREF(__pyx_n_s_nanoseconds);
  PyList_SET_ITEM(__pyx_t_4, 4, __pyx_n_s_nanoseconds);
  __Pyx_INCREF(__pyx_n_s_dom_id);
  __Pyx_GIVEREF(__pyx_n_s_dom_id);
  PyList_SET_ITEM(__pyx_t_4, 5, __pyx_n_s_dom_id);
  __Pyx_INCREF(__pyx_n_s_dom_status);
  __Pyx_GIVEREF(__pyx_n_s_dom_status);
  PyList_SET_ITEM(__pyx_t_4, 6, __pyx_n_s_dom_status);
  __Pyx_INCREF(__pyx_n_s_n_hits);
  __Pyx_GIVEREF(__pyx_n_s_n_hits);
  PyList_SET_ITEM(__pyx_t_4, 7, __pyx_n_s_n_hits);
  __pyx_t_6 = NULL;
  __pyx_t_3 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_3 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_TimesliceFrameInfo, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_TimesliceFrameInfo, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_TimesliceFrameInfo);
    __Pyx_GIVEREF(__pyx_n_s_TimesliceFrameInfo);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_3, __pyx_n_s_TimesliceFrameInfo);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_3, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TimesliceFrameInfo, __pyx_t_2) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":238
 * 
 * 
 * SummarysliceInfo = namedtuple('SummarysliceInfo',             # <<<<<<<<<<<<<<
 *                               ['frame_index',
 *                                'slice_id',
 */
  __Pyx_TraceLine(238,0,__PYX_ERR(0, 238, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_namedtuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "km3pipe/dataclasses.pyx":239
 * 
 * SummarysliceInfo = namedtuple('SummarysliceInfo',
 *                               ['frame_index',             # <<<<<<<<<<<<<<
 *                                'slice_id',
 *                                'timestamp',
 */
  __Pyx_TraceLine(239,0,__PYX_ERR(0, 239, __pyx_L1_error))
  __pyx_t_5 = PyList_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_frame_index);
  __Pyx_GIVEREF(__pyx_n_s_frame_index);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_frame_index);
  __Pyx_INCREF(__pyx_n_s_slice_id);
  __Pyx_GIVEREF(__pyx_n_s_slice_id);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_slice_id);
  __Pyx_INCREF(__pyx_n_s_timestamp);
  __Pyx_GIVEREF(__pyx_n_s_timestamp);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_n_s_timestamp);
  __Pyx_INCREF(__pyx_n_s_nanoseconds);
  __Pyx_GIVEREF(__pyx_n_s_nanoseconds);
  PyList_SET_ITEM(__pyx_t_5, 3, __pyx_n_s_nanoseconds);
  __Pyx_INCREF(__pyx_n_s_n_frames);
  __Pyx_GIVEREF(__pyx_n_s_n_frames);
  PyList_SET_ITEM(__pyx_t_5, 4, __pyx_n_s_n_frames);
  __pyx_t_4 = NULL;
  __pyx_t_3 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_3 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_SummarysliceInfo, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_SummarysliceInfo, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_SummarysliceInfo);
    __Pyx_GIVEREF(__pyx_n_s_SummarysliceInfo);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_3, __pyx_n_s_SummarysliceInfo);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_3, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SummarysliceInfo, __pyx_t_2) < 0) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":246
 * 
 * 
 * class TimesliceFrameInfo_(with_metaclass(Serialisable)):             # <<<<<<<<<<<<<<
 *     """JDAQTimeslice frame metadata.
 *     """
 */
  __Pyx_TraceLine(246,0,__PYX_ERR(0, 246, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_with_metaclass); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Serialisable); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_TimesliceFrameInfo_2, __pyx_n_s_TimesliceFrameInfo_2, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_JDAQTimeslice_frame_metadata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":249
 *     """JDAQTimeslice frame metadata.
 *     """
 *     h5loc = '/time_slice_frame_info'             # <<<<<<<<<<<<<<
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),
 */
  __Pyx_TraceLine(249,0,__PYX_ERR(0, 249, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_h5loc, __pyx_kp_s_time_slice_frame_info) < 0) __PYX_ERR(0, 249, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":250
 *     """
 *     h5loc = '/time_slice_frame_info'
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('dom_id', '<u4'),
 *         ('fifo_status', '<u4'),
 */
  __Pyx_TraceLine(250,0,__PYX_ERR(0, 250, __pyx_L1_error))
  __pyx_t_6 = PyList_New(12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_tuple__333);
  __Pyx_GIVEREF(__pyx_tuple__333);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_tuple__333);
  __Pyx_INCREF(__pyx_tuple__334);
  __Pyx_GIVEREF(__pyx_tuple__334);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_tuple__334);
  __Pyx_INCREF(__pyx_tuple__335);
  __Pyx_GIVEREF(__pyx_tuple__335);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_tuple__335);
  __Pyx_INCREF(__pyx_tuple__336);
  __Pyx_GIVEREF(__pyx_tuple__336);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_tuple__336);
  __Pyx_INCREF(__pyx_tuple__337);
  __Pyx_GIVEREF(__pyx_tuple__337);
  PyList_SET_ITEM(__pyx_t_6, 4, __pyx_tuple__337);
  __Pyx_INCREF(__pyx_tuple__338);
  __Pyx_GIVEREF(__pyx_tuple__338);
  PyList_SET_ITEM(__pyx_t_6, 5, __pyx_tuple__338);
  __Pyx_INCREF(__pyx_tuple__339);
  __Pyx_GIVEREF(__pyx_tuple__339);
  PyList_SET_ITEM(__pyx_t_6, 6, __pyx_tuple__339);
  __Pyx_INCREF(__pyx_tuple__340);
  __Pyx_GIVEREF(__pyx_tuple__340);
  PyList_SET_ITEM(__pyx_t_6, 7, __pyx_tuple__340);
  __Pyx_INCREF(__pyx_tuple__341);
  __Pyx_GIVEREF(__pyx_tuple__341);
  PyList_SET_ITEM(__pyx_t_6, 8, __pyx_tuple__341);
  __Pyx_INCREF(__pyx_tuple__342);
  __Pyx_GIVEREF(__pyx_tuple__342);
  PyList_SET_ITEM(__pyx_t_6, 9, __pyx_tuple__342);
  __Pyx_INCREF(__pyx_tuple__343);
  __Pyx_GIVEREF(__pyx_tuple__343);
  PyList_SET_ITEM(__pyx_t_6, 10, __pyx_tuple__343);
  __Pyx_INCREF(__pyx_tuple__344);
  __Pyx_GIVEREF(__pyx_tuple__344);
  PyList_SET_ITEM(__pyx_t_6, 11, __pyx_tuple__344);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":266
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */
  __Pyx_TraceLine(266,0,__PYX_ERR(0, 266, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__1from_table, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TimesliceFrameInfo__from_table, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":265
 *     ])
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_table(cls, row):
 *         args = []
 */
  __Pyx_TraceLine(265,0,__PYX_ERR(0, 265, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_from_table, __pyx_t_5) < 0) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":276
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(276,0,__PYX_ERR(0, 276, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__3deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TimesliceFrameInfo__deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":275
 *         return cls(*args)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(275,0,__PYX_ERR(0, 275, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_deserialise, __pyx_t_6) < 0) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":279
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(279,0,__PYX_ERR(0, 279, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__5serialise, 0, __pyx_n_s_TimesliceFrameInfo__serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_serialise, __pyx_t_6) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":283
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */
  __Pyx_TraceLine(283,0,__PYX_ERR(0, 283, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__7conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TimesliceFrameInfo__conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__349);

  /* "km3pipe/dataclasses.pyx":282
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(282,0,__PYX_ERR(0, 282, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_from, __pyx_t_5) < 0) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":287
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __Pyx_TraceLine(287,0,__PYX_ERR(0, 287, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__9conv_to, 0, __pyx_n_s_TimesliceFrameInfo__conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__351);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_conv_to, __pyx_t_5) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":293
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 */
  __Pyx_TraceLine(293,0,__PYX_ERR(0, 293, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__11__array__, 0, __pyx_n_s_TimesliceFrameInfo____array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_array, __pyx_t_5) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":301
 *         ), ], dtype=self.dtype)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Timeslice frame:\n" \
 *                "    slice id: {0}\n" \
 */
  __Pyx_TraceLine(301,0,__PYX_ERR(0, 301, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__13__str__, 0, __pyx_n_s_TimesliceFrameInfo____str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_str, __pyx_t_5) < 0) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":311
 *                        self.max_sequence_number)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(311,0,__PYX_ERR(0, 311, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__15__insp__, 0, __pyx_n_s_TimesliceFrameInfo____insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_insp, __pyx_t_5) < 0) __PYX_ERR(0, 311, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":314
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __Pyx_TraceLine(314,0,__PYX_ERR(0, 314, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_19TimesliceFrameInfo__17__len__, 0, __pyx_n_s_TimesliceFrameInfo____len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_len_2, __pyx_t_5) < 0) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":246
 * 
 * 
 * class TimesliceFrameInfo_(with_metaclass(Serialisable)):             # <<<<<<<<<<<<<<
 *     """JDAQTimeslice frame metadata.
 *     """
 */
  __Pyx_TraceLine(246,0,__PYX_ERR(0, 246, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TimesliceFrameInfo_2, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TimesliceFrameInfo_2, __pyx_t_5) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":318
 * 
 * 
 * class SummaryframeInfo(with_metaclass(Serialisable)):             # <<<<<<<<<<<<<<
 *     """JDAQSummaryslice frame metadata.
 *     """
 */
  __Pyx_TraceLine(318,0,__PYX_ERR(0, 318, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_with_metaclass); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Serialisable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 318, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_SummaryframeInfo, __pyx_n_s_SummaryframeInfo, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_JDAQSummaryslice_frame_metadata); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":321
 *     """JDAQSummaryslice frame metadata.
 *     """
 *     h5loc = '/summary_slice_info'             # <<<<<<<<<<<<<<
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),
 */
  __Pyx_TraceLine(321,0,__PYX_ERR(0, 321, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_h5loc, __pyx_kp_s_summary_slice_info) < 0) __PYX_ERR(0, 321, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":322
 *     """
 *     h5loc = '/summary_slice_info'
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('dom_id', '<u4'),
 *         ('fifo_status', '<u4'),
 */
  __Pyx_TraceLine(322,0,__PYX_ERR(0, 322, __pyx_L1_error))
  __pyx_t_4 = PyList_New(12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_tuple__356);
  __Pyx_GIVEREF(__pyx_tuple__356);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_tuple__356);
  __Pyx_INCREF(__pyx_tuple__357);
  __Pyx_GIVEREF(__pyx_tuple__357);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_tuple__357);
  __Pyx_INCREF(__pyx_tuple__358);
  __Pyx_GIVEREF(__pyx_tuple__358);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_tuple__358);
  __Pyx_INCREF(__pyx_tuple__359);
  __Pyx_GIVEREF(__pyx_tuple__359);
  PyList_SET_ITEM(__pyx_t_4, 3, __pyx_tuple__359);
  __Pyx_INCREF(__pyx_tuple__360);
  __Pyx_GIVEREF(__pyx_tuple__360);
  PyList_SET_ITEM(__pyx_t_4, 4, __pyx_tuple__360);
  __Pyx_INCREF(__pyx_tuple__361);
  __Pyx_GIVEREF(__pyx_tuple__361);
  PyList_SET_ITEM(__pyx_t_4, 5, __pyx_tuple__361);
  __Pyx_INCREF(__pyx_tuple__362);
  __Pyx_GIVEREF(__pyx_tuple__362);
  PyList_SET_ITEM(__pyx_t_4, 6, __pyx_tuple__362);
  __Pyx_INCREF(__pyx_tuple__363);
  __Pyx_GIVEREF(__pyx_tuple__363);
  PyList_SET_ITEM(__pyx_t_4, 7, __pyx_tuple__363);
  __Pyx_INCREF(__pyx_tuple__364);
  __Pyx_GIVEREF(__pyx_tuple__364);
  PyList_SET_ITEM(__pyx_t_4, 8, __pyx_tuple__364);
  __Pyx_INCREF(__pyx_tuple__365);
  __Pyx_GIVEREF(__pyx_tuple__365);
  PyList_SET_ITEM(__pyx_t_4, 9, __pyx_tuple__365);
  __Pyx_INCREF(__pyx_tuple__366);
  __Pyx_GIVEREF(__pyx_tuple__366);
  PyList_SET_ITEM(__pyx_t_4, 10, __pyx_tuple__366);
  __Pyx_INCREF(__pyx_tuple__367);
  __Pyx_GIVEREF(__pyx_tuple__367);
  PyList_SET_ITEM(__pyx_t_4, 11, __pyx_tuple__367);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":338
 * 
 *     @classmethod
 *     def from_table(cls, row):             # <<<<<<<<<<<<<<
 *         args = []
 *         for col in cls.dtype.names:
 */
  __Pyx_TraceLine(338,0,__PYX_ERR(0, 338, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_1from_table, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummaryframeInfo_from_table, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "km3pipe/dataclasses.pyx":337
 *     ])
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_table(cls, row):
 *         args = []
 */
  __Pyx_TraceLine(337,0,__PYX_ERR(0, 337, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_from_table, __pyx_t_5) < 0) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":348
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(348,0,__PYX_ERR(0, 348, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_3deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummaryframeInfo_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":347
 *         return cls(*args)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(347,0,__PYX_ERR(0, 347, __pyx_L1_error))
  __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_deserialise, __pyx_t_4) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":351
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(351,0,__PYX_ERR(0, 351, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_5serialise, 0, __pyx_n_s_SummaryframeInfo_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_serialise, __pyx_t_4) < 0) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":355
 * 
 *     @classmethod
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data[0])
 */
  __Pyx_TraceLine(355,0,__PYX_ERR(0, 355, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_7conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummaryframeInfo_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__372);

  /* "km3pipe/dataclasses.pyx":354
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(354,0,__PYX_ERR(0, 354, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_conv_from, __pyx_t_5) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":359
 *             return cls.from_table(data[0])
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __Pyx_TraceLine(359,0,__PYX_ERR(0, 359, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_9conv_to, 0, __pyx_n_s_SummaryframeInfo_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__374);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_conv_to, __pyx_t_5) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":365
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             self.dom_id, self.fifo_status, self.frame_id, self.frame_index,
 */
  __Pyx_TraceLine(365,0,__PYX_ERR(0, 365, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_11__array__, 0, __pyx_n_s_SummaryframeInfo___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_array, __pyx_t_5) < 0) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":373
 *         )], dtype=self.dtype)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Summaryslice frame #{0}:\n" \
 *                "    slice id:    {1}\n" \
 */
  __Pyx_TraceLine(373,0,__PYX_ERR(0, 373, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_13__str__, 0, __pyx_n_s_SummaryframeInfo___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_str, __pyx_t_5) < 0) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":382
 *                        self.max_sequence_number)
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(382,0,__PYX_ERR(0, 382, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_15__insp__, 0, __pyx_n_s_SummaryframeInfo___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_insp, __pyx_t_5) < 0) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":385
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __Pyx_TraceLine(385,0,__PYX_ERR(0, 385, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_16SummaryframeInfo_17__len__, 0, __pyx_n_s_SummaryframeInfo___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_len_2, __pyx_t_5) < 0) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":318
 * 
 * 
 * class SummaryframeInfo(with_metaclass(Serialisable)):             # <<<<<<<<<<<<<<
 *     """JDAQSummaryslice frame metadata.
 *     """
 */
  __Pyx_TraceLine(318,0,__PYX_ERR(0, 318, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SummaryframeInfo, __pyx_t_2, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SummaryframeInfo, __pyx_t_5) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":389
 * 
 * 
 * class EventInfo(object):             # <<<<<<<<<<<<<<
 *     """Event Metadata.
 *     """
 */
  __Pyx_TraceLine(389,0,__PYX_ERR(0, 389, __pyx_L1_error))
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__379); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__379, __pyx_n_s_EventInfo, __pyx_n_s_EventInfo, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Event_Metadata); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "km3pipe/dataclasses.pyx":392
 *     """Event Metadata.
 *     """
 *     h5loc = '/event_info'             # <<<<<<<<<<<<<<
 *     dtype = np.dtype([
 *         ('det_id', '<i4'),
 */
  __Pyx_TraceLine(392,0,__PYX_ERR(0, 392, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_h5loc, __pyx_kp_s_event_info) < 0) __PYX_ERR(0, 392, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":393
 *     """
 *     h5loc = '/event_info'
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('det_id', '<i4'),
 *         ('frame_index', '<u4'),
 */
  __Pyx_TraceLine(393,0,__PYX_ERR(0, 393, __pyx_L1_error))
  __pyx_t_6 = PyList_New(17); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_tuple__380);
  __Pyx_GIVEREF(__pyx_tuple__380);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_tuple__380);
  __Pyx_INCREF(__pyx_tuple__381);
  __Pyx_GIVEREF(__pyx_tuple__381);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_tuple__381);
  __Pyx_INCREF(__pyx_tuple__382);
  __Pyx_GIVEREF(__pyx_tuple__382);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_tuple__382);
  __Pyx_INCREF(__pyx_tuple__383);
  __Pyx_GIVEREF(__pyx_tuple__383);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_tuple__383);
  __Pyx_INCREF(__pyx_tuple__384);
  __Pyx_GIVEREF(__pyx_tuple__384);
  PyList_SET_ITEM(__pyx_t_6, 4, __pyx_tuple__384);
  __Pyx_INCREF(__pyx_tuple__385);
  __Pyx_GIVEREF(__pyx_tuple__385);
  PyList_SET_ITEM(__pyx_t_6, 5, __pyx_tuple__385);
  __Pyx_INCREF(__pyx_tuple__386);
  __Pyx_GIVEREF(__pyx_tuple__386);
  PyList_SET_ITEM(__pyx_t_6, 6, __pyx_tuple__386);
  __Pyx_INCREF(__pyx_tuple__387);
  __Pyx_GIVEREF(__pyx_tuple__387);
  PyList_SET_ITEM(__pyx_t_6, 7, __pyx_tuple__387);
  __Pyx_INCREF(__pyx_tuple__388);
  __Pyx_GIVEREF(__pyx_tuple__388);
  PyList_SET_ITEM(__pyx_t_6, 8, __pyx_tuple__388);
  __Pyx_INCREF(__pyx_tuple__389);
  __Pyx_GIVEREF(__pyx_tuple__389);
  PyList_SET_ITEM(__pyx_t_6, 9, __pyx_tuple__389);
  __Pyx_INCREF(__pyx_tuple__390);
  __Pyx_GIVEREF(__pyx_tuple__390);
  PyList_SET_ITEM(__pyx_t_6, 10, __pyx_tuple__390);
  __Pyx_INCREF(__pyx_tuple__391);
  __Pyx_GIVEREF(__pyx_tuple__391);
  PyList_SET_ITEM(__pyx_t_6, 11, __pyx_tuple__391);
  __Pyx_INCREF(__pyx_tuple__392);
  __Pyx_GIVEREF(__pyx_tuple__392);
  PyList_SET_ITEM(__pyx_t_6, 12, __pyx_tuple__392);
  __Pyx_INCREF(__pyx_tuple__393);
  __Pyx_GIVEREF(__pyx_tuple__393);
  PyList_SET_ITEM(__pyx_t_6, 13, __pyx_tuple__393);
  __Pyx_INCREF(__pyx_tuple__394);
  __Pyx_GIVEREF(__pyx_tuple__394);
  PyList_SET_ITEM(__pyx_t_6, 14, __pyx_tuple__394);
  __Pyx_INCREF(__pyx_tuple__395);
  __Pyx_GIVEREF(__pyx_tuple__395);
  PyList_SET_ITEM(__pyx_t_6, 15, __pyx_tuple__395);
  __Pyx_INCREF(__pyx_tuple__396);
  __Pyx_GIVEREF(__pyx_tuple__396);
  PyList_SET_ITEM(__pyx_t_6, 16, __pyx_tuple__396);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 393, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":413
 *     ])
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         assert 'run_id' in arr.dtype.fields
 *         self._arr = np.array(arr, dtype=self.dtype).reshape(1)
 */
  __Pyx_TraceLine(413,0,__PYX_ERR(0, 413, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_1__init__, 0, __pyx_n_s_EventInfo___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__398);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":421
 * 
 *     @classmethod
 *     def from_row(cls, row, **kwargs):             # <<<<<<<<<<<<<<
 *         args = tuple((row[col] for col in cls.dtype.names))
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 */
  __Pyx_TraceLine(421,0,__PYX_ERR(0, 421, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_3from_row, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_EventInfo_from_row, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":420
 *         self.h5loc = h5loc
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_row(cls, row, **kwargs):
 *         args = tuple((row[col] for col in cls.dtype.names))
 */
  __Pyx_TraceLine(420,0,__PYX_ERR(0, 420, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_from_row, __pyx_t_5) < 0) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":426
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(426,0,__PYX_ERR(0, 426, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_5deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_EventInfo_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":425
 *         return cls(np.array(args, dtype=cls.dtype), **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(425,0,__PYX_ERR(0, 425, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_deserialise, __pyx_t_6) < 0) __PYX_ERR(0, 426, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":429
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(429,0,__PYX_ERR(0, 429, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_7serialise, 0, __pyx_n_s_EventInfo_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_serialise, __pyx_t_6) < 0) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":433
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_row(data, **kwargs)
 */
  __Pyx_TraceLine(433,0,__PYX_ERR(0, 433, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_9conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_EventInfo_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__403);

  /* "km3pipe/dataclasses.pyx":432
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/', **kwargs):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(432,0,__PYX_ERR(0, 432, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_conv_from, __pyx_t_5) < 0) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":437
 *             return cls.from_row(data, **kwargs)
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __Pyx_TraceLine(437,0,__PYX_ERR(0, 437, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_11conv_to, 0, __pyx_n_s_EventInfo_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__405);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_conv_to, __pyx_t_5) < 0) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":444
 *                                 **kwargs)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __Pyx_TraceLine(444,0,__PYX_ERR(0, 444, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_13__array__, 0, __pyx_n_s_EventInfo___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_array, __pyx_t_5) < 0) __PYX_ERR(0, 444, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":447
 *         return self._arr
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "Event #{0}:\n" \
 *                "    run id:          {10}\n" \
 */
  __Pyx_TraceLine(447,0,__PYX_ERR(0, 447, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_15__str__, 0, __pyx_n_s_EventInfo___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_str, __pyx_t_5) < 0) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":466
 *                        )
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(466,0,__PYX_ERR(0, 466, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_17__repr__, 0, __pyx_n_s_EventInfo___repr, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_5) < 0) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":469
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(469,0,__PYX_ERR(0, 469, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_19__insp__, 0, __pyx_n_s_EventInfo___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_insp, __pyx_t_5) < 0) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":472
 *         return self.__str__()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __Pyx_TraceLine(472,0,__PYX_ERR(0, 472, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9EventInfo_21__len__, 0, __pyx_n_s_EventInfo___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_len_2, __pyx_t_5) < 0) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":389
 * 
 * 
 * class EventInfo(object):             # <<<<<<<<<<<<<<
 *     """Event Metadata.
 *     """
 */
  __Pyx_TraceLine(389,0,__PYX_ERR(0, 389, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_EventInfo, __pyx_tuple__379, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EventInfo, __pyx_t_5) < 0) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":476
 * 
 * 
 * class Point(np.ndarray):             # <<<<<<<<<<<<<<
 *     """Represents a point in a 3D space"""
 *     def __new__(cls, input_array=(np.nan, np.nan, np.nan)):
 */
  __Pyx_TraceLine(476,0,__PYX_ERR(0, 476, __pyx_L1_error))
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_5numpy_ndarray));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_5numpy_ndarray));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_5numpy_ndarray));
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Point, __pyx_n_s_Point, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Represents_a_point_in_a_3D_space); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":478
 * class Point(np.ndarray):
 *     """Represents a point in a 3D space"""
 *     def __new__(cls, input_array=(np.nan, np.nan, np.nan)):             # <<<<<<<<<<<<<<
 *         """Add x, y and z to the ndarray"""
 *         obj = np.asarray(input_array).view(cls)
 */
  __Pyx_TraceLine(478,0,__PYX_ERR(0, 478, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_5Point_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Point___new, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_6, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 478, __pyx_L1_error)
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_nan); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_nan); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_nan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_9);
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_6)->__pyx_arg_input_array = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_6, __pyx_pf_7km3pipe_11dataclasses___defaults__);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_new, __pyx_t_6) < 0) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":484
 * 
 *     @property
 *     def x(self):             # <<<<<<<<<<<<<<
 *         return self[0]
 * 
 */
  __Pyx_TraceLine(484,0,__PYX_ERR(0, 484, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_5Point_3x, 0, __pyx_n_s_Point_x, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":483
 *         return obj
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def x(self):
 *         return self[0]
 */
  __Pyx_TraceLine(483,0,__PYX_ERR(0, 483, __pyx_L1_error))
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_x, __pyx_t_6) < 0) __PYX_ERR(0, 484, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":487
 *         return self[0]
 * 
 *     @x.setter             # <<<<<<<<<<<<<<
 *     def x(self, value):
 *         self[0] = value
 */
  __Pyx_TraceLine(487,0,__PYX_ERR(0, 487, __pyx_L1_error))
  __pyx_t_4 = PyObject_GetItem(__pyx_t_5, __pyx_n_s_x);
  if (unlikely(!__pyx_t_4)) {
    PyErr_Clear();
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_x);
  }
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_setter); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "km3pipe/dataclasses.pyx":488
 * 
 *     @x.setter
 *     def x(self, value):             # <<<<<<<<<<<<<<
 *         self[0] = value
 * 
 */
  __Pyx_TraceLine(488,0,__PYX_ERR(0, 488, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_5Point_5x, 0, __pyx_n_s_Point_x, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 487, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 487, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 487, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 487, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 487, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_x, __pyx_t_6) < 0) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":492
 * 
 *     @property
 *     def y(self):             # <<<<<<<<<<<<<<
 *         return self[1]
 * 
 */
  __Pyx_TraceLine(492,0,__PYX_ERR(0, 492, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_5Point_7y, 0, __pyx_n_s_Point_y, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":491
 *         self[0] = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def y(self):
 *         return self[1]
 */
  __Pyx_TraceLine(491,0,__PYX_ERR(0, 491, __pyx_L1_error))
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_y, __pyx_t_6) < 0) __PYX_ERR(0, 492, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":495
 *         return self[1]
 * 
 *     @y.setter             # <<<<<<<<<<<<<<
 *     def y(self, value):
 *         self[1] = value
 */
  __Pyx_TraceLine(495,0,__PYX_ERR(0, 495, __pyx_L1_error))
  __pyx_t_9 = PyObject_GetItem(__pyx_t_5, __pyx_n_s_y);
  if (unlikely(!__pyx_t_9)) {
    PyErr_Clear();
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_y);
  }
  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_setter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "km3pipe/dataclasses.pyx":496
 * 
 *     @y.setter
 *     def y(self, value):             # <<<<<<<<<<<<<<
 *         self[1] = value
 * 
 */
  __Pyx_TraceLine(496,0,__PYX_ERR(0, 496, __pyx_L1_error))
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_5Point_9y, 0, __pyx_n_s_Point_y, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 495, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_9};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 495, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_9};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 495, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 495, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 495, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_y, __pyx_t_6) < 0) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":500
 * 
 *     @property
 *     def z(self):             # <<<<<<<<<<<<<<
 *         return self[2]
 * 
 */
  __Pyx_TraceLine(500,0,__PYX_ERR(0, 500, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_5Point_11z, 0, __pyx_n_s_Point_z, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":499
 *         self[1] = value
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def z(self):
 *         return self[2]
 */
  __Pyx_TraceLine(499,0,__PYX_ERR(0, 499, __pyx_L1_error))
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_z, __pyx_t_6) < 0) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":503
 *         return self[2]
 * 
 *     @z.setter             # <<<<<<<<<<<<<<
 *     def z(self, value):
 *         self[2] = value
 */
  __Pyx_TraceLine(503,0,__PYX_ERR(0, 503, __pyx_L1_error))
  __pyx_t_7 = PyObject_GetItem(__pyx_t_5, __pyx_n_s_z);
  if (unlikely(!__pyx_t_7)) {
    PyErr_Clear();
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_z);
  }
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_setter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "km3pipe/dataclasses.pyx":504
 * 
 *     @z.setter
 *     def z(self, value):             # <<<<<<<<<<<<<<
 *         self[2] = value
 * 
 */
  __Pyx_TraceLine(504,0,__PYX_ERR(0, 504, __pyx_L1_error))
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_5Point_13z, 0, __pyx_n_s_Point_z, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  if (!__pyx_t_9) {
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 503, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 503, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 503, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); __pyx_t_9 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_z, __pyx_t_6) < 0) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":476
 * 
 * 
 * class Point(np.ndarray):             # <<<<<<<<<<<<<<
 *     """Represents a point in a 3D space"""
 *     def __new__(cls, input_array=(np.nan, np.nan, np.nan)):
 */
  __Pyx_TraceLine(476,0,__PYX_ERR(0, 476, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Point, __pyx_t_2, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Point, __pyx_t_6) < 0) __PYX_ERR(0, 476, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":508
 * 
 * 
 * Position = Direction = Point  # Backwards compatibility             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(508,0,__PYX_ERR(0, 508, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Point); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Position, __pyx_t_2) < 0) __PYX_ERR(0, 508, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Direction, __pyx_t_2) < 0) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":831
 * 
 * 
 * class RawHitSeries(DTypeAttr):             # <<<<<<<<<<<<<<
 *     """A collection of hits without any calibration parameter."""
 *     h5loc = '/raw_hits'
 */
  __Pyx_TraceLine(831,0,__PYX_ERR(0, 831, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTypeAttr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_RawHitSeries, __pyx_n_s_RawHitSeries, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_A_collection_of_hits_without_any); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":833
 * class RawHitSeries(DTypeAttr):
 *     """A collection of hits without any calibration parameter."""
 *     h5loc = '/raw_hits'             # <<<<<<<<<<<<<<
 *     dtype = np.dtype([
 *         ('channel_id', 'u1'),
 */
  __Pyx_TraceLine(833,0,__PYX_ERR(0, 833, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_kp_s_raw_hits) < 0) __PYX_ERR(0, 833, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":834
 *     """A collection of hits without any calibration parameter."""
 *     h5loc = '/raw_hits'
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('channel_id', 'u1'),
 *         ('dom_id', '<u4'),
 */
  __Pyx_TraceLine(834,0,__PYX_ERR(0, 834, __pyx_L1_error))
  __pyx_t_6 = PyList_New(6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_tuple__418);
  __Pyx_GIVEREF(__pyx_tuple__418);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_tuple__418);
  __Pyx_INCREF(__pyx_tuple__419);
  __Pyx_GIVEREF(__pyx_tuple__419);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_tuple__419);
  __Pyx_INCREF(__pyx_tuple__420);
  __Pyx_GIVEREF(__pyx_tuple__420);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_tuple__420);
  __Pyx_INCREF(__pyx_tuple__421);
  __Pyx_GIVEREF(__pyx_tuple__421);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_tuple__421);
  __Pyx_INCREF(__pyx_tuple__422);
  __Pyx_GIVEREF(__pyx_tuple__422);
  PyList_SET_ITEM(__pyx_t_6, 4, __pyx_tuple__422);
  __Pyx_INCREF(__pyx_tuple__423);
  __Pyx_GIVEREF(__pyx_tuple__423);
  PyList_SET_ITEM(__pyx_t_6, 5, __pyx_tuple__423);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":842
 *         ('event_id', '<u4')
 *     ])
 *     write_separate_columns = True             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, arr, event_id, h5loc='/'):
 */
  __Pyx_TraceLine(842,0,__PYX_ERR(0, 842, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_write_separate_columns, Py_True) < 0) __PYX_ERR(0, 842, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":844
 *     write_separate_columns = True
 * 
 *     def __init__(self, arr, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __Pyx_TraceLine(844,0,__PYX_ERR(0, 844, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_1__init__, 0, __pyx_n_s_RawHitSeries___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__425);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":853
 * 
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         try:
 *             return cls(np.array([(
 */
  __Pyx_TraceLine(853,0,__PYX_ERR(0, 853, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_3from_aanet, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_RawHitSeries_from_aanet, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":852
 * #        self.tabname = str(event_id)  # used when h5loc='/hits'
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_aanet(cls, hits, event_id):
 *         try:
 */
  __Pyx_TraceLine(852,0,__PYX_ERR(0, 852, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_from_aanet, __pyx_t_8) < 0) __PYX_ERR(0, 853, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":875
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dom_ids, times, tots, triggereds,             # <<<<<<<<<<<<<<
 *                     event_id):
 *         # do we need shape[0] or does len() work too?
 */
  __Pyx_TraceLine(875,0,__PYX_ERR(0, 875, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_5from_arrays, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_RawHitSeries_from_arrays, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "km3pipe/dataclasses.pyx":874
 *             ) for h in hits], dtype=cls.dtype), event_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(cls, channel_ids, dom_ids, times, tots, triggereds,
 *                     event_id):
 */
  __Pyx_TraceLine(874,0,__PYX_ERR(0, 874, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_from_arrays, __pyx_t_6) < 0) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":892
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return RawHitSeries(self._arr[self._arr['triggered'] == True],
 *                             self.event_id)  # noqa
 */
  __Pyx_TraceLine(892,0,__PYX_ERR(0, 892, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_7triggered_hits, 0, __pyx_n_s_RawHitSeries_triggered_hits, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":891
 *         return cls(hits, event_id)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def triggered_hits(self):
 *         return RawHitSeries(self._arr[self._arr['triggered'] == True],
 */
  __Pyx_TraceLine(891,0,__PYX_ERR(0, 891, __pyx_L1_error))
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_triggered_hits, __pyx_t_6) < 0) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":897
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(897,0,__PYX_ERR(0, 897, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_9deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_RawHitSeries_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":896
 *                             self.event_id)  # noqa
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(896,0,__PYX_ERR(0, 896, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_deserialise, __pyx_t_8) < 0) __PYX_ERR(0, 897, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":900
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(900,0,__PYX_ERR(0, 900, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_11serialise, 0, __pyx_n_s_RawHitSeries_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_serialise, __pyx_t_8) < 0) __PYX_ERR(0, 900, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":904
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls(data, event_id)
 */
  __Pyx_TraceLine(904,0,__PYX_ERR(0, 904, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_13conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_RawHitSeries_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__432);

  /* "km3pipe/dataclasses.pyx":903
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(903,0,__PYX_ERR(0, 903, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_conv_from, __pyx_t_6) < 0) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":910
 *             return cls(data.to_records(index=False), event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __Pyx_TraceLine(910,0,__PYX_ERR(0, 910, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_15conv_to, 0, __pyx_n_s_RawHitSeries_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__434);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_conv_to, __pyx_t_6) < 0) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":916
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __Pyx_TraceLine(916,0,__PYX_ERR(0, 916, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_17__array__, 0, __pyx_n_s_RawHitSeries___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_array, __pyx_t_6) < 0) __PYX_ERR(0, 916, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":919
 *         return self._arr
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __Pyx_TraceLine(919,0,__PYX_ERR(0, 919, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_19next, 0, __pyx_n_s_RawHitSeries_next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_next_2, __pyx_t_6) < 0) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":923
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __Pyx_TraceLine(923,0,__PYX_ERR(0, 923, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_21__next__, 0, __pyx_n_s_RawHitSeries___next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_next, __pyx_t_6) < 0) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":931
 *         return hit
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             # element = AttrVoid(self._arr[index])  # TODO: MemoryLeak
 */
  __Pyx_TraceLine(931,0,__PYX_ERR(0, 931, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_23__getitem__, 0, __pyx_n_s_RawHitSeries___getitem, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_getitem, __pyx_t_6) < 0) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":940
 *         return new
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_TraceLine(940,0,__PYX_ERR(0, 940, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_25__iter__, 0, __pyx_n_s_RawHitSeries___iter, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_iter, __pyx_t_6) < 0) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":943
 *         return self
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __Pyx_TraceLine(943,0,__PYX_ERR(0, 943, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_27__len__, 0, __pyx_n_s_RawHitSeries___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_len_2, __pyx_t_6) < 0) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":946
 *         return self._arr.shape[0]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */
  __Pyx_TraceLine(946,0,__PYX_ERR(0, 946, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_29__str__, 0, __pyx_n_s_RawHitSeries___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_str, __pyx_t_6) < 0) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":951
 *         return("RawHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(951,0,__PYX_ERR(0, 951, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_31__repr__, 0, __pyx_n_s_RawHitSeries___repr, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_repr, __pyx_t_6) < 0) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":954
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */
  __Pyx_TraceLine(954,0,__PYX_ERR(0, 954, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12RawHitSeries_33__insp__, 0, __pyx_n_s_RawHitSeries___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_insp, __pyx_t_6) < 0) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":831
 * 
 * 
 * class RawHitSeries(DTypeAttr):             # <<<<<<<<<<<<<<
 *     """A collection of hits without any calibration parameter."""
 *     h5loc = '/raw_hits'
 */
  __Pyx_TraceLine(831,0,__PYX_ERR(0, 831, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_RawHitSeries, __pyx_t_1, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RawHitSeries, __pyx_t_6) < 0) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":958
 * 
 * 
 * class CRawHitSeries(DTypeAttr):             # <<<<<<<<<<<<<<
 *     """A collection of calibrated hits."""
 *     h5loc = '/hits'
 */
  __Pyx_TraceLine(958,0,__PYX_ERR(0, 958, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTypeAttr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CRawHitSeries, __pyx_n_s_CRawHitSeries, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_A_collection_of_calibrated_hits); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":960
 * class CRawHitSeries(DTypeAttr):
 *     """A collection of calibrated hits."""
 *     h5loc = '/hits'             # <<<<<<<<<<<<<<
 *     dtype = np.dtype([
 *         ('channel_id', 'u1'),
 */
  __Pyx_TraceLine(960,0,__PYX_ERR(0, 960, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_kp_s_hits_3) < 0) __PYX_ERR(0, 960, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":961
 *     """A collection of calibrated hits."""
 *     h5loc = '/hits'
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('channel_id', 'u1'),
 *         ('dir_x', '<f4'),
 */
  __Pyx_TraceLine(961,0,__PYX_ERR(0, 961, __pyx_L1_error))
  __pyx_t_6 = PyList_New(15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_tuple__444);
  __Pyx_GIVEREF(__pyx_tuple__444);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_tuple__444);
  __Pyx_INCREF(__pyx_tuple__445);
  __Pyx_GIVEREF(__pyx_tuple__445);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_tuple__445);
  __Pyx_INCREF(__pyx_tuple__446);
  __Pyx_GIVEREF(__pyx_tuple__446);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_tuple__446);
  __Pyx_INCREF(__pyx_tuple__447);
  __Pyx_GIVEREF(__pyx_tuple__447);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_tuple__447);
  __Pyx_INCREF(__pyx_tuple__448);
  __Pyx_GIVEREF(__pyx_tuple__448);
  PyList_SET_ITEM(__pyx_t_6, 4, __pyx_tuple__448);
  __Pyx_INCREF(__pyx_tuple__449);
  __Pyx_GIVEREF(__pyx_tuple__449);
  PyList_SET_ITEM(__pyx_t_6, 5, __pyx_tuple__449);
  __Pyx_INCREF(__pyx_tuple__450);
  __Pyx_GIVEREF(__pyx_tuple__450);
  PyList_SET_ITEM(__pyx_t_6, 6, __pyx_tuple__450);
  __Pyx_INCREF(__pyx_tuple__451);
  __Pyx_GIVEREF(__pyx_tuple__451);
  PyList_SET_ITEM(__pyx_t_6, 7, __pyx_tuple__451);
  __Pyx_INCREF(__pyx_tuple__452);
  __Pyx_GIVEREF(__pyx_tuple__452);
  PyList_SET_ITEM(__pyx_t_6, 8, __pyx_tuple__452);
  __Pyx_INCREF(__pyx_tuple__453);
  __Pyx_GIVEREF(__pyx_tuple__453);
  PyList_SET_ITEM(__pyx_t_6, 9, __pyx_tuple__453);
  __Pyx_INCREF(__pyx_tuple__454);
  __Pyx_GIVEREF(__pyx_tuple__454);
  PyList_SET_ITEM(__pyx_t_6, 10, __pyx_tuple__454);
  __Pyx_INCREF(__pyx_tuple__455);
  __Pyx_GIVEREF(__pyx_tuple__455);
  PyList_SET_ITEM(__pyx_t_6, 11, __pyx_tuple__455);
  __Pyx_INCREF(__pyx_tuple__456);
  __Pyx_GIVEREF(__pyx_tuple__456);
  PyList_SET_ITEM(__pyx_t_6, 12, __pyx_tuple__456);
  __Pyx_INCREF(__pyx_tuple__457);
  __Pyx_GIVEREF(__pyx_tuple__457);
  PyList_SET_ITEM(__pyx_t_6, 13, __pyx_tuple__457);
  __Pyx_INCREF(__pyx_tuple__458);
  __Pyx_GIVEREF(__pyx_tuple__458);
  PyList_SET_ITEM(__pyx_t_6, 14, __pyx_tuple__458);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":978
 *         ('event_id', '<u4')
 *     ])
 *     write_separate_columns = True             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, arr, event_id, h5loc='/'):
 */
  __Pyx_TraceLine(978,0,__PYX_ERR(0, 978, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_write_separate_columns, Py_True) < 0) __PYX_ERR(0, 978, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":980
 *     write_separate_columns = True
 * 
 *     def __init__(self, arr, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __Pyx_TraceLine(980,0,__PYX_ERR(0, 980, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_1__init__, 0, __pyx_n_s_CRawHitSeries___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__460);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":987
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, dus,             # <<<<<<<<<<<<<<
 *                     floors, pos_xs, pos_ys, pos_zs, t0s, times, tots,
 *                     triggereds, event_id):
 */
  __Pyx_TraceLine(987,0,__PYX_ERR(0, 987, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_3from_arrays, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_CRawHitSeries_from_arrays, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":986
 *         self.h5loc = h5loc
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, dus,
 *                     floors, pos_xs, pos_ys, pos_zs, t0s, times, tots,
 */
  __Pyx_TraceLine(986,0,__PYX_ERR(0, 986, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_from_arrays, __pyx_t_8) < 0) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1014
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return CRawHitSeries(self._arr[self._arr['triggered'] == True],
 *                             self.event_id)  # noqa
 */
  __Pyx_TraceLine(1014,0,__PYX_ERR(0, 1014, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_5triggered_hits, 0, __pyx_n_s_CRawHitSeries_triggered_hits, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "km3pipe/dataclasses.pyx":1013
 *         return cls(hits, event_id)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def triggered_hits(self):
 *         return CRawHitSeries(self._arr[self._arr['triggered'] == True],
 */
  __Pyx_TraceLine(1013,0,__PYX_ERR(0, 1013, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_triggered_hits, __pyx_t_8) < 0) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1019
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1019,0,__PYX_ERR(0, 1019, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_7deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_CRawHitSeries_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "km3pipe/dataclasses.pyx":1018
 *                             self.event_id)  # noqa
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(1018,0,__PYX_ERR(0, 1018, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_deserialise, __pyx_t_6) < 0) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1022
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1022,0,__PYX_ERR(0, 1022, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_9serialise, 0, __pyx_n_s_CRawHitSeries_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_serialise, __pyx_t_6) < 0) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1026
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls(data, event_id)
 */
  __Pyx_TraceLine(1026,0,__PYX_ERR(0, 1026, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_11conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_CRawHitSeries_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__466);

  /* "km3pipe/dataclasses.pyx":1025
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(1025,0,__PYX_ERR(0, 1025, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_conv_from, __pyx_t_8) < 0) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1032
 *             return cls(data.to_records(index=False), event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __Pyx_TraceLine(1032,0,__PYX_ERR(0, 1032, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_13conv_to, 0, __pyx_n_s_CRawHitSeries_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__468);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_conv_to, __pyx_t_8) < 0) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1039
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return CRawHitSeries(self._arr[self._arr['triggered'] == True],
 *                              self.event_id)  # noqa
 */
  __Pyx_TraceLine(1039,0,__PYX_ERR(0, 1039, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_15triggered_hits, 0, __pyx_n_s_CRawHitSeries_triggered_hits, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "km3pipe/dataclasses.pyx":1038
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def triggered_hits(self):
 *         return CRawHitSeries(self._arr[self._arr['triggered'] == True],
 */
  __Pyx_TraceLine(1038,0,__PYX_ERR(0, 1038, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_triggered_hits, __pyx_t_8) < 0) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1043
 *                              self.event_id)  # noqa
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __Pyx_TraceLine(1043,0,__PYX_ERR(0, 1043, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_17__array__, 0, __pyx_n_s_CRawHitSeries___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_array, __pyx_t_8) < 0) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1046
 *         return self._arr
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __Pyx_TraceLine(1046,0,__PYX_ERR(0, 1046, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_19next, 0, __pyx_n_s_CRawHitSeries_next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_next_2, __pyx_t_8) < 0) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1050
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __Pyx_TraceLine(1050,0,__PYX_ERR(0, 1050, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_21__next__, 0, __pyx_n_s_CRawHitSeries___next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_next, __pyx_t_8) < 0) __PYX_ERR(0, 1050, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1058
 *         return hit
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             hit = CRawHit(*self._arr[index])
 */
  __Pyx_TraceLine(1058,0,__PYX_ERR(0, 1058, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_23__getitem__, 0, __pyx_n_s_CRawHitSeries___getitem, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_getitem, __pyx_t_8) < 0) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1064
 *         return self.__class__(self._arr[index], self.event_id)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_TraceLine(1064,0,__PYX_ERR(0, 1064, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_25__iter__, 0, __pyx_n_s_CRawHitSeries___iter, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_iter, __pyx_t_8) < 0) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1067
 *         return self
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __Pyx_TraceLine(1067,0,__PYX_ERR(0, 1067, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_27__len__, 0, __pyx_n_s_CRawHitSeries___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_len_2, __pyx_t_8) < 0) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1070
 *         return self._arr.shape[0]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */
  __Pyx_TraceLine(1070,0,__PYX_ERR(0, 1070, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_29__str__, 0, __pyx_n_s_CRawHitSeries___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_str, __pyx_t_8) < 0) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1075
 *         return("CRawHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(1075,0,__PYX_ERR(0, 1075, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13CRawHitSeries_31__repr__, 0, __pyx_n_s_CRawHitSeries___repr, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_repr, __pyx_t_8) < 0) __PYX_ERR(0, 1075, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":958
 * 
 * 
 * class CRawHitSeries(DTypeAttr):             # <<<<<<<<<<<<<<
 *     """A collection of calibrated hits."""
 *     h5loc = '/hits'
 */
  __Pyx_TraceLine(958,0,__PYX_ERR(0, 958, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CRawHitSeries, __pyx_t_2, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CRawHitSeries, __pyx_t_8) < 0) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1137
 * 
 * 
 * class McHitSeries(DTypeAttr):             # <<<<<<<<<<<<<<
 *     """Collection of multiple Hits.
 *     """
 */
  __Pyx_TraceLine(1137,0,__PYX_ERR(0, 1137, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTypeAttr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_McHitSeries, __pyx_n_s_McHitSeries, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Collection_of_multiple_Hits); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":1140
 *     """Collection of multiple Hits.
 *     """
 *     h5loc = '/mc_hits'             # <<<<<<<<<<<<<<
 *     dtype = np.dtype([
 *         ('a', 'f4'),
 */
  __Pyx_TraceLine(1140,0,__PYX_ERR(0, 1140, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_kp_s_mc_hits) < 0) __PYX_ERR(0, 1140, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1141
 *     """
 *     h5loc = '/mc_hits'
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('a', 'f4'),
 *         ('origin', '<u4'),
 */
  __Pyx_TraceLine(1141,0,__PYX_ERR(0, 1141, __pyx_L1_error))
  __pyx_t_8 = PyList_New(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_tuple__478);
  __Pyx_GIVEREF(__pyx_tuple__478);
  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_tuple__478);
  __Pyx_INCREF(__pyx_tuple__479);
  __Pyx_GIVEREF(__pyx_tuple__479);
  PyList_SET_ITEM(__pyx_t_8, 1, __pyx_tuple__479);
  __Pyx_INCREF(__pyx_tuple__480);
  __Pyx_GIVEREF(__pyx_tuple__480);
  PyList_SET_ITEM(__pyx_t_8, 2, __pyx_tuple__480);
  __Pyx_INCREF(__pyx_tuple__481);
  __Pyx_GIVEREF(__pyx_tuple__481);
  PyList_SET_ITEM(__pyx_t_8, 3, __pyx_tuple__481);
  __Pyx_INCREF(__pyx_tuple__482);
  __Pyx_GIVEREF(__pyx_tuple__482);
  PyList_SET_ITEM(__pyx_t_8, 4, __pyx_tuple__482);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1148
 *         ('event_id', '<u4'),
 *     ])
 *     write_separate_columns = True             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, arr, h5loc='/'):
 */
  __Pyx_TraceLine(1148,0,__PYX_ERR(0, 1148, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_write_separate_columns, Py_True) < 0) __PYX_ERR(0, 1148, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1150
 *     write_separate_columns = True
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __Pyx_TraceLine(1150,0,__PYX_ERR(0, 1150, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_1__init__, 0, __pyx_n_s_McHitSeries___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__484);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_8) < 0) __PYX_ERR(0, 1150, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1157
 * 
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             h.a,
 */
  __Pyx_TraceLine(1157,0,__PYX_ERR(0, 1157, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_3from_aanet, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_McHitSeries_from_aanet, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "km3pipe/dataclasses.pyx":1156
 *         self.h5loc = h5loc
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_aanet(cls, hits, event_id):
 *         return cls(np.array([(
 */
  __Pyx_TraceLine(1156,0,__PYX_ERR(0, 1156, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_from_aanet, __pyx_t_6) < 0) __PYX_ERR(0, 1157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1167
 * 
 *     @classmethod
 *     def from_evt(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             h.a,
 */
  __Pyx_TraceLine(1167,0,__PYX_ERR(0, 1167, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_5from_evt, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_McHitSeries_from_evt, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1166
 *         ) for h in hits], dtype=cls.dtype))
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_evt(cls, hits, event_id):
 *         return cls(np.array([(
 */
  __Pyx_TraceLine(1166,0,__PYX_ERR(0, 1166, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_from_evt, __pyx_t_8) < 0) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1177
 * 
 *     @classmethod
 *     def from_arrays(cls, a, origin, pmt_id, time, event_id):             # <<<<<<<<<<<<<<
 *         # do we need shape[0] or does len() work too?
 *         try:
 */
  __Pyx_TraceLine(1177,0,__PYX_ERR(0, 1177, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_7from_arrays, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_McHitSeries_from_arrays, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "km3pipe/dataclasses.pyx":1176
 *         ) for h in hits], dtype=cls.dtype))
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(cls, a, origin, pmt_id, time, event_id):
 *         # do we need shape[0] or does len() work too?
 */
  __Pyx_TraceLine(1176,0,__PYX_ERR(0, 1176, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_from_arrays, __pyx_t_6) < 0) __PYX_ERR(0, 1177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1192
 * 
 *     @classmethod
 *     def from_dict(cls, map, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = map['event_id']
 */
  __Pyx_TraceLine(1192,0,__PYX_ERR(0, 1192, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_9from_dict, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_McHitSeries_from_dict, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1191
 *         return cls(hits)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dict(cls, map, event_id):
 *         if event_id is None:
 */
  __Pyx_TraceLine(1191,0,__PYX_ERR(0, 1191, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_from_dict, __pyx_t_8) < 0) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1204
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 */
  __Pyx_TraceLine(1204,0,__PYX_ERR(0, 1204, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_11from_table, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_McHitSeries_from_table, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "km3pipe/dataclasses.pyx":1203
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_table(cls, table, event_id):
 *         if event_id is None:
 */
  __Pyx_TraceLine(1203,0,__PYX_ERR(0, 1203, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_from_table, __pyx_t_6) < 0) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1215
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1215,0,__PYX_ERR(0, 1215, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_13deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_McHitSeries_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1214
 *         ) for row in table], dtype=cls.dtype), event_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(1214,0,__PYX_ERR(0, 1214, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_deserialise, __pyx_t_8) < 0) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1218
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1218,0,__PYX_ERR(0, 1218, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_15serialise, 0, __pyx_n_s_McHitSeries_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_serialise, __pyx_t_8) < 0) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1222
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(1222,0,__PYX_ERR(0, 1222, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_17conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_McHitSeries_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__493);

  /* "km3pipe/dataclasses.pyx":1221
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         # what is event_id doing here?
 */
  __Pyx_TraceLine(1221,0,__PYX_ERR(0, 1221, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_conv_from, __pyx_t_6) < 0) __PYX_ERR(0, 1222, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1229
 *             return cls(data.to_records(index=False))
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __Pyx_TraceLine(1229,0,__PYX_ERR(0, 1229, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_19conv_to, 0, __pyx_n_s_McHitSeries_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__495);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_conv_to, __pyx_t_6) < 0) __PYX_ERR(0, 1229, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1235
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __Pyx_TraceLine(1235,0,__PYX_ERR(0, 1235, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_21__array__, 0, __pyx_n_s_McHitSeries___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_array, __pyx_t_6) < 0) __PYX_ERR(0, 1235, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1238
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_TraceLine(1238,0,__PYX_ERR(0, 1238, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_23__iter__, 0, __pyx_n_s_McHitSeries___iter, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_iter, __pyx_t_6) < 0) __PYX_ERR(0, 1238, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1241
 *         return self
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __Pyx_TraceLine(1241,0,__PYX_ERR(0, 1241, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_25next, 0, __pyx_n_s_McHitSeries_next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_next_2, __pyx_t_6) < 0) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1245
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __Pyx_TraceLine(1245,0,__PYX_ERR(0, 1245, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_27__next__, 0, __pyx_n_s_McHitSeries___next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_next, __pyx_t_6) < 0) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1253
 *         return hit
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __Pyx_TraceLine(1253,0,__PYX_ERR(0, 1253, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_29__len__, 0, __pyx_n_s_McHitSeries___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_len_2, __pyx_t_6) < 0) __PYX_ERR(0, 1253, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1256
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return McHit(*self._arr[index])
 */
  __Pyx_TraceLine(1256,0,__PYX_ERR(0, 1256, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_31__getitem__, 0, __pyx_n_s_McHitSeries___getitem, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_getitem, __pyx_t_6) < 0) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1261
 *         return self.__class__(self._arr[index], self.event_id)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */
  __Pyx_TraceLine(1261,0,__PYX_ERR(0, 1261, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_33__str__, 0, __pyx_n_s_McHitSeries___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_str, __pyx_t_6) < 0) __PYX_ERR(0, 1261, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1266
 *         return("McHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(1266,0,__PYX_ERR(0, 1266, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_35__repr__, 0, __pyx_n_s_McHitSeries___repr, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_repr, __pyx_t_6) < 0) __PYX_ERR(0, 1266, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1269
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */
  __Pyx_TraceLine(1269,0,__PYX_ERR(0, 1269, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11McHitSeries_37__insp__, 0, __pyx_n_s_McHitSeries___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_insp, __pyx_t_6) < 0) __PYX_ERR(0, 1269, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1137
 * 
 * 
 * class McHitSeries(DTypeAttr):             # <<<<<<<<<<<<<<
 *     """Collection of multiple Hits.
 *     """
 */
  __Pyx_TraceLine(1137,0,__PYX_ERR(0, 1137, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_McHitSeries, __pyx_t_1, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_McHitSeries, __pyx_t_6) < 0) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1273
 * 
 * 
 * class CMcHitSeries(DTypeAttr):             # <<<<<<<<<<<<<<
 *     """Collection of calibrated MC Hits.
 *     """
 */
  __Pyx_TraceLine(1273,0,__PYX_ERR(0, 1273, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTypeAttr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CMcHitSeries, __pyx_n_s_CMcHitSeries, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Collection_of_calibrated_MC_Hits); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":1276
 *     """Collection of calibrated MC Hits.
 *     """
 *     h5loc = '/mc_hits'             # <<<<<<<<<<<<<<
 *     dtype = np.dtype([
 *         ('a', 'f4'),
 */
  __Pyx_TraceLine(1276,0,__PYX_ERR(0, 1276, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_kp_s_mc_hits) < 0) __PYX_ERR(0, 1276, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1277
 *     """
 *     h5loc = '/mc_hits'
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('a', 'f4'),
 *         ('dir_x', '<f4'),
 */
  __Pyx_TraceLine(1277,0,__PYX_ERR(0, 1277, __pyx_L1_error))
  __pyx_t_6 = PyList_New(11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_tuple__505);
  __Pyx_GIVEREF(__pyx_tuple__505);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_tuple__505);
  __Pyx_INCREF(__pyx_tuple__506);
  __Pyx_GIVEREF(__pyx_tuple__506);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_tuple__506);
  __Pyx_INCREF(__pyx_tuple__507);
  __Pyx_GIVEREF(__pyx_tuple__507);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_tuple__507);
  __Pyx_INCREF(__pyx_tuple__508);
  __Pyx_GIVEREF(__pyx_tuple__508);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_tuple__508);
  __Pyx_INCREF(__pyx_tuple__509);
  __Pyx_GIVEREF(__pyx_tuple__509);
  PyList_SET_ITEM(__pyx_t_6, 4, __pyx_tuple__509);
  __Pyx_INCREF(__pyx_tuple__510);
  __Pyx_GIVEREF(__pyx_tuple__510);
  PyList_SET_ITEM(__pyx_t_6, 5, __pyx_tuple__510);
  __Pyx_INCREF(__pyx_tuple__511);
  __Pyx_GIVEREF(__pyx_tuple__511);
  PyList_SET_ITEM(__pyx_t_6, 6, __pyx_tuple__511);
  __Pyx_INCREF(__pyx_tuple__512);
  __Pyx_GIVEREF(__pyx_tuple__512);
  PyList_SET_ITEM(__pyx_t_6, 7, __pyx_tuple__512);
  __Pyx_INCREF(__pyx_tuple__513);
  __Pyx_GIVEREF(__pyx_tuple__513);
  PyList_SET_ITEM(__pyx_t_6, 8, __pyx_tuple__513);
  __Pyx_INCREF(__pyx_tuple__514);
  __Pyx_GIVEREF(__pyx_tuple__514);
  PyList_SET_ITEM(__pyx_t_6, 9, __pyx_tuple__514);
  __Pyx_INCREF(__pyx_tuple__515);
  __Pyx_GIVEREF(__pyx_tuple__515);
  PyList_SET_ITEM(__pyx_t_6, 10, __pyx_tuple__515);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1277, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1290
 *         ('event_id', '<u4'),
 *     ])
 *     write_separate_columns = True             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, arr, h5loc='/'):
 */
  __Pyx_TraceLine(1290,0,__PYX_ERR(0, 1290, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_write_separate_columns, Py_True) < 0) __PYX_ERR(0, 1290, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1292
 *     write_separate_columns = True
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __Pyx_TraceLine(1292,0,__PYX_ERR(0, 1292, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_1__init__, 0, __pyx_n_s_CMcHitSeries___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__517);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1299
 * 
 *     @classmethod
 *     def from_arrays(cls, a, dir_x, dir_y, dir_z, origin,             # <<<<<<<<<<<<<<
 *                     pmt_id, pos_x, pos_y, pos_z, time, event_id):
 *         # do we need shape[0] or does len() work too?
 */
  __Pyx_TraceLine(1299,0,__PYX_ERR(0, 1299, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_3from_arrays, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_CMcHitSeries_from_arrays, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1298
 *         self.h5loc = h5loc
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(cls, a, dir_x, dir_y, dir_z, origin,
 *                     pmt_id, pos_x, pos_y, pos_z, time, event_id):
 */
  __Pyx_TraceLine(1298,0,__PYX_ERR(0, 1298, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_from_arrays, __pyx_t_8) < 0) __PYX_ERR(0, 1299, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1321
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1321,0,__PYX_ERR(0, 1321, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_5deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_CMcHitSeries_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "km3pipe/dataclasses.pyx":1320
 *         return cls(hits)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(1320,0,__PYX_ERR(0, 1320, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_deserialise, __pyx_t_6) < 0) __PYX_ERR(0, 1321, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1324
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1324,0,__PYX_ERR(0, 1324, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_7serialise, 0, __pyx_n_s_CMcHitSeries_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_serialise, __pyx_t_6) < 0) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1328
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(1328,0,__PYX_ERR(0, 1328, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_9conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_CMcHitSeries_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__522);

  /* "km3pipe/dataclasses.pyx":1327
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         # what is event_id doing here?
 */
  __Pyx_TraceLine(1327,0,__PYX_ERR(0, 1327, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_conv_from, __pyx_t_8) < 0) __PYX_ERR(0, 1328, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1335
 *             return cls(data.to_records(index=False))
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __Pyx_TraceLine(1335,0,__PYX_ERR(0, 1335, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_11conv_to, 0, __pyx_n_s_CMcHitSeries_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__524);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_conv_to, __pyx_t_8) < 0) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1341
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __Pyx_TraceLine(1341,0,__PYX_ERR(0, 1341, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_13__array__, 0, __pyx_n_s_CMcHitSeries___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_array, __pyx_t_8) < 0) __PYX_ERR(0, 1341, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1344
 *         return self._arr
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __Pyx_TraceLine(1344,0,__PYX_ERR(0, 1344, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_15__len__, 0, __pyx_n_s_CMcHitSeries___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_len_2, __pyx_t_8) < 0) __PYX_ERR(0, 1344, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1347
 *         return self._arr.shape[0]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */
  __Pyx_TraceLine(1347,0,__PYX_ERR(0, 1347, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_17__str__, 0, __pyx_n_s_CMcHitSeries___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_str, __pyx_t_8) < 0) __PYX_ERR(0, 1347, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1352
 *         return("CMcHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(1352,0,__PYX_ERR(0, 1352, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12CMcHitSeries_19__repr__, 0, __pyx_n_s_CMcHitSeries___repr, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_repr, __pyx_t_8) < 0) __PYX_ERR(0, 1352, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1273
 * 
 * 
 * class CMcHitSeries(DTypeAttr):             # <<<<<<<<<<<<<<
 *     """Collection of calibrated MC Hits.
 *     """
 */
  __Pyx_TraceLine(1273,0,__PYX_ERR(0, 1273, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CMcHitSeries, __pyx_t_2, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMcHitSeries, __pyx_t_8) < 0) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1356
 * 
 * 
 * class HitSeries(DTypeAttr):             # <<<<<<<<<<<<<<
 *     """Collection of multiple Hits.
 *     """
 */
  __Pyx_TraceLine(1356,0,__PYX_ERR(0, 1356, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTypeAttr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_HitSeries, __pyx_n_s_HitSeries, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Collection_of_multiple_Hits); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":1359
 *     """Collection of multiple Hits.
 *     """
 *     h5loc = '/hits'             # <<<<<<<<<<<<<<
 *     dtype = np.dtype([
 *         ('channel_id', 'u1'),
 */
  __Pyx_TraceLine(1359,0,__PYX_ERR(0, 1359, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_kp_s_hits_3) < 0) __PYX_ERR(0, 1359, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1360
 *     """
 *     h5loc = '/hits'
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('channel_id', 'u1'),
 *         ('dir_x', '<f8'),
 */
  __Pyx_TraceLine(1360,0,__PYX_ERR(0, 1360, __pyx_L1_error))
  __pyx_t_8 = PyList_New(15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_tuple__529);
  __Pyx_GIVEREF(__pyx_tuple__529);
  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_tuple__529);
  __Pyx_INCREF(__pyx_tuple__530);
  __Pyx_GIVEREF(__pyx_tuple__530);
  PyList_SET_ITEM(__pyx_t_8, 1, __pyx_tuple__530);
  __Pyx_INCREF(__pyx_tuple__531);
  __Pyx_GIVEREF(__pyx_tuple__531);
  PyList_SET_ITEM(__pyx_t_8, 2, __pyx_tuple__531);
  __Pyx_INCREF(__pyx_tuple__532);
  __Pyx_GIVEREF(__pyx_tuple__532);
  PyList_SET_ITEM(__pyx_t_8, 3, __pyx_tuple__532);
  __Pyx_INCREF(__pyx_tuple__533);
  __Pyx_GIVEREF(__pyx_tuple__533);
  PyList_SET_ITEM(__pyx_t_8, 4, __pyx_tuple__533);
  __Pyx_INCREF(__pyx_tuple__534);
  __Pyx_GIVEREF(__pyx_tuple__534);
  PyList_SET_ITEM(__pyx_t_8, 5, __pyx_tuple__534);
  __Pyx_INCREF(__pyx_tuple__535);
  __Pyx_GIVEREF(__pyx_tuple__535);
  PyList_SET_ITEM(__pyx_t_8, 6, __pyx_tuple__535);
  __Pyx_INCREF(__pyx_tuple__536);
  __Pyx_GIVEREF(__pyx_tuple__536);
  PyList_SET_ITEM(__pyx_t_8, 7, __pyx_tuple__536);
  __Pyx_INCREF(__pyx_tuple__537);
  __Pyx_GIVEREF(__pyx_tuple__537);
  PyList_SET_ITEM(__pyx_t_8, 8, __pyx_tuple__537);
  __Pyx_INCREF(__pyx_tuple__538);
  __Pyx_GIVEREF(__pyx_tuple__538);
  PyList_SET_ITEM(__pyx_t_8, 9, __pyx_tuple__538);
  __Pyx_INCREF(__pyx_tuple__539);
  __Pyx_GIVEREF(__pyx_tuple__539);
  PyList_SET_ITEM(__pyx_t_8, 10, __pyx_tuple__539);
  __Pyx_INCREF(__pyx_tuple__540);
  __Pyx_GIVEREF(__pyx_tuple__540);
  PyList_SET_ITEM(__pyx_t_8, 11, __pyx_tuple__540);
  __Pyx_INCREF(__pyx_tuple__541);
  __Pyx_GIVEREF(__pyx_tuple__541);
  PyList_SET_ITEM(__pyx_t_8, 12, __pyx_tuple__541);
  __Pyx_INCREF(__pyx_tuple__542);
  __Pyx_GIVEREF(__pyx_tuple__542);
  PyList_SET_ITEM(__pyx_t_8, 13, __pyx_tuple__542);
  __Pyx_INCREF(__pyx_tuple__543);
  __Pyx_GIVEREF(__pyx_tuple__543);
  PyList_SET_ITEM(__pyx_t_8, 14, __pyx_tuple__543);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 1360, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1378
 *     ])
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __Pyx_TraceLine(1378,0,__PYX_ERR(0, 1378, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_1__init__, 0, __pyx_n_s_HitSeries___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__545);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_8) < 0) __PYX_ERR(0, 1378, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1385
 * 
 *     @classmethod
 *     def from_aanet(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         try:
 *             return cls(np.array([(
 */
  __Pyx_TraceLine(1385,0,__PYX_ERR(0, 1385, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_3from_aanet, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_HitSeries_from_aanet, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "km3pipe/dataclasses.pyx":1384
 *         self.h5loc = h5loc
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_aanet(cls, hits, event_id):
 *         try:
 */
  __Pyx_TraceLine(1384,0,__PYX_ERR(0, 1384, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_from_aanet, __pyx_t_6) < 0) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1425
 * 
 *     @classmethod
 *     def from_evt(cls, hits, event_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             0,     # channel_id
 */
  __Pyx_TraceLine(1425,0,__PYX_ERR(0, 1425, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_5from_evt, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_HitSeries_from_evt, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1424
 *             ) for h in hits], dtype=cls.dtype))
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_evt(cls, hits, event_id):
 *         return cls(np.array([(
 */
  __Pyx_TraceLine(1424,0,__PYX_ERR(0, 1424, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_from_evt, __pyx_t_8) < 0) __PYX_ERR(0, 1425, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1445
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, ids,             # <<<<<<<<<<<<<<
 *                     pmt_ids, pos_xs, pos_ys, pos_zs, t0s, times, tots,
 *                     triggereds, event_id):
 */
  __Pyx_TraceLine(1445,0,__PYX_ERR(0, 1445, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_7from_arrays, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_HitSeries_from_arrays, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "km3pipe/dataclasses.pyx":1444
 *         ) for h in hits], dtype=cls.dtype))
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(cls, channel_ids, dir_xs, dir_ys, dir_zs, dom_ids, ids,
 *                     pmt_ids, pos_xs, pos_ys, pos_zs, t0s, times, tots,
 */
  __Pyx_TraceLine(1444,0,__PYX_ERR(0, 1444, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_from_arrays, __pyx_t_6) < 0) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1472
 * 
 *     @classmethod
 *     def from_dict(cls, map, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = map['event_id']
 */
  __Pyx_TraceLine(1472,0,__PYX_ERR(0, 1472, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_9from_dict, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_HitSeries_from_dict, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__143)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1471
 *         return cls(hits)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dict(cls, map, event_id):
 *         if event_id is None:
 */
  __Pyx_TraceLine(1471,0,__PYX_ERR(0, 1471, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_from_dict, __pyx_t_8) < 0) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1494
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         if event_id is None:
 *             event_id = table[0]['event_id']
 */
  __Pyx_TraceLine(1494,0,__PYX_ERR(0, 1494, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_11from_table, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_HitSeries_from_table, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "km3pipe/dataclasses.pyx":1493
 *         )
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_table(cls, table, event_id):
 *         if event_id is None:
 */
  __Pyx_TraceLine(1493,0,__PYX_ERR(0, 1493, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_from_table, __pyx_t_6) < 0) __PYX_ERR(0, 1494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1515
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1515,0,__PYX_ERR(0, 1515, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_13deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_HitSeries_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1514
 *         ) for row in table], dtype=cls.dtype), event_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(1514,0,__PYX_ERR(0, 1514, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_deserialise, __pyx_t_8) < 0) __PYX_ERR(0, 1515, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1518
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1518,0,__PYX_ERR(0, 1518, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_15serialise, 0, __pyx_n_s_HitSeries_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_serialise, __pyx_t_8) < 0) __PYX_ERR(0, 1518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1522
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         # what is event_id doing here?
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(1522,0,__PYX_ERR(0, 1522, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_17conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_HitSeries_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__554);

  /* "km3pipe/dataclasses.pyx":1521
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, event_id=None, fmt='numpy', h5loc='/'):
 *         # what is event_id doing here?
 */
  __Pyx_TraceLine(1521,0,__PYX_ERR(0, 1521, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_conv_from, __pyx_t_6) < 0) __PYX_ERR(0, 1522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1529
 *             return cls(data.to_records(index=False))
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __Pyx_TraceLine(1529,0,__PYX_ERR(0, 1529, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_19conv_to, 0, __pyx_n_s_HitSeries_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__556);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_conv_to, __pyx_t_6) < 0) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1535
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __Pyx_TraceLine(1535,0,__PYX_ERR(0, 1535, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_21__array__, 0, __pyx_n_s_HitSeries___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_array, __pyx_t_6) < 0) __PYX_ERR(0, 1535, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1538
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_TraceLine(1538,0,__PYX_ERR(0, 1538, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_23__iter__, 0, __pyx_n_s_HitSeries___iter, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_iter, __pyx_t_6) < 0) __PYX_ERR(0, 1538, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1542
 * 
 *     @property
 *     def triggered_hits(self):             # <<<<<<<<<<<<<<
 *         return HitSeries(self._arr[self._arr['triggered'] == True])     # noqa
 * 
 */
  __Pyx_TraceLine(1542,0,__PYX_ERR(0, 1542, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_25triggered_hits, 0, __pyx_n_s_HitSeries_triggered_hits, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1541
 *         return self
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def triggered_hits(self):
 *         return HitSeries(self._arr[self._arr['triggered'] == True])     # noqa
 */
  __Pyx_TraceLine(1541,0,__PYX_ERR(0, 1541, __pyx_L1_error))
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_triggered_hits, __pyx_t_6) < 0) __PYX_ERR(0, 1542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1546
 * 
 *     @property
 *     def first_hits(self):             # <<<<<<<<<<<<<<
 *         h = self.conv_to(to='pandas')
 *         h.sort_values('time', inplace=True)
 */
  __Pyx_TraceLine(1546,0,__PYX_ERR(0, 1546, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_27first_hits, 0, __pyx_n_s_HitSeries_first_hits, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1545
 *         return HitSeries(self._arr[self._arr['triggered'] == True])     # noqa
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def first_hits(self):
 *         h = self.conv_to(to='pandas')
 */
  __Pyx_TraceLine(1545,0,__PYX_ERR(0, 1545, __pyx_L1_error))
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_first_hits, __pyx_t_6) < 0) __PYX_ERR(0, 1546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1552
 *         return HitSeries(h.to_records(index=False))
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __Pyx_TraceLine(1552,0,__PYX_ERR(0, 1552, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_29next, 0, __pyx_n_s_HitSeries_next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_next_2, __pyx_t_6) < 0) __PYX_ERR(0, 1552, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1556
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __Pyx_TraceLine(1556,0,__PYX_ERR(0, 1556, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_31__next__, 0, __pyx_n_s_HitSeries___next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_next, __pyx_t_6) < 0) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1564
 *         return hit
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __Pyx_TraceLine(1564,0,__PYX_ERR(0, 1564, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_33__len__, 0, __pyx_n_s_HitSeries___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_len_2, __pyx_t_6) < 0) __PYX_ERR(0, 1564, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1567
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return Hit(*self._arr[index])
 */
  __Pyx_TraceLine(1567,0,__PYX_ERR(0, 1567, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_35__getitem__, 0, __pyx_n_s_HitSeries___getitem, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_getitem, __pyx_t_6) < 0) __PYX_ERR(0, 1567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1572
 *         return self.__class__(self._arr[index])
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */
  __Pyx_TraceLine(1572,0,__PYX_ERR(0, 1572, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_37__str__, 0, __pyx_n_s_HitSeries___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_str, __pyx_t_6) < 0) __PYX_ERR(0, 1572, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1577
 *         return("HitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(1577,0,__PYX_ERR(0, 1577, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_39__repr__, 0, __pyx_n_s_HitSeries___repr, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_repr, __pyx_t_6) < 0) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1580
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */
  __Pyx_TraceLine(1580,0,__PYX_ERR(0, 1580, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_9HitSeries_41__insp__, 0, __pyx_n_s_HitSeries___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_insp, __pyx_t_6) < 0) __PYX_ERR(0, 1580, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1356
 * 
 * 
 * class HitSeries(DTypeAttr):             # <<<<<<<<<<<<<<
 *     """Collection of multiple Hits.
 *     """
 */
  __Pyx_TraceLine(1356,0,__PYX_ERR(0, 1356, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_HitSeries, __pyx_t_1, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HitSeries, __pyx_t_6) < 0) __PYX_ERR(0, 1356, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":1584
 * 
 * 
 * class TimesliceHitSeries(DTypeAttr):             # <<<<<<<<<<<<<<
 *     """Collection of multiple timeslice hits.
 *     """
 */
  __Pyx_TraceLine(1584,0,__PYX_ERR(0, 1584, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTypeAttr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_TimesliceHitSeries, __pyx_n_s_TimesliceHitSeries, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Collection_of_multiple_timeslice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":1587
 *     """Collection of multiple timeslice hits.
 *     """
 *     h5loc = '/time_slice_hits'             # <<<<<<<<<<<<<<
 *     dtype = np.dtype([
 *         ('channel_id', 'u1'),
 */
  __Pyx_TraceLine(1587,0,__PYX_ERR(0, 1587, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_kp_s_time_slice_hits) < 0) __PYX_ERR(0, 1587, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1588
 *     """
 *     h5loc = '/time_slice_hits'
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('channel_id', 'u1'),
 *         ('dom_id', '<u4'),
 */
  __Pyx_TraceLine(1588,0,__PYX_ERR(0, 1588, __pyx_L1_error))
  __pyx_t_6 = PyList_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_tuple__568);
  __Pyx_GIVEREF(__pyx_tuple__568);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_tuple__568);
  __Pyx_INCREF(__pyx_tuple__569);
  __Pyx_GIVEREF(__pyx_tuple__569);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_tuple__569);
  __Pyx_INCREF(__pyx_tuple__570);
  __Pyx_GIVEREF(__pyx_tuple__570);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_tuple__570);
  __Pyx_INCREF(__pyx_tuple__571);
  __Pyx_GIVEREF(__pyx_tuple__571);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_tuple__571);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1595
 *     ])
 * 
 *     def __init__(self, arr, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __Pyx_TraceLine(1595,0,__PYX_ERR(0, 1595, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_1__init__, 0, __pyx_n_s_TimesliceHitSeries___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 1595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1603
 * 
 *     @property
 *     def h5loc(self):             # <<<<<<<<<<<<<<
 *         return "/timeslices/slice_{0}".format(self.slice_id)
 * 
 */
  __Pyx_TraceLine(1603,0,__PYX_ERR(0, 1603, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_3h5loc, 0, __pyx_n_s_TimesliceHitSeries_h5loc, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1602
 *         self.frame_id = frame_id
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def h5loc(self):
 *         return "/timeslices/slice_{0}".format(self.slice_id)
 */
  __Pyx_TraceLine(1602,0,__PYX_ERR(0, 1602, __pyx_L1_error))
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_h5loc, __pyx_t_6) < 0) __PYX_ERR(0, 1603, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1607
 * 
 *     @property
 *     def tabname(self):             # <<<<<<<<<<<<<<
 *         return "frame_{0}".format(self.frame_id)
 * 
 */
  __Pyx_TraceLine(1607,0,__PYX_ERR(0, 1607, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_5tabname, 0, __pyx_n_s_TimesliceHitSeries_tabname, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1606
 *         return "/timeslices/slice_{0}".format(self.slice_id)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def tabname(self):
 *         return "frame_{0}".format(self.frame_id)
 */
  __Pyx_TraceLine(1606,0,__PYX_ERR(0, 1606, __pyx_L1_error))
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_tabname, __pyx_t_6) < 0) __PYX_ERR(0, 1607, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1611
 * 
 *     @classmethod
 *     def from_arrays(cls, channel_ids, dom_ids, times, tots, slice_id,             # <<<<<<<<<<<<<<
 *                     frame_id):
 *         len = channel_ids.shape[0]
 */
  __Pyx_TraceLine(1611,0,__PYX_ERR(0, 1611, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_7from_arrays, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TimesliceHitSeries_from_arrays, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1610
 *         return "frame_{0}".format(self.frame_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(cls, channel_ids, dom_ids, times, tots, slice_id,
 *                     frame_id):
 */
  __Pyx_TraceLine(1610,0,__PYX_ERR(0, 1610, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_from_arrays, __pyx_t_8) < 0) __PYX_ERR(0, 1611, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1622
 * 
 *     @classmethod
 *     def from_dict(cls, map, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         return cls.from_arrays(
 *             map['channel_id'],
 */
  __Pyx_TraceLine(1622,0,__PYX_ERR(0, 1622, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_9from_dict, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TimesliceHitSeries_from_dict, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__165)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "km3pipe/dataclasses.pyx":1621
 *         return cls(hits, slice_id, frame_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dict(cls, map, slice_id, frame_id):
 *         return cls.from_arrays(
 */
  __Pyx_TraceLine(1621,0,__PYX_ERR(0, 1621, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_from_dict, __pyx_t_6) < 0) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1632
 *         )
 * 
 *     def from_table(cls, table, slice_id, frame_id):             # <<<<<<<<<<<<<<
 *         return cls(np.array([(
 *             row['channel_id'],
 */
  __Pyx_TraceLine(1632,0,__PYX_ERR(0, 1632, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_11from_table, 0, __pyx_n_s_TimesliceHitSeries_from_table, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_from_table, __pyx_t_6) < 0) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1641
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1641,0,__PYX_ERR(0, 1641, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_13deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TimesliceHitSeries_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__167)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1640
 *         ) for row in table], dtype=cls.dtype), slice_id, frame_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(1640,0,__PYX_ERR(0, 1640, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_deserialise, __pyx_t_8) < 0) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1644
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1644,0,__PYX_ERR(0, 1644, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_15serialise, 0, __pyx_n_s_TimesliceHitSeries_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_serialise, __pyx_t_8) < 0) __PYX_ERR(0, 1644, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":1648
 * 
 *     @classmethod
 *     def conv_from(cls, data, slice_id, frame_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, frame_id)
 */
  __Pyx_TraceLine(1648,0,__PYX_ERR(0, 1648, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_17conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TimesliceHitSeries_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__169)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__581);

  /* "km3pipe/dataclasses.pyx":1647
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, slice_id, frame_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(1647,0,__PYX_ERR(0, 1647, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_conv_from, __pyx_t_6) < 0) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1653
 *             return cls(data, slice_id, frame_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __Pyx_TraceLine(1653,0,__PYX_ERR(0, 1653, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_19conv_to, 0, __pyx_n_s_TimesliceHitSeries_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__583);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_conv_to, __pyx_t_6) < 0) __PYX_ERR(0, 1653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1659
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __Pyx_TraceLine(1659,0,__PYX_ERR(0, 1659, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_21__array__, 0, __pyx_n_s_TimesliceHitSeries___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_array, __pyx_t_6) < 0) __PYX_ERR(0, 1659, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1662
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_TraceLine(1662,0,__PYX_ERR(0, 1662, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_23__iter__, 0, __pyx_n_s_TimesliceHitSeries___iter, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_iter, __pyx_t_6) < 0) __PYX_ERR(0, 1662, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1665
 *         return self
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __Pyx_TraceLine(1665,0,__PYX_ERR(0, 1665, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_25next, 0, __pyx_n_s_TimesliceHitSeries_next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__173)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_next_2, __pyx_t_6) < 0) __PYX_ERR(0, 1665, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1669
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __Pyx_TraceLine(1669,0,__PYX_ERR(0, 1669, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_27__next__, 0, __pyx_n_s_TimesliceHitSeries___next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_next, __pyx_t_6) < 0) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1677
 *         return hits
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __Pyx_TraceLine(1677,0,__PYX_ERR(0, 1677, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_29__len__, 0, __pyx_n_s_TimesliceHitSeries___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__175)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_len_2, __pyx_t_6) < 0) __PYX_ERR(0, 1677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1680
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return TimesliceHit(*self._arr[index])
 */
  __Pyx_TraceLine(1680,0,__PYX_ERR(0, 1680, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_31__getitem__, 0, __pyx_n_s_TimesliceHitSeries___getitem, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_getitem, __pyx_t_6) < 0) __PYX_ERR(0, 1680, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1685
 *         return self.__class__(self._arr[index], self.slice_id, self.frame_id)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_hits = len(self)
 *         plural = 's' if n_hits > 1 or n_hits == 0 else ''
 */
  __Pyx_TraceLine(1685,0,__PYX_ERR(0, 1685, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_33__str__, 0, __pyx_n_s_TimesliceHitSeries___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_str, __pyx_t_6) < 0) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1690
 *         return("TimesliceHitSeries with {0} hit{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(1690,0,__PYX_ERR(0, 1690, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_35__repr__, 0, __pyx_n_s_TimesliceHitSeries___repr, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__178)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_repr, __pyx_t_6) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1693
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(hit) for hit in self._hits])
 * 
 */
  __Pyx_TraceLine(1693,0,__PYX_ERR(0, 1693, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18TimesliceHitSeries_37__insp__, 0, __pyx_n_s_TimesliceHitSeries___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_insp, __pyx_t_6) < 0) __PYX_ERR(0, 1693, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1584
 * 
 * 
 * class TimesliceHitSeries(DTypeAttr):             # <<<<<<<<<<<<<<
 *     """Collection of multiple timeslice hits.
 *     """
 */
  __Pyx_TraceLine(1584,0,__PYX_ERR(0, 1584, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_TimesliceHitSeries, __pyx_t_2, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TimesliceHitSeries, __pyx_t_6) < 0) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1697
 * 
 * 
 * class McTrackSeries(object):             # <<<<<<<<<<<<<<
 *     """Collection of multiple McTracks.
 * 
 */
  __Pyx_TraceLine(1697,0,__PYX_ERR(0, 1697, __pyx_L1_error))
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__593); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__593, __pyx_n_s_McTrackSeries, __pyx_n_s_McTrackSeries, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Collection_of_multiple_McTracks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "km3pipe/dataclasses.pyx":1704
 *     dtype: datatype of array representation
 *     """
 *     h5loc = '/tracks'             # <<<<<<<<<<<<<<
 *     dtype = np.dtype([
 *         ('bjorkeny', '<f8'),
 */
  __Pyx_TraceLine(1704,0,__PYX_ERR(0, 1704, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_h5loc, __pyx_kp_s_tracks_3) < 0) __PYX_ERR(0, 1704, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":1705
 *     """
 *     h5loc = '/tracks'
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('bjorkeny', '<f8'),
 *         ('dir_x', '<f8'),
 */
  __Pyx_TraceLine(1705,0,__PYX_ERR(0, 1705, __pyx_L1_error))
  __pyx_t_5 = PyList_New(15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_tuple__594);
  __Pyx_GIVEREF(__pyx_tuple__594);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_tuple__594);
  __Pyx_INCREF(__pyx_tuple__595);
  __Pyx_GIVEREF(__pyx_tuple__595);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_tuple__595);
  __Pyx_INCREF(__pyx_tuple__596);
  __Pyx_GIVEREF(__pyx_tuple__596);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_tuple__596);
  __Pyx_INCREF(__pyx_tuple__597);
  __Pyx_GIVEREF(__pyx_tuple__597);
  PyList_SET_ITEM(__pyx_t_5, 3, __pyx_tuple__597);
  __Pyx_INCREF(__pyx_tuple__598);
  __Pyx_GIVEREF(__pyx_tuple__598);
  PyList_SET_ITEM(__pyx_t_5, 4, __pyx_tuple__598);
  __Pyx_INCREF(__pyx_tuple__599);
  __Pyx_GIVEREF(__pyx_tuple__599);
  PyList_SET_ITEM(__pyx_t_5, 5, __pyx_tuple__599);
  __Pyx_INCREF(__pyx_tuple__600);
  __Pyx_GIVEREF(__pyx_tuple__600);
  PyList_SET_ITEM(__pyx_t_5, 6, __pyx_tuple__600);
  __Pyx_INCREF(__pyx_tuple__601);
  __Pyx_GIVEREF(__pyx_tuple__601);
  PyList_SET_ITEM(__pyx_t_5, 7, __pyx_tuple__601);
  __Pyx_INCREF(__pyx_tuple__602);
  __Pyx_GIVEREF(__pyx_tuple__602);
  PyList_SET_ITEM(__pyx_t_5, 8, __pyx_tuple__602);
  __Pyx_INCREF(__pyx_tuple__603);
  __Pyx_GIVEREF(__pyx_tuple__603);
  PyList_SET_ITEM(__pyx_t_5, 9, __pyx_tuple__603);
  __Pyx_INCREF(__pyx_tuple__604);
  __Pyx_GIVEREF(__pyx_tuple__604);
  PyList_SET_ITEM(__pyx_t_5, 10, __pyx_tuple__604);
  __Pyx_INCREF(__pyx_tuple__605);
  __Pyx_GIVEREF(__pyx_tuple__605);
  PyList_SET_ITEM(__pyx_t_5, 11, __pyx_tuple__605);
  __Pyx_INCREF(__pyx_tuple__606);
  __Pyx_GIVEREF(__pyx_tuple__606);
  PyList_SET_ITEM(__pyx_t_5, 12, __pyx_tuple__606);
  __Pyx_INCREF(__pyx_tuple__607);
  __Pyx_GIVEREF(__pyx_tuple__607);
  PyList_SET_ITEM(__pyx_t_5, 13, __pyx_tuple__607);
  __Pyx_INCREF(__pyx_tuple__608);
  __Pyx_GIVEREF(__pyx_tuple__608);
  PyList_SET_ITEM(__pyx_t_5, 14, __pyx_tuple__608);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 1705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":1723
 *     ])
 * 
 *     def __init__(self, tracks, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._bjorkeny = None
 *         self._dir = None
 */
  __Pyx_TraceLine(1723,0,__PYX_ERR(0, 1723, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_1__init__, 0, __pyx_n_s_McTrackSeries___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__180)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__610);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 1723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":1741
 * 
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):             # <<<<<<<<<<<<<<
 *         return cls([McTrack(cls.get_usr_name(t, str('by'), 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 */
  __Pyx_TraceLine(1741,0,__PYX_ERR(0, 1741, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_3from_aanet, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_McTrackSeries_from_aanet, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__181)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":1740
 *         self.h5loc = h5loc
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_aanet(cls, tracks, event_id):
 *         return cls([McTrack(cls.get_usr_name(t, str('by'), 1),               # bjorkeny
 */
  __Pyx_TraceLine(1740,0,__PYX_ERR(0, 1740, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_from_aanet, __pyx_t_6) < 0) __PYX_ERR(0, 1741, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1766
 * 
 *     @classmethod
 *     def from_arrays(cls,             # <<<<<<<<<<<<<<
 *                     bjorkenys,
 *                     directions_x,
 */
  __Pyx_TraceLine(1766,0,__PYX_ERR(0, 1766, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_5from_arrays, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_McTrackSeries_from_arrays, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1765
 *                     for t in tracks], event_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(cls,
 *                     bjorkenys,
 */
  __Pyx_TraceLine(1765,0,__PYX_ERR(0, 1765, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_from_arrays, __pyx_t_5) < 0) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":1805
 * 
 *     @classmethod
 *     def from_km3df(cls, km3df):             # <<<<<<<<<<<<<<
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 *                               event_id=int(km3df['event_id']))
 */
  __Pyx_TraceLine(1805,0,__PYX_ERR(0, 1805, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_7from_km3df, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_McTrackSeries_from_km3df, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__186)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":1804
 *         return tracks
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_km3df(cls, km3df):
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 */
  __Pyx_TraceLine(1804,0,__PYX_ERR(0, 1804, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_from_km3df, __pyx_t_6) < 0) __PYX_ERR(0, 1805, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1810
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         return cls([McTrack(
 *             row['bjorkeny'],
 */
  __Pyx_TraceLine(1810,0,__PYX_ERR(0, 1810, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_9from_table, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_McTrackSeries_from_table, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1809
 *                               event_id=int(km3df['event_id']))
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_table(cls, table, event_id):
 *         return cls([McTrack(
 */
  __Pyx_TraceLine(1809,0,__PYX_ERR(0, 1809, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_from_table, __pyx_t_5) < 0) __PYX_ERR(0, 1810, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":1825
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1825,0,__PYX_ERR(0, 1825, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_11deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_McTrackSeries_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__188)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":1824
 *         ) for row in table], event_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(1824,0,__PYX_ERR(0, 1824, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_deserialise, __pyx_t_6) < 0) __PYX_ERR(0, 1825, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1828
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(1828,0,__PYX_ERR(0, 1828, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_13serialise, 0, __pyx_n_s_McTrackSeries_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_serialise, __pyx_t_6) < 0) __PYX_ERR(0, 1828, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1832
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data, event_id)
 */
  __Pyx_TraceLine(1832,0,__PYX_ERR(0, 1832, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_15conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_McTrackSeries_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__190)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__618);

  /* "km3pipe/dataclasses.pyx":1831
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(1831,0,__PYX_ERR(0, 1831, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_conv_from, __pyx_t_5) < 0) __PYX_ERR(0, 1832, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":1836
 *             return cls.from_table(data, event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __Pyx_TraceLine(1836,0,__PYX_ERR(0, 1836, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_17conv_to, 0, __pyx_n_s_McTrackSeries_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__620);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_conv_to, __pyx_t_5) < 0) __PYX_ERR(0, 1836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":1842
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 */
  __Pyx_TraceLine(1842,0,__PYX_ERR(0, 1842, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_19__array__, 0, __pyx_n_s_McTrackSeries___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__192)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_array, __pyx_t_5) < 0) __PYX_ERR(0, 1842, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":1851
 * 
 *     @classmethod
 *     def get_len(cls, track):             # <<<<<<<<<<<<<<
 *         try:
 *             return track.len
 */
  __Pyx_TraceLine(1851,0,__PYX_ERR(0, 1851, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_21get_len, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_McTrackSeries_get_len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__193)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":1850
 *         ) for t in self._tracks], dtype=self.dtype)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def get_len(cls, track):
 *         try:
 */
  __Pyx_TraceLine(1850,0,__PYX_ERR(0, 1850, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_get_len, __pyx_t_6) < 0) __PYX_ERR(0, 1851, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1858
 * 
 *     @classmethod
 *     def get_usr_item(cls, track, index=None):             # <<<<<<<<<<<<<<
 *         try:
 *             item = track.usr[index]
 */
  __Pyx_TraceLine(1858,0,__PYX_ERR(0, 1858, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_23get_usr_item, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_McTrackSeries_get_usr_item, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__624);

  /* "km3pipe/dataclasses.pyx":1857
 *             return 0
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def get_usr_item(cls, track, index=None):
 *         try:
 */
  __Pyx_TraceLine(1857,0,__PYX_ERR(0, 1857, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_get_usr_item, __pyx_t_5) < 0) __PYX_ERR(0, 1858, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":1866
 * 
 *     @classmethod
 *     def get_usr_name(cls, track, name, index=None):             # <<<<<<<<<<<<<<
 *         """Try to retrieve item based on name from aanet.
 * 
 */
  __Pyx_TraceLine(1866,0,__PYX_ERR(0, 1866, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_25get_usr_name, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_McTrackSeries_get_usr_name, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__195)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__626);

  /* "km3pipe/dataclasses.pyx":1865
 *         return item
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def get_usr_name(cls, track, name, index=None):
 *         """Try to retrieve item based on name from aanet.
 */
  __Pyx_TraceLine(1865,0,__PYX_ERR(0, 1865, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_get_usr_name, __pyx_t_6) < 0) __PYX_ERR(0, 1866, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1884
 * 
 *     @property
 *     def highest_energetic_muon(self):             # <<<<<<<<<<<<<<
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 */
  __Pyx_TraceLine(1884,0,__PYX_ERR(0, 1884, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_27highest_energetic_muon, 0, __pyx_n_s_McTrackSeries_highest_energetic_2, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1883
 *             return out
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def highest_energetic_muon(self):
 *         if self._highest_energetic_muon is None:
 */
  __Pyx_TraceLine(1883,0,__PYX_ERR(0, 1883, __pyx_L1_error))
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_highest_energetic_muon_2, __pyx_t_6) < 0) __PYX_ERR(0, 1884, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1892
 *         return self._highest_energetic_muon
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_TraceLine(1892,0,__PYX_ERR(0, 1892, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_29__iter__, 0, __pyx_n_s_McTrackSeries___iter, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_iter, __pyx_t_6) < 0) __PYX_ERR(0, 1892, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1895
 *         return self
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_TraceLine(1895,0,__PYX_ERR(0, 1895, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_31__iter__, 0, __pyx_n_s_McTrackSeries___iter, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__199)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_iter, __pyx_t_6) < 0) __PYX_ERR(0, 1895, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1899
 * 
 *     @property
 *     def bjorkeny(self):             # <<<<<<<<<<<<<<
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 */
  __Pyx_TraceLine(1899,0,__PYX_ERR(0, 1899, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_33bjorkeny, 0, __pyx_n_s_McTrackSeries_bjorkeny, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1898
 *         return self
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def bjorkeny(self):
 *         if self._bjorkeny is None:
 */
  __Pyx_TraceLine(1898,0,__PYX_ERR(0, 1898, __pyx_L1_error))
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_bjorkeny, __pyx_t_6) < 0) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1905
 * 
 *     @property
 *     def is_cc(self):             # <<<<<<<<<<<<<<
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 */
  __Pyx_TraceLine(1905,0,__PYX_ERR(0, 1905, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_35is_cc, 0, __pyx_n_s_McTrackSeries_is_cc, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__201)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1904
 *         return self._bjorkeny
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cc(self):
 *         if self._is_cc is None:
 */
  __Pyx_TraceLine(1904,0,__PYX_ERR(0, 1904, __pyx_L1_error))
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_is_cc, __pyx_t_6) < 0) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1911
 * 
 *     @property
 *     def interaction_channel(self):             # <<<<<<<<<<<<<<
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for
 */
  __Pyx_TraceLine(1911,0,__PYX_ERR(0, 1911, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_37interaction_channel, 0, __pyx_n_s_McTrackSeries_interaction_channe, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1910
 *         return self._is_cc
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def interaction_channel(self):
 *         if self._interaction_channel is None:
 */
  __Pyx_TraceLine(1910,0,__PYX_ERR(0, 1910, __pyx_L1_error))
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_interaction_channel, __pyx_t_6) < 0) __PYX_ERR(0, 1911, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1918
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])
 */
  __Pyx_TraceLine(1918,0,__PYX_ERR(0, 1918, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_39id, 0, __pyx_n_s_McTrackSeries_id, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__203)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1917
 *         return self._interaction_channel
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def id(self):
 *         if self._id is None:
 */
  __Pyx_TraceLine(1917,0,__PYX_ERR(0, 1917, __pyx_L1_error))
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_6) < 0) __PYX_ERR(0, 1918, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1924
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])
 */
  __Pyx_TraceLine(1924,0,__PYX_ERR(0, 1924, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_41time, 0, __pyx_n_s_McTrackSeries_time, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1923
 *         return self._id
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def time(self):
 *         if self._time is None:
 */
  __Pyx_TraceLine(1923,0,__PYX_ERR(0, 1923, __pyx_L1_error))
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_time, __pyx_t_6) < 0) __PYX_ERR(0, 1924, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1930
 * 
 *     @property
 *     def energy(self):             # <<<<<<<<<<<<<<
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])
 */
  __Pyx_TraceLine(1930,0,__PYX_ERR(0, 1930, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_43energy, 0, __pyx_n_s_McTrackSeries_energy, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__205)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1929
 *         return self._time
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def energy(self):
 *         if self._energy is None:
 */
  __Pyx_TraceLine(1929,0,__PYX_ERR(0, 1929, __pyx_L1_error))
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_energy, __pyx_t_6) < 0) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1936
 * 
 *     @property
 *     def length(self):             # <<<<<<<<<<<<<<
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])
 */
  __Pyx_TraceLine(1936,0,__PYX_ERR(0, 1936, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_45length, 0, __pyx_n_s_McTrackSeries_length, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1935
 *         return self._energy
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def length(self):
 *         if self._length is None:
 */
  __Pyx_TraceLine(1935,0,__PYX_ERR(0, 1935, __pyx_L1_error))
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_length, __pyx_t_6) < 0) __PYX_ERR(0, 1936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1942
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])
 */
  __Pyx_TraceLine(1942,0,__PYX_ERR(0, 1942, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_47type, 0, __pyx_n_s_McTrackSeries_type, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1941
 *         return self._length
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type(self):
 *         if self._type is None:
 */
  __Pyx_TraceLine(1941,0,__PYX_ERR(0, 1941, __pyx_L1_error))
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_type, __pyx_t_6) < 0) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1948
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])
 */
  __Pyx_TraceLine(1948,0,__PYX_ERR(0, 1948, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_49pos, 0, __pyx_n_s_McTrackSeries_pos, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__208)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1947
 *         return self._type
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def pos(self):
 *         if self._pos is None:
 */
  __Pyx_TraceLine(1947,0,__PYX_ERR(0, 1947, __pyx_L1_error))
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_pos, __pyx_t_6) < 0) __PYX_ERR(0, 1948, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1954
 * 
 *     @property
 *     def dir(self):             # <<<<<<<<<<<<<<
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])
 */
  __Pyx_TraceLine(1954,0,__PYX_ERR(0, 1954, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_51dir, 0, __pyx_n_s_McTrackSeries_dir, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":1953
 *         return self._pos
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dir(self):
 *         if self._dir is None:
 */
  __Pyx_TraceLine(1953,0,__PYX_ERR(0, 1953, __pyx_L1_error))
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_dir, __pyx_t_6) < 0) __PYX_ERR(0, 1954, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1959
 *         return self._dir
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __Pyx_TraceLine(1959,0,__PYX_ERR(0, 1959, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_53next, 0, __pyx_n_s_McTrackSeries_next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__210)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_next_2, __pyx_t_6) < 0) __PYX_ERR(0, 1959, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1963
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __Pyx_TraceLine(1963,0,__PYX_ERR(0, 1963, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_55__next__, 0, __pyx_n_s_McTrackSeries___next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_next, __pyx_t_6) < 0) __PYX_ERR(0, 1963, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1971
 *         return item
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return len(self._tracks)
 * 
 */
  __Pyx_TraceLine(1971,0,__PYX_ERR(0, 1971, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_57__len__, 0, __pyx_n_s_McTrackSeries___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__212)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_len_2, __pyx_t_6) < 0) __PYX_ERR(0, 1971, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1974
 *         return len(self._tracks)
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._tracks[index]
 */
  __Pyx_TraceLine(1974,0,__PYX_ERR(0, 1974, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_59__getitem__, 0, __pyx_n_s_McTrackSeries___getitem, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__213)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getitem, __pyx_t_6) < 0) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1982
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
  __Pyx_TraceLine(1982,0,__PYX_ERR(0, 1982, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_61_slice_generator, 0, __pyx_n_s_McTrackSeries__slice_generator, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__645)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_slice_generator, __pyx_t_6) < 0) __PYX_ERR(0, 1982, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1988
 *             yield self._tracks[i]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 */
  __Pyx_TraceLine(1988,0,__PYX_ERR(0, 1988, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_64__str__, 0, __pyx_n_s_McTrackSeries___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__215)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_str, __pyx_t_6) < 0) __PYX_ERR(0, 1988, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1993
 *         return("McTrackSeries with {0} track{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(1993,0,__PYX_ERR(0, 1993, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_66__repr__, 0, __pyx_n_s_McTrackSeries___repr, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__216)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_6) < 0) __PYX_ERR(0, 1993, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1996
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(track) for track in self._tracks])
 * 
 */
  __Pyx_TraceLine(1996,0,__PYX_ERR(0, 1996, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_13McTrackSeries_68__insp__, 0, __pyx_n_s_McTrackSeries___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__217)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_insp, __pyx_t_6) < 0) __PYX_ERR(0, 1996, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":1697
 * 
 * 
 * class McTrackSeries(object):             # <<<<<<<<<<<<<<
 *     """Collection of multiple McTracks.
 * 
 */
  __Pyx_TraceLine(1697,0,__PYX_ERR(0, 1697, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_McTrackSeries, __pyx_tuple__593, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_McTrackSeries, __pyx_t_6) < 0) __PYX_ERR(0, 1697, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":2000
 * 
 * 
 * class TrackSeries(object):             # <<<<<<<<<<<<<<
 *     """Collection of multiple Tracks.
 * 
 */
  __Pyx_TraceLine(2000,0,__PYX_ERR(0, 2000, __pyx_L1_error))
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__649); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__649, __pyx_n_s_TrackSeries, __pyx_n_s_TrackSeries, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Collection_of_multiple_Tracks_At); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "km3pipe/dataclasses.pyx":2007
 *     dtype: datatype of array representation
 *     """
 *     h5loc = '/tracks'             # <<<<<<<<<<<<<<
 *     dtype = np.dtype([
 *         ('bjorkeny', '<f8'),
 */
  __Pyx_TraceLine(2007,0,__PYX_ERR(0, 2007, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_h5loc, __pyx_kp_s_tracks_3) < 0) __PYX_ERR(0, 2007, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2008
 *     """
 *     h5loc = '/tracks'
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('bjorkeny', '<f8'),
 *         ('dir_x', '<f8'),
 */
  __Pyx_TraceLine(2008,0,__PYX_ERR(0, 2008, __pyx_L1_error))
  __pyx_t_6 = PyList_New(15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_tuple__650);
  __Pyx_GIVEREF(__pyx_tuple__650);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_tuple__650);
  __Pyx_INCREF(__pyx_tuple__651);
  __Pyx_GIVEREF(__pyx_tuple__651);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_tuple__651);
  __Pyx_INCREF(__pyx_tuple__652);
  __Pyx_GIVEREF(__pyx_tuple__652);
  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_tuple__652);
  __Pyx_INCREF(__pyx_tuple__653);
  __Pyx_GIVEREF(__pyx_tuple__653);
  PyList_SET_ITEM(__pyx_t_6, 3, __pyx_tuple__653);
  __Pyx_INCREF(__pyx_tuple__654);
  __Pyx_GIVEREF(__pyx_tuple__654);
  PyList_SET_ITEM(__pyx_t_6, 4, __pyx_tuple__654);
  __Pyx_INCREF(__pyx_tuple__655);
  __Pyx_GIVEREF(__pyx_tuple__655);
  PyList_SET_ITEM(__pyx_t_6, 5, __pyx_tuple__655);
  __Pyx_INCREF(__pyx_tuple__656);
  __Pyx_GIVEREF(__pyx_tuple__656);
  PyList_SET_ITEM(__pyx_t_6, 6, __pyx_tuple__656);
  __Pyx_INCREF(__pyx_tuple__657);
  __Pyx_GIVEREF(__pyx_tuple__657);
  PyList_SET_ITEM(__pyx_t_6, 7, __pyx_tuple__657);
  __Pyx_INCREF(__pyx_tuple__658);
  __Pyx_GIVEREF(__pyx_tuple__658);
  PyList_SET_ITEM(__pyx_t_6, 8, __pyx_tuple__658);
  __Pyx_INCREF(__pyx_tuple__659);
  __Pyx_GIVEREF(__pyx_tuple__659);
  PyList_SET_ITEM(__pyx_t_6, 9, __pyx_tuple__659);
  __Pyx_INCREF(__pyx_tuple__660);
  __Pyx_GIVEREF(__pyx_tuple__660);
  PyList_SET_ITEM(__pyx_t_6, 10, __pyx_tuple__660);
  __Pyx_INCREF(__pyx_tuple__661);
  __Pyx_GIVEREF(__pyx_tuple__661);
  PyList_SET_ITEM(__pyx_t_6, 11, __pyx_tuple__661);
  __Pyx_INCREF(__pyx_tuple__662);
  __Pyx_GIVEREF(__pyx_tuple__662);
  PyList_SET_ITEM(__pyx_t_6, 12, __pyx_tuple__662);
  __Pyx_INCREF(__pyx_tuple__663);
  __Pyx_GIVEREF(__pyx_tuple__663);
  PyList_SET_ITEM(__pyx_t_6, 13, __pyx_tuple__663);
  __Pyx_INCREF(__pyx_tuple__664);
  __Pyx_GIVEREF(__pyx_tuple__664);
  PyList_SET_ITEM(__pyx_t_6, 14, __pyx_tuple__664);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 2008, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2026
 *     ])
 * 
 *     def __init__(self, tracks, event_id, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self._bjorkeny = None
 *         self._dir = None
 */
  __Pyx_TraceLine(2026,0,__PYX_ERR(0, 2026, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_1__init__, 0, __pyx_n_s_TrackSeries___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__218)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__666);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2044
 * 
 *     @classmethod
 *     def from_aanet(cls, tracks, event_id):             # <<<<<<<<<<<<<<
 *         return cls([Track(cls.get_usr_name(t, str('by'), 1),               # bjorkeny
 *                           Direction((t.dir.x, t.dir.y, t.dir.z)),
 */
  __Pyx_TraceLine(2044,0,__PYX_ERR(0, 2044, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_3from_aanet, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TrackSeries_from_aanet, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__219)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":2043
 *         self.h5loc = h5loc
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_aanet(cls, tracks, event_id):
 *         return cls([Track(cls.get_usr_name(t, str('by'), 1),               # bjorkeny
 */
  __Pyx_TraceLine(2043,0,__PYX_ERR(0, 2043, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_from_aanet, __pyx_t_5) < 0) __PYX_ERR(0, 2044, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2069
 * 
 *     @classmethod
 *     def from_arrays(cls,             # <<<<<<<<<<<<<<
 *                     bjorkenys,
 *                     directions_x,
 */
  __Pyx_TraceLine(2069,0,__PYX_ERR(0, 2069, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_5from_arrays, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TrackSeries_from_arrays, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__223)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":2068
 *                     for t in tracks], event_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(cls,
 *                     bjorkenys,
 */
  __Pyx_TraceLine(2068,0,__PYX_ERR(0, 2068, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_from_arrays, __pyx_t_6) < 0) __PYX_ERR(0, 2069, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2108
 * 
 *     @classmethod
 *     def from_km3df(cls, km3df):             # <<<<<<<<<<<<<<
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 *                               event_id=int(km3df['event_id']))
 */
  __Pyx_TraceLine(2108,0,__PYX_ERR(0, 2108, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_7from_km3df, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TrackSeries_from_km3df, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__224)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":2107
 *         return tracks
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_km3df(cls, km3df):
 *         return cls.from_table(km3df.conv_to(to='numpy'),
 */
  __Pyx_TraceLine(2107,0,__PYX_ERR(0, 2107, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_from_km3df, __pyx_t_5) < 0) __PYX_ERR(0, 2108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2113
 * 
 *     @classmethod
 *     def from_table(cls, table, event_id):             # <<<<<<<<<<<<<<
 *         return cls([Track(
 *             row['bjorkeny'],
 */
  __Pyx_TraceLine(2113,0,__PYX_ERR(0, 2113, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_9from_table, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TrackSeries_from_table, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__225)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":2112
 *                               event_id=int(km3df['event_id']))
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_table(cls, table, event_id):
 *         return cls([Track(
 */
  __Pyx_TraceLine(2112,0,__PYX_ERR(0, 2112, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_from_table, __pyx_t_6) < 0) __PYX_ERR(0, 2113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2128
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(2128,0,__PYX_ERR(0, 2128, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_11deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TrackSeries_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__226)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":2127
 *         ) for row in table], event_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(2127,0,__PYX_ERR(0, 2127, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_deserialise, __pyx_t_5) < 0) __PYX_ERR(0, 2128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2131
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(2131,0,__PYX_ERR(0, 2131, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_13serialise, 0, __pyx_n_s_TrackSeries_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_serialise, __pyx_t_5) < 0) __PYX_ERR(0, 2131, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2135
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             return cls.from_table(data, event_id)
 */
  __Pyx_TraceLine(2135,0,__PYX_ERR(0, 2135, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_15conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TrackSeries_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__228)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__674);

  /* "km3pipe/dataclasses.pyx":2134
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, event_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(2134,0,__PYX_ERR(0, 2134, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_conv_from, __pyx_t_6) < 0) __PYX_ERR(0, 2135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2139
 *             return cls.from_table(data, event_id)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __Pyx_TraceLine(2139,0,__PYX_ERR(0, 2139, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_17conv_to, 0, __pyx_n_s_TrackSeries_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__229)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__676);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_conv_to, __pyx_t_6) < 0) __PYX_ERR(0, 2139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2145
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array([(
 *             t.bjorkeny, t.dir[0], t.dir[1], t.dir[2], t.energy,
 */
  __Pyx_TraceLine(2145,0,__PYX_ERR(0, 2145, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_19__array__, 0, __pyx_n_s_TrackSeries___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__230)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_array, __pyx_t_6) < 0) __PYX_ERR(0, 2145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2154
 * 
 *     @classmethod
 *     def get_len(cls, track):             # <<<<<<<<<<<<<<
 *         try:
 *             return track.len
 */
  __Pyx_TraceLine(2154,0,__PYX_ERR(0, 2154, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_21get_len, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TrackSeries_get_len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__231)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":2153
 *         ) for t in self._tracks], dtype=self.dtype)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def get_len(cls, track):
 *         try:
 */
  __Pyx_TraceLine(2153,0,__PYX_ERR(0, 2153, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_get_len, __pyx_t_5) < 0) __PYX_ERR(0, 2154, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2161
 * 
 *     @classmethod
 *     def get_usr_item(cls, track, index=None):             # <<<<<<<<<<<<<<
 *         try:
 *             item = track.usr[index]
 */
  __Pyx_TraceLine(2161,0,__PYX_ERR(0, 2161, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_23get_usr_item, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TrackSeries_get_usr_item, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__232)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__680);

  /* "km3pipe/dataclasses.pyx":2160
 *             return 0
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def get_usr_item(cls, track, index=None):
 *         try:
 */
  __Pyx_TraceLine(2160,0,__PYX_ERR(0, 2160, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_get_usr_item, __pyx_t_6) < 0) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2169
 * 
 *     @classmethod
 *     def get_usr_name(cls, track, name, index=None):             # <<<<<<<<<<<<<<
 *         """Try to retrieve item based on name from aanet.
 * 
 */
  __Pyx_TraceLine(2169,0,__PYX_ERR(0, 2169, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_25get_usr_name, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TrackSeries_get_usr_name, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__233)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__682);

  /* "km3pipe/dataclasses.pyx":2168
 *         return item
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def get_usr_name(cls, track, name, index=None):
 *         """Try to retrieve item based on name from aanet.
 */
  __Pyx_TraceLine(2168,0,__PYX_ERR(0, 2168, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_get_usr_name, __pyx_t_5) < 0) __PYX_ERR(0, 2169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2187
 * 
 *     @property
 *     def highest_energetic_muon(self):             # <<<<<<<<<<<<<<
 *         if self._highest_energetic_muon is None:
 *             muons = [track for track in self if abs(track.type) == 13]
 */
  __Pyx_TraceLine(2187,0,__PYX_ERR(0, 2187, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_27highest_energetic_muon, 0, __pyx_n_s_TrackSeries_highest_energetic_mu_2, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__234)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":2186
 *         return out
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def highest_energetic_muon(self):
 *         if self._highest_energetic_muon is None:
 */
  __Pyx_TraceLine(2186,0,__PYX_ERR(0, 2186, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_highest_energetic_muon_2, __pyx_t_5) < 0) __PYX_ERR(0, 2187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2195
 *         return self._highest_energetic_muon
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_TraceLine(2195,0,__PYX_ERR(0, 2195, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_29__iter__, 0, __pyx_n_s_TrackSeries___iter, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__236)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_iter, __pyx_t_5) < 0) __PYX_ERR(0, 2195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2198
 *         return self
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_TraceLine(2198,0,__PYX_ERR(0, 2198, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_31__iter__, 0, __pyx_n_s_TrackSeries___iter, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__237)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_iter, __pyx_t_5) < 0) __PYX_ERR(0, 2198, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2202
 * 
 *     @property
 *     def bjorkeny(self):             # <<<<<<<<<<<<<<
 *         if self._bjorkeny is None:
 *             self._bjorkeny = np.array([t.bjorkeny for t in self._tracks])
 */
  __Pyx_TraceLine(2202,0,__PYX_ERR(0, 2202, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_33bjorkeny, 0, __pyx_n_s_TrackSeries_bjorkeny, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__238)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":2201
 *         return self
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def bjorkeny(self):
 *         if self._bjorkeny is None:
 */
  __Pyx_TraceLine(2201,0,__PYX_ERR(0, 2201, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_bjorkeny, __pyx_t_5) < 0) __PYX_ERR(0, 2202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2208
 * 
 *     @property
 *     def is_cc(self):             # <<<<<<<<<<<<<<
 *         if self._is_cc is None:
 *             self._is_cc = np.array([t.is_cc for t in self._tracks])
 */
  __Pyx_TraceLine(2208,0,__PYX_ERR(0, 2208, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_35is_cc, 0, __pyx_n_s_TrackSeries_is_cc, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__239)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":2207
 *         return self._bjorkeny
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_cc(self):
 *         if self._is_cc is None:
 */
  __Pyx_TraceLine(2207,0,__PYX_ERR(0, 2207, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_is_cc, __pyx_t_5) < 0) __PYX_ERR(0, 2208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2214
 * 
 *     @property
 *     def interaction_channel(self):             # <<<<<<<<<<<<<<
 *         if self._interaction_channel is None:
 *             self._interaction_channel = np.array([t.interaction_channel for
 */
  __Pyx_TraceLine(2214,0,__PYX_ERR(0, 2214, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_37interaction_channel, 0, __pyx_n_s_TrackSeries_interaction_channel, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__240)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":2213
 *         return self._is_cc
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def interaction_channel(self):
 *         if self._interaction_channel is None:
 */
  __Pyx_TraceLine(2213,0,__PYX_ERR(0, 2213, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_interaction_channel, __pyx_t_5) < 0) __PYX_ERR(0, 2214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2221
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         if self._id is None:
 *             self._id = np.array([t.id for t in self._tracks])
 */
  __Pyx_TraceLine(2221,0,__PYX_ERR(0, 2221, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_39id, 0, __pyx_n_s_TrackSeries_id, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__241)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":2220
 *         return self._interaction_channel
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def id(self):
 *         if self._id is None:
 */
  __Pyx_TraceLine(2220,0,__PYX_ERR(0, 2220, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_5) < 0) __PYX_ERR(0, 2221, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2227
 * 
 *     @property
 *     def time(self):             # <<<<<<<<<<<<<<
 *         if self._time is None:
 *             self._time = np.array([t.time for t in self._tracks])
 */
  __Pyx_TraceLine(2227,0,__PYX_ERR(0, 2227, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_41time, 0, __pyx_n_s_TrackSeries_time, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__242)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":2226
 *         return self._id
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def time(self):
 *         if self._time is None:
 */
  __Pyx_TraceLine(2226,0,__PYX_ERR(0, 2226, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_time, __pyx_t_5) < 0) __PYX_ERR(0, 2227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2233
 * 
 *     @property
 *     def energy(self):             # <<<<<<<<<<<<<<
 *         if self._energy is None:
 *             self._energy = np.array([t.energy for t in self._tracks])
 */
  __Pyx_TraceLine(2233,0,__PYX_ERR(0, 2233, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_43energy, 0, __pyx_n_s_TrackSeries_energy, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__243)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":2232
 *         return self._time
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def energy(self):
 *         if self._energy is None:
 */
  __Pyx_TraceLine(2232,0,__PYX_ERR(0, 2232, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_energy, __pyx_t_5) < 0) __PYX_ERR(0, 2233, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2239
 * 
 *     @property
 *     def length(self):             # <<<<<<<<<<<<<<
 *         if self._length is None:
 *             self._length = np.array([t.length for t in self._tracks])
 */
  __Pyx_TraceLine(2239,0,__PYX_ERR(0, 2239, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_45length, 0, __pyx_n_s_TrackSeries_length, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__244)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":2238
 *         return self._energy
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def length(self):
 *         if self._length is None:
 */
  __Pyx_TraceLine(2238,0,__PYX_ERR(0, 2238, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_length, __pyx_t_5) < 0) __PYX_ERR(0, 2239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2245
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         if self._type is None:
 *             self._type = np.array([t.type for t in self._tracks])
 */
  __Pyx_TraceLine(2245,0,__PYX_ERR(0, 2245, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_47type, 0, __pyx_n_s_TrackSeries_type, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__245)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":2244
 *         return self._length
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def type(self):
 *         if self._type is None:
 */
  __Pyx_TraceLine(2244,0,__PYX_ERR(0, 2244, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_type, __pyx_t_5) < 0) __PYX_ERR(0, 2245, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2251
 * 
 *     @property
 *     def pos(self):             # <<<<<<<<<<<<<<
 *         if self._pos is None:
 *             self._pos = np.array([t.pos for t in self._tracks])
 */
  __Pyx_TraceLine(2251,0,__PYX_ERR(0, 2251, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_49pos, 0, __pyx_n_s_TrackSeries_pos, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__246)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":2250
 *         return self._type
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def pos(self):
 *         if self._pos is None:
 */
  __Pyx_TraceLine(2250,0,__PYX_ERR(0, 2250, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_pos, __pyx_t_5) < 0) __PYX_ERR(0, 2251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2257
 * 
 *     @property
 *     def dir(self):             # <<<<<<<<<<<<<<
 *         if self._dir is None:
 *             self._dir = np.array([t.dir for t in self._tracks])
 */
  __Pyx_TraceLine(2257,0,__PYX_ERR(0, 2257, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_51dir, 0, __pyx_n_s_TrackSeries_dir, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__247)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":2256
 *         return self._pos
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dir(self):
 *         if self._dir is None:
 */
  __Pyx_TraceLine(2256,0,__PYX_ERR(0, 2256, __pyx_L1_error))
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_dir, __pyx_t_5) < 0) __PYX_ERR(0, 2257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2262
 *         return self._dir
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __Pyx_TraceLine(2262,0,__PYX_ERR(0, 2262, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_53next, 0, __pyx_n_s_TrackSeries_next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__248)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_next_2, __pyx_t_5) < 0) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2266
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __Pyx_TraceLine(2266,0,__PYX_ERR(0, 2266, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_55__next__, 0, __pyx_n_s_TrackSeries___next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__249)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_next, __pyx_t_5) < 0) __PYX_ERR(0, 2266, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2274
 *         return item
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return len(self._tracks)
 * 
 */
  __Pyx_TraceLine(2274,0,__PYX_ERR(0, 2274, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_57__len__, 0, __pyx_n_s_TrackSeries___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__250)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_len_2, __pyx_t_5) < 0) __PYX_ERR(0, 2274, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2277
 *         return len(self._tracks)
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._tracks[index]
 */
  __Pyx_TraceLine(2277,0,__PYX_ERR(0, 2277, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_59__getitem__, 0, __pyx_n_s_TrackSeries___getitem, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__251)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getitem, __pyx_t_5) < 0) __PYX_ERR(0, 2277, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2285
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
  __Pyx_TraceLine(2285,0,__PYX_ERR(0, 2285, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_61_slice_generator, 0, __pyx_n_s_TrackSeries__slice_generator, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__701)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_slice_generator, __pyx_t_5) < 0) __PYX_ERR(0, 2285, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2291
 *             yield self._tracks[i]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         n_tracks = len(self)
 *         plural = 's' if n_tracks > 1 or n_tracks == 0 else ''
 */
  __Pyx_TraceLine(2291,0,__PYX_ERR(0, 2291, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_64__str__, 0, __pyx_n_s_TrackSeries___str, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__253)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_str, __pyx_t_5) < 0) __PYX_ERR(0, 2291, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2296
 *         return("TrackSeries with {0} track{1}.".format(len(self), plural))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
 */
  __Pyx_TraceLine(2296,0,__PYX_ERR(0, 2296, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_66__repr__, 0, __pyx_n_s_TrackSeries___repr, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__254)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_5) < 0) __PYX_ERR(0, 2296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2299
 *         return self.__str__()
 * 
 *     def __insp__(self):             # <<<<<<<<<<<<<<
 *         return '\n'.join([str(track) for track in self._tracks])
 * 
 */
  __Pyx_TraceLine(2299,0,__PYX_ERR(0, 2299, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_11TrackSeries_68__insp__, 0, __pyx_n_s_TrackSeries___insp, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__255)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_insp, __pyx_t_5) < 0) __PYX_ERR(0, 2299, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2000
 * 
 * 
 * class TrackSeries(object):             # <<<<<<<<<<<<<<
 *     """Collection of multiple Tracks.
 * 
 */
  __Pyx_TraceLine(2000,0,__PYX_ERR(0, 2000, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TrackSeries, __pyx_tuple__649, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TrackSeries, __pyx_t_5) < 0) __PYX_ERR(0, 2000, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":2303
 * 
 * 
 * class SummaryframeSeries(object):             # <<<<<<<<<<<<<<
 *     """Collection of summary frames.
 *     """
 */
  __Pyx_TraceLine(2303,0,__PYX_ERR(0, 2303, __pyx_L1_error))
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__705); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__705, __pyx_n_s_SummaryframeSeries, __pyx_n_s_SummaryframeSeries, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Collection_of_summary_frames); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "km3pipe/dataclasses.pyx":2306
 *     """Collection of summary frames.
 *     """
 *     h5loc = '/summary_frame_series'             # <<<<<<<<<<<<<<
 *     dtype = np.dtype([
 *         ('dom_id', '<u4'),
 */
  __Pyx_TraceLine(2306,0,__PYX_ERR(0, 2306, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_h5loc, __pyx_kp_s_summary_frame_series) < 0) __PYX_ERR(0, 2306, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2307
 *     """
 *     h5loc = '/summary_frame_series'
 *     dtype = np.dtype([             # <<<<<<<<<<<<<<
 *         ('dom_id', '<u4'),
 *         ('max_sequence_number', '<u4'),
 */
  __Pyx_TraceLine(2307,0,__PYX_ERR(0, 2307, __pyx_L1_error))
  __pyx_t_5 = PyList_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_tuple__706);
  __Pyx_GIVEREF(__pyx_tuple__706);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_tuple__706);
  __Pyx_INCREF(__pyx_tuple__707);
  __Pyx_GIVEREF(__pyx_tuple__707);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_tuple__707);
  __Pyx_INCREF(__pyx_tuple__708);
  __Pyx_GIVEREF(__pyx_tuple__708);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_tuple__708);
  __Pyx_INCREF(__pyx_tuple__709);
  __Pyx_GIVEREF(__pyx_tuple__709);
  PyList_SET_ITEM(__pyx_t_5, 3, __pyx_tuple__709);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 2307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2313
 *         ('slice_id', '<u4'),
 *         ])
 *     h5loc = '/'             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, arr):
 */
  __Pyx_TraceLine(2313,0,__PYX_ERR(0, 2313, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_h5loc, __pyx_kp_s__2) < 0) __PYX_ERR(0, 2313, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2315
 *     h5loc = '/'
 * 
 *     def __init__(self, arr):             # <<<<<<<<<<<<<<
 *         self._arr = arr
 *         self._index = 0
 */
  __Pyx_TraceLine(2315,0,__PYX_ERR(0, 2315, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_1__init__, 0, __pyx_n_s_SummaryframeSeries___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__256)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 2315, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2321
 * 
 *     @classmethod
 *     def from_arrays(cls, dom_ids, max_sequence_numbers, n_received_packets,             # <<<<<<<<<<<<<<
 *                     slice_id):
 *         length = dom_ids.shape[0]
 */
  __Pyx_TraceLine(2321,0,__PYX_ERR(0, 2321, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_3from_arrays, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummaryframeSeries_from_arrays, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__257)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":2320
 *         self._frames = None
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_arrays(cls, dom_ids, max_sequence_numbers, n_received_packets,
 *                     slice_id):
 */
  __Pyx_TraceLine(2320,0,__PYX_ERR(0, 2320, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_from_arrays, __pyx_t_6) < 0) __PYX_ERR(0, 2321, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2331
 *         return cls(frames)
 * 
 *     def from_table(cls, table, slice_id):             # <<<<<<<<<<<<<<
 *         if slice_id is None:
 *             slice_id = table[0]['slice_id']
 */
  __Pyx_TraceLine(2331,0,__PYX_ERR(0, 2331, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_5from_table, 0, __pyx_n_s_SummaryframeSeries_from_table, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__258)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_from_table, __pyx_t_6) < 0) __PYX_ERR(0, 2331, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2341
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(2341,0,__PYX_ERR(0, 2341, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_7deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummaryframeSeries_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__259)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":2340
 *         ) for row in table], dtype=cls.dtype), slice_id)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(2340,0,__PYX_ERR(0, 2340, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_deserialise, __pyx_t_5) < 0) __PYX_ERR(0, 2341, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2344
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(2344,0,__PYX_ERR(0, 2344, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_9serialise, 0, __pyx_n_s_SummaryframeSeries_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__260)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_serialise, __pyx_t_5) < 0) __PYX_ERR(0, 2344, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2348
 * 
 *     @classmethod
 *     def conv_from(cls, data, slice_id, fmt='numpy', h5loc='/'):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             # return cls.from_table(data, event_id)
 */
  __Pyx_TraceLine(2348,0,__PYX_ERR(0, 2348, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_11conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_SummaryframeSeries_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__261)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__716);

  /* "km3pipe/dataclasses.pyx":2347
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, slice_id, fmt='numpy', h5loc='/'):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(2347,0,__PYX_ERR(0, 2347, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_conv_from, __pyx_t_6) < 0) __PYX_ERR(0, 2348, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2353
 *             return cls(data)
 * 
 *     def conv_to(self, to='numpy'):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __Pyx_TraceLine(2353,0,__PYX_ERR(0, 2353, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_13conv_to, 0, __pyx_n_s_SummaryframeSeries_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__262)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__718);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_conv_to, __pyx_t_6) < 0) __PYX_ERR(0, 2353, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2360
 * 
 *     @property
 *     def n_received_packets(self):             # <<<<<<<<<<<<<<
 *         return self._arr['n_received_packets']
 * 
 */
  __Pyx_TraceLine(2360,0,__PYX_ERR(0, 2360, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_15n_received_packets, 0, __pyx_n_s_SummaryframeSeries_n_received_pa, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__263)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":2359
 *             return KM3DataFrame(self.conv_to(to='numpy'), h5loc=self.h5loc)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def n_received_packets(self):
 *         return self._arr['n_received_packets']
 */
  __Pyx_TraceLine(2359,0,__PYX_ERR(0, 2359, __pyx_L1_error))
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_n_received_packets, __pyx_t_6) < 0) __PYX_ERR(0, 2360, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2364
 * 
 *     @property
 *     def dom_ids(self):             # <<<<<<<<<<<<<<
 *         return self._arr['dom_ids']
 * 
 */
  __Pyx_TraceLine(2364,0,__PYX_ERR(0, 2364, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_17dom_ids, 0, __pyx_n_s_SummaryframeSeries_dom_ids, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__264)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":2363
 *         return self._arr['n_received_packets']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def dom_ids(self):
 *         return self._arr['dom_ids']
 */
  __Pyx_TraceLine(2363,0,__PYX_ERR(0, 2363, __pyx_L1_error))
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_dom_ids, __pyx_t_6) < 0) __PYX_ERR(0, 2364, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2368
 * 
 *     @property
 *     def max_sequence_numbers(self):             # <<<<<<<<<<<<<<
 *         return self._arr['max_sequence_numbers']
 * 
 */
  __Pyx_TraceLine(2368,0,__PYX_ERR(0, 2368, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_19max_sequence_numbers, 0, __pyx_n_s_SummaryframeSeries_max_sequence, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__265)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":2367
 *         return self._arr['dom_ids']
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def max_sequence_numbers(self):
 *         return self._arr['max_sequence_numbers']
 */
  __Pyx_TraceLine(2367,0,__PYX_ERR(0, 2367, __pyx_L1_error))
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_max_sequence_numbers, __pyx_t_6) < 0) __PYX_ERR(0, 2368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2371
 *         return self._arr['max_sequence_numbers']
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return self._arr
 * 
 */
  __Pyx_TraceLine(2371,0,__PYX_ERR(0, 2371, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_21__array__, 0, __pyx_n_s_SummaryframeSeries___array, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__266)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_array, __pyx_t_6) < 0) __PYX_ERR(0, 2371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2374
 *         return self._arr
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_TraceLine(2374,0,__PYX_ERR(0, 2374, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_23__iter__, 0, __pyx_n_s_SummaryframeSeries___iter, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__267)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_iter, __pyx_t_6) < 0) __PYX_ERR(0, 2374, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2377
 *         return self
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         """Python 2/3 compatibility for iterators"""
 *         return self.__next__()
 */
  __Pyx_TraceLine(2377,0,__PYX_ERR(0, 2377, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_25next, 0, __pyx_n_s_SummaryframeSeries_next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__268)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_next_2, __pyx_t_6) < 0) __PYX_ERR(0, 2377, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2381
 *         return self.__next__()
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self._index >= len(self):
 *             self._index = 0
 */
  __Pyx_TraceLine(2381,0,__PYX_ERR(0, 2381, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_27__next__, 0, __pyx_n_s_SummaryframeSeries___next, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__269)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_next, __pyx_t_6) < 0) __PYX_ERR(0, 2381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2389
 *         return data
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._arr.shape[0]
 * 
 */
  __Pyx_TraceLine(2389,0,__PYX_ERR(0, 2389, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_29__len__, 0, __pyx_n_s_SummaryframeSeries___len, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__270)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_len_2, __pyx_t_6) < 0) __PYX_ERR(0, 2389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2392
 *         return self._arr.shape[0]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         if isinstance(index, int):
 *             return self._arr[index]
 */
  __Pyx_TraceLine(2392,0,__PYX_ERR(0, 2392, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_31__getitem__, 0, __pyx_n_s_SummaryframeSeries___getitem, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__271)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getitem, __pyx_t_6) < 0) __PYX_ERR(0, 2392, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2400
 *             raise TypeError("index must be int or slice")
 * 
 *     def _slice_generator(self, index):             # <<<<<<<<<<<<<<
 *         """A simple slice generator for iterations"""
 *         start, stop, step = index.indices(len(self))
 */
  __Pyx_TraceLine(2400,0,__PYX_ERR(0, 2400, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_18SummaryframeSeries_33_slice_generator, 0, __pyx_n_s_SummaryframeSeries__slice_genera, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__729)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_slice_generator, __pyx_t_6) < 0) __PYX_ERR(0, 2400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2303
 * 
 * 
 * class SummaryframeSeries(object):             # <<<<<<<<<<<<<<
 *     """Collection of summary frames.
 *     """
 */
  __Pyx_TraceLine(2303,0,__PYX_ERR(0, 2303, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SummaryframeSeries, __pyx_tuple__705, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SummaryframeSeries, __pyx_t_6) < 0) __PYX_ERR(0, 2303, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":2407
 * 
 * 
 * class KM3Array(np.ndarray):             # <<<<<<<<<<<<<<
 *     """Numpy NDarray + metadata.
 * 
 */
  __Pyx_TraceLine(2407,0,__PYX_ERR(0, 2407, __pyx_L1_error))
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_5numpy_ndarray));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_5numpy_ndarray));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_5numpy_ndarray));
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_KM3Array, __pyx_n_s_KM3Array, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Numpy_NDarray_metadata_This_clas); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":2424
 *         Convert for storage.
 *     """
 *     def __new__(cls, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         obj = np.asarray(arr).view(cls)
 *         obj.h5loc = h5loc
 */
  __Pyx_TraceLine(2424,0,__PYX_ERR(0, 2424, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_8KM3Array_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_KM3Array___new, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__273)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__731);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_new, __pyx_t_5) < 0) __PYX_ERR(0, 2424, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2429
 *         return obj
 * 
 *     def __init__(self, arr, h5loc='/'):             # <<<<<<<<<<<<<<
 *         self.array = arr
 *         self.h5loc = h5loc
 */
  __Pyx_TraceLine(2429,0,__PYX_ERR(0, 2429, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_8KM3Array_3__init__, 0, __pyx_n_s_KM3Array___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__274)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__733);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 2429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2433
 *         self.h5loc = h5loc
 * 
 *     def __array_finalize__(self, obj):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             return
 */
  __Pyx_TraceLine(2433,0,__PYX_ERR(0, 2433, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_8KM3Array_5__array_finalize__, 0, __pyx_n_s_KM3Array___array_finalize, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__275)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_array_finalize, __pyx_t_5) < 0) __PYX_ERR(0, 2433, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2439
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(2439,0,__PYX_ERR(0, 2439, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_8KM3Array_7deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_KM3Array_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__276)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "km3pipe/dataclasses.pyx":2438
 *         self.h5loc = getattr(obj, 'h5loc', None)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(2438,0,__PYX_ERR(0, 2438, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_deserialise, __pyx_t_8) < 0) __PYX_ERR(0, 2439, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":2442
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(2442,0,__PYX_ERR(0, 2442, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_8KM3Array_9serialise, 0, __pyx_n_s_KM3Array_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__277)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_serialise, __pyx_t_8) < 0) __PYX_ERR(0, 2442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":2446
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt == 'numpy':
 *             arr = cls(data, h5loc, **kwargs)
 */
  __Pyx_TraceLine(2446,0,__PYX_ERR(0, 2446, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_8KM3Array_11conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_KM3Array_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__278)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__738);

  /* "km3pipe/dataclasses.pyx":2445
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='numpy', **kwargs):
 *         if fmt == 'numpy':
 */
  __Pyx_TraceLine(2445,0,__PYX_ERR(0, 2445, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_conv_from, __pyx_t_5) < 0) __PYX_ERR(0, 2446, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2451
 *             return arr
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self
 */
  __Pyx_TraceLine(2451,0,__PYX_ERR(0, 2451, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_8KM3Array_13conv_to, 0, __pyx_n_s_KM3Array_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__279)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__740);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_conv_to, __pyx_t_5) < 0) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2458
 * 
 *     @classmethod
 *     def from_dict(cls, map, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *         if dtype is None:
 *             dtype = np.dtype([(key, float) for key in sorted(map.keys())])
 */
  __Pyx_TraceLine(2458,0,__PYX_ERR(0, 2458, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_8KM3Array_15from_dict, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_KM3Array_from_dict, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__280)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__742);

  /* "km3pipe/dataclasses.pyx":2457
 *             return KM3DataFrame.conv_from(self, fmt='numpy', **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_dict(cls, map, dtype=None, **kwargs):
 *         if dtype is None:
 */
  __Pyx_TraceLine(2457,0,__PYX_ERR(0, 2457, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_from_dict, __pyx_t_8) < 0) __PYX_ERR(0, 2458, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":2407
 * 
 * 
 * class KM3Array(np.ndarray):             # <<<<<<<<<<<<<<
 *     """Numpy NDarray + metadata.
 * 
 */
  __Pyx_TraceLine(2407,0,__PYX_ERR(0, 2407, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_KM3Array, __pyx_t_2, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KM3Array, __pyx_t_8) < 0) __PYX_ERR(0, 2407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":2465
 * 
 * 
 * class KM3DataFrame(pd.DataFrame):             # <<<<<<<<<<<<<<
 *     """Pandas Dataframe + metadata.
 * 
 */
  __Pyx_TraceLine(2465,0,__PYX_ERR(0, 2465, __pyx_L1_error))
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_KM3DataFrame, __pyx_n_s_KM3DataFrame, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_Pandas_Dataframe_metadata_This_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":2486
 *     # http://pandas.pydata.org/pandas-docs/stable/internals.html#define-original-properties
 *     # this is preserved over df manipulations
 *     _metadata = ['h5loc']             # <<<<<<<<<<<<<<
 * 
 *     # default value
 */
  __Pyx_TraceLine(2486,0,__PYX_ERR(0, 2486, __pyx_L1_error))
  __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_n_s_h5loc);
  __Pyx_GIVEREF(__pyx_n_s_h5loc);
  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_h5loc);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_metadata, __pyx_t_8) < 0) __PYX_ERR(0, 2486, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":2489
 * 
 *     # default value
 *     h5loc = '/'             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_TraceLine(2489,0,__PYX_ERR(0, 2489, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_h5loc, __pyx_kp_s__2) < 0) __PYX_ERR(0, 2489, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2492
 * 
 *     @property
 *     def _constructor(self):             # <<<<<<<<<<<<<<
 *         return KM3DataFrame
 * 
 */
  __Pyx_TraceLine(2492,0,__PYX_ERR(0, 2492, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_1_constructor, 0, __pyx_n_s_KM3DataFrame__constructor, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__281)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "km3pipe/dataclasses.pyx":2491
 *     h5loc = '/'
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def _constructor(self):
 *         return KM3DataFrame
 */
  __Pyx_TraceLine(2491,0,__PYX_ERR(0, 2491, __pyx_L1_error))
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_constructor, __pyx_t_8) < 0) __PYX_ERR(0, 2492, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":2495
 *         return KM3DataFrame
 * 
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         h5loc = kwargs.pop('h5loc', '/')
 *         super(KM3DataFrame, self).__init__(*args, **kwargs)
 */
  __Pyx_TraceLine(2495,0,__PYX_ERR(0, 2495, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_3__init__, 0, __pyx_n_s_KM3DataFrame___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__282)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_init, __pyx_t_8) < 0) __PYX_ERR(0, 2495, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":2501
 * 
 *     @classmethod
 *     def deserialise(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return cls.conv_from(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(2501,0,__PYX_ERR(0, 2501, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_5deserialise, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_KM3DataFrame_deserialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__284)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "km3pipe/dataclasses.pyx":2500
 *         self.h5loc = h5loc
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def deserialise(cls, *args, **kwargs):
 *         return cls.conv_from(*args, **kwargs)
 */
  __Pyx_TraceLine(2500,0,__PYX_ERR(0, 2500, __pyx_L1_error))
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_deserialise, __pyx_t_5) < 0) __PYX_ERR(0, 2501, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2504
 *         return cls.conv_from(*args, **kwargs)
 * 
 *     def serialise(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.conv_to(*args, **kwargs)
 * 
 */
  __Pyx_TraceLine(2504,0,__PYX_ERR(0, 2504, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_7serialise, 0, __pyx_n_s_KM3DataFrame_serialise, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__285)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_serialise, __pyx_t_5) < 0) __PYX_ERR(0, 2504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "km3pipe/dataclasses.pyx":2508
 * 
 *     @classmethod
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs):             # <<<<<<<<<<<<<<
 *         if fmt in {'numpy', 'pandas'}:
 *             return cls(data, h5loc=h5loc, **kwargs)
 */
  __Pyx_TraceLine(2508,0,__PYX_ERR(0, 2508, __pyx_L1_error))
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_9conv_from, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_KM3DataFrame_conv_from, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__286)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__748);

  /* "km3pipe/dataclasses.pyx":2507
 *         return self.conv_to(*args, **kwargs)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def conv_from(cls, data, event_id=None, h5loc='/', fmt='pandas', **kwargs):
 *         if fmt in {'numpy', 'pandas'}:
 */
  __Pyx_TraceLine(2507,0,__PYX_ERR(0, 2507, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_conv_from, __pyx_t_8) < 0) __PYX_ERR(0, 2508, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":2514
 *             return cls(data, index=[0], h5loc=h5loc, **kwargs)
 * 
 *     def conv_to(self, to='numpy', **kwargs):             # <<<<<<<<<<<<<<
 *         if to == 'numpy':
 *             return self.__array__()
 */
  __Pyx_TraceLine(2514,0,__PYX_ERR(0, 2514, __pyx_L1_error))
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12KM3DataFrame_11conv_to, 0, __pyx_n_s_KM3DataFrame_conv_to, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__287)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__750);
  if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_conv_to, __pyx_t_8) < 0) __PYX_ERR(0, 2514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "km3pipe/dataclasses.pyx":2465
 * 
 * 
 * class KM3DataFrame(pd.DataFrame):             # <<<<<<<<<<<<<<
 *     """Pandas Dataframe + metadata.
 * 
 */
  __Pyx_TraceLine(2465,0,__PYX_ERR(0, 2465, __pyx_L1_error))
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_KM3DataFrame, __pyx_t_2, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KM3DataFrame, __pyx_t_8) < 0) __PYX_ERR(0, 2465, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":2522
 * 
 * deserialise_map = {
 *     'McHits': McHitSeries,             # <<<<<<<<<<<<<<
 *     'RawHits': RawHitSeries,
 *     'Hits': HitSeries,
 */
  __Pyx_TraceLine(2522,0,__PYX_ERR(0, 2522, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_McHitSeries); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_McHits, __pyx_t_1) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2523
 * deserialise_map = {
 *     'McHits': McHitSeries,
 *     'RawHits': RawHitSeries,             # <<<<<<<<<<<<<<
 *     'Hits': HitSeries,
 *     'TimesliceHits': TimesliceHitSeries,
 */
  __Pyx_TraceLine(2523,0,__PYX_ERR(0, 2523, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_RawHitSeries); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_RawHits, __pyx_t_1) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2524
 *     'McHits': McHitSeries,
 *     'RawHits': RawHitSeries,
 *     'Hits': HitSeries,             # <<<<<<<<<<<<<<
 *     'TimesliceHits': TimesliceHitSeries,
 *     'McTracks': TrackSeries,
 */
  __Pyx_TraceLine(2524,0,__PYX_ERR(0, 2524, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_HitSeries); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Hits, __pyx_t_1) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2525
 *     'RawHits': RawHitSeries,
 *     'Hits': HitSeries,
 *     'TimesliceHits': TimesliceHitSeries,             # <<<<<<<<<<<<<<
 *     'McTracks': TrackSeries,
 *     'EventInfo': EventInfo,
 */
  __Pyx_TraceLine(2525,0,__PYX_ERR(0, 2525, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TimesliceHitSeries); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_TimesliceHits, __pyx_t_1) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2526
 *     'Hits': HitSeries,
 *     'TimesliceHits': TimesliceHitSeries,
 *     'McTracks': TrackSeries,             # <<<<<<<<<<<<<<
 *     'EventInfo': EventInfo,
 *     'SummarysliceInfo': SummarysliceInfo,
 */
  __Pyx_TraceLine(2526,0,__PYX_ERR(0, 2526, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TrackSeries); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_McTracks, __pyx_t_1) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2527
 *     'TimesliceHits': TimesliceHitSeries,
 *     'McTracks': TrackSeries,
 *     'EventInfo': EventInfo,             # <<<<<<<<<<<<<<
 *     'SummarysliceInfo': SummarysliceInfo,
 *     'SummaryframeInfo': SummaryframeInfo,
 */
  __Pyx_TraceLine(2527,0,__PYX_ERR(0, 2527, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_EventInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_EventInfo, __pyx_t_1) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2528
 *     'McTracks': TrackSeries,
 *     'EventInfo': EventInfo,
 *     'SummarysliceInfo': SummarysliceInfo,             # <<<<<<<<<<<<<<
 *     'SummaryframeInfo': SummaryframeInfo,
 *     'Tracks': TrackSeries,
 */
  __Pyx_TraceLine(2528,0,__PYX_ERR(0, 2528, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_SummarysliceInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_SummarysliceInfo, __pyx_t_1) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2529
 *     'EventInfo': EventInfo,
 *     'SummarysliceInfo': SummarysliceInfo,
 *     'SummaryframeInfo': SummaryframeInfo,             # <<<<<<<<<<<<<<
 *     'Tracks': TrackSeries,
 * }
 */
  __Pyx_TraceLine(2529,0,__PYX_ERR(0, 2529, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_SummaryframeInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_SummaryframeInfo, __pyx_t_1) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "km3pipe/dataclasses.pyx":2530
 *     'SummarysliceInfo': SummarysliceInfo,
 *     'SummaryframeInfo': SummaryframeInfo,
 *     'Tracks': TrackSeries,             # <<<<<<<<<<<<<<
 * }
 * 
 */
  __Pyx_TraceLine(2530,0,__PYX_ERR(0, 2530, __pyx_L1_error))
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TrackSeries); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Tracks, __pyx_t_1) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_deserialise_map, __pyx_t_2) < 0) __PYX_ERR(0, 2521, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":2534
 * 
 * 
 * class BinaryStruct(object):             # <<<<<<<<<<<<<<
 *     """A binary struct superclass which parses itself from a given stream.
 * 
 */
  __Pyx_TraceLine(2534,0,__PYX_ERR(0, 2534, __pyx_L1_error))
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__751); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__751, __pyx_n_s_BinaryStruct, __pyx_n_s_BinaryStruct, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_A_binary_struct_superclass_which); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "km3pipe/dataclasses.pyx":2548
 * 
 *     """
 *     _structure = ''             # <<<<<<<<<<<<<<
 *     _fields = ()
 * 
 */
  __Pyx_TraceLine(2548,0,__PYX_ERR(0, 2548, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_structure, __pyx_kp_s__88) < 0) __PYX_ERR(0, 2548, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2549
 *     """
 *     _structure = ''
 *     _fields = ()             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, stream):
 */
  __Pyx_TraceLine(2549,0,__PYX_ERR(0, 2549, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_fields_2, __pyx_empty_tuple) < 0) __PYX_ERR(0, 2549, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2551
 *     _fields = ()
 * 
 *     def __init__(self, stream):             # <<<<<<<<<<<<<<
 *         data = Struct(self._structure).unpack_from(stream.read(self._size))
 *         for attr, value in zip(self._fields, data):
 */
  __Pyx_TraceLine(2551,0,__PYX_ERR(0, 2551, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12BinaryStruct_1__init__, 0, __pyx_n_s_BinaryStruct___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__288)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 2551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2557
 * 
 *     @property
 *     def _size(self):             # <<<<<<<<<<<<<<
 *         return calcsize(self._structure)
 * 
 */
  __Pyx_TraceLine(2557,0,__PYX_ERR(0, 2557, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_12BinaryStruct_3_size, 0, __pyx_n_s_BinaryStruct__size, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__289)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "km3pipe/dataclasses.pyx":2556
 *             setattr(self, attr, value)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def _size(self):
 *         return calcsize(self._structure)
 */
  __Pyx_TraceLine(2556,0,__PYX_ERR(0, 2556, __pyx_L1_error))
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_size, __pyx_t_6) < 0) __PYX_ERR(0, 2557, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2534
 * 
 * 
 * class BinaryStruct(object):             # <<<<<<<<<<<<<<
 *     """A binary struct superclass which parses itself from a given stream.
 * 
 */
  __Pyx_TraceLine(2534,0,__PYX_ERR(0, 2534, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_BinaryStruct, __pyx_tuple__751, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BinaryStruct, __pyx_t_6) < 0) __PYX_ERR(0, 2534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":2561
 * 
 * 
 * class BinaryComposite(object):             # <<<<<<<<<<<<<<
 *     """A composition of BinaryStructs."""
 *     _structure = ''
 */
  __Pyx_TraceLine(2561,0,__PYX_ERR(0, 2561, __pyx_L1_error))
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__754); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__754, __pyx_n_s_BinaryComposite, __pyx_n_s_BinaryComposite, (PyObject *) NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_kp_s_A_composition_of_BinaryStructs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "km3pipe/dataclasses.pyx":2563
 * class BinaryComposite(object):
 *     """A composition of BinaryStructs."""
 *     _structure = ''             # <<<<<<<<<<<<<<
 * 
 *     def __init__(sefl, stream):
 */
  __Pyx_TraceLine(2563,0,__PYX_ERR(0, 2563, __pyx_L1_error))
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_structure, __pyx_kp_s__88) < 0) __PYX_ERR(0, 2563, __pyx_L1_error)

  /* "km3pipe/dataclasses.pyx":2565
 *     _structure = ''
 * 
 *     def __init__(sefl, stream):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __Pyx_TraceLine(2565,0,__PYX_ERR(0, 2565, __pyx_L1_error))
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7km3pipe_11dataclasses_15BinaryComposite_1__init__, 0, __pyx_n_s_BinaryComposite___init, NULL, __pyx_n_s_km3pipe_dataclasses, __pyx_d, ((PyObject *)__pyx_codeobj__290)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 2565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "km3pipe/dataclasses.pyx":2561
 * 
 * 
 * class BinaryComposite(object):             # <<<<<<<<<<<<<<
 *     """A composition of BinaryStructs."""
 *     _structure = ''
 */
  __Pyx_TraceLine(2561,0,__PYX_ERR(0, 2561, __pyx_L1_error))
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_BinaryComposite, __pyx_tuple__754, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BinaryComposite, __pyx_t_6) < 0) __PYX_ERR(0, 2561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "km3pipe/dataclasses.pyx":1
 * # coding=utf-8             # <<<<<<<<<<<<<<
 * # Filename: dataclasses.py
 * # cython: embedsignature=True
 */
  __Pyx_TraceLine(1,0,__PYX_ERR(0, 1, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "../../.pyenv/versions/3.6.4/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1021
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */
  __Pyx_TraceReturn(Py_None, 0);

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init km3pipe.dataclasses", 0, __pyx_lineno, __pyx_filename);
    }
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init km3pipe.dataclasses");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* Profile */
#if CYTHON_PROFILE
static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
                                   PyFrameObject** frame,
                                   PyThreadState* tstate,
                                   const char *funcname,
                                   const char *srcfile,
                                   int firstlineno) {
    PyObject *type, *value, *traceback;
    int retval;
    if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
        if (*code == NULL) {
            *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
            if (*code == NULL) return 0;
        }
        *frame = PyFrame_New(
            tstate,                          /*PyThreadState *tstate*/
            *code,                           /*PyCodeObject *code*/
            __pyx_d,                  /*PyObject *globals*/
            0                                /*PyObject *locals*/
        );
        if (*frame == NULL) return 0;
        if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
            Py_INCREF(Py_None);
            (*frame)->f_trace = Py_None;
        }
#if PY_VERSION_HEX < 0x030400B1
    } else {
        (*frame)->f_tstate = tstate;
#endif
    }
      __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
    retval = 1;
    tstate->tracing++;
    tstate->use_tracing = 0;
    PyErr_Fetch(&type, &value, &traceback);
    #if CYTHON_TRACE
    if (tstate->c_tracefunc)
        retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
    if (retval && tstate->c_profilefunc)
    #endif
        retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
    tstate->use_tracing = (tstate->c_profilefunc ||
                           (CYTHON_TRACE && tstate->c_tracefunc));
    tstate->tracing--;
    if (retval) {
        PyErr_Restore(type, value, traceback);
        return tstate->use_tracing && retval;
    } else {
        Py_XDECREF(type);
        Py_XDECREF(value);
        Py_XDECREF(traceback);
        return -1;
    }
}
static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyCodeObject *py_code = 0;
    #if PY_MAJOR_VERSION < 3
    py_funcname = PyString_FromString(funcname);
    py_srcfile = PyString_FromString(srcfile);
    #else
    py_funcname = PyUnicode_FromString(funcname);
    py_srcfile = PyUnicode_FromString(srcfile);
    #endif
    if (!py_funcname | !py_srcfile) goto bad;
    py_code = PyCode_New(
        0,
        #if PY_MAJOR_VERSION >= 3
        0,
        #endif
        0,
        0,
        CO_OPTIMIZED | CO_NEWLOCALS,
        __pyx_empty_bytes,     /*PyObject *code,*/
        __pyx_empty_tuple,     /*PyObject *consts,*/
        __pyx_empty_tuple,     /*PyObject *names,*/
        __pyx_empty_tuple,     /*PyObject *varnames,*/
        __pyx_empty_tuple,     /*PyObject *freevars,*/
        __pyx_empty_tuple,     /*PyObject *cellvars,*/
        py_srcfile,       /*PyObject *filename,*/
        py_funcname,      /*PyObject *name,*/
        firstlineno,
        __pyx_empty_bytes      /*PyObject *lnotab*/
    );
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return py_code;
}
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
#include "frameobject.h"
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = f->f_localsplus;
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* PyCFunctionFastCall */
  #if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
    }
}
#endif

/* PyObjectCallOneArg */
  #if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* PyObjectCallMethod0 */
  static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
#if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *function = PyMethod_GET_FUNCTION(method);
            result = __Pyx_PyObject_CallOneArg(function, self);
            Py_DECREF(method);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* RaiseNoneIterError */
  static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
  static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
  static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_COMPILING_IN_PYPY
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = Py_TYPE(iter)->tp_iternext;
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
  static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#elif PY_MAJOR_VERSION >= 3
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* BytesEquals */
  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* FetchCommonType */
  static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunction */
  static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* GetModuleGlobalName */
      static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
    result = PyDict_GetItem(__pyx_d, name);
    if (likely(result)) {
        Py_INCREF(result);
    } else {
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

/* GetAttr */
        static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* HasAttr */
        static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* PyErrFetchRestore */
        #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* RaiseException */
        #if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* MergeKeywords */
        static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) {
    PyObject *iter, *key = NULL, *value = NULL;
    int source_is_dict, result;
    Py_ssize_t orig_length, ppos = 0;
    iter = __Pyx_dict_iterator(source_mapping, 0, __pyx_n_s_items, &orig_length, &source_is_dict);
    if (unlikely(!iter)) {
        PyObject *args;
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        args = PyTuple_Pack(1, source_mapping);
        if (likely(args)) {
            PyObject *fallback = PyObject_Call((PyObject*)&PyDict_Type, args, NULL);
            Py_DECREF(args);
            if (likely(fallback)) {
                iter = __Pyx_dict_iterator(fallback, 1, __pyx_n_s_items, &orig_length, &source_is_dict);
                Py_DECREF(fallback);
            }
        }
        if (unlikely(!iter)) goto bad;
    }
    while (1) {
        result = __Pyx_dict_iter_next(iter, orig_length, &ppos, &key, &value, NULL, source_is_dict);
        if (unlikely(result < 0)) goto bad;
        if (!result) break;
        if (unlikely(PyDict_Contains(kwdict, key))) {
            __Pyx_RaiseDoubleKeywordsError("function", key);
            result = -1;
        } else {
            result = PyDict_SetItem(kwdict, key, value);
        }
        Py_DECREF(key);
        Py_DECREF(value);
        if (unlikely(result < 0)) goto bad;
    }
    Py_XDECREF(iter);
    return 0;
bad:
    Py_XDECREF(iter);
    return -1;
}

/* GetItemInt */
        static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* SaveResetException */
        #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if PY_VERSION_HEX >= 0x030700A2
    *type = tstate->exc_state.exc_type;
    *value = tstate->exc_state.exc_value;
    *tb = tstate->exc_state.exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if PY_VERSION_HEX >= 0x030700A2
    tmp_type = tstate->exc_state.exc_type;
    tmp_value = tstate->exc_state.exc_value;
    tmp_tb = tstate->exc_state.exc_traceback;
    tstate->exc_state.exc_type = type;
    tstate->exc_state.exc_value = value;
    tstate->exc_state.exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* PyErrExceptionMatches */
        #if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* GetException */
        #if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
#endif
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if PY_VERSION_HEX >= 0x030700A2
    tmp_type = tstate->exc_state.exc_type;
    tmp_value = tstate->exc_state.exc_value;
    tmp_tb = tstate->exc_state.exc_traceback;
    tstate->exc_state.exc_type = local_type;
    tstate->exc_state.exc_value = local_value;
    tstate->exc_state.exc_traceback = local_tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* None */
          static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* SetItemInt */
          static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (!j) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return -1;
                    PyErr_Clear();
                }
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
#else
    if (is_list || PySequence_Check(o)) {
#endif
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

/* ExtTypeTest */
            static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

/* UnicodeAsUCS4 */
            static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) {
   Py_ssize_t length;
   #if CYTHON_PEP393_ENABLED
   length = PyUnicode_GET_LENGTH(x);
   if (likely(length == 1)) {
       return PyUnicode_READ_CHAR(x, 0);
   }
   #else
   length = PyUnicode_GET_SIZE(x);
   if (likely(length == 1)) {
       return PyUnicode_AS_UNICODE(x)[0];
   }
   #if Py_UNICODE_SIZE == 2
   else if (PyUnicode_GET_SIZE(x) == 2) {
       Py_UCS4 high_val = PyUnicode_AS_UNICODE(x)[0];
       if (high_val >= 0xD800 && high_val <= 0xDBFF) {
           Py_UCS4 low_val = PyUnicode_AS_UNICODE(x)[1];
           if (low_val >= 0xDC00 && low_val <= 0xDFFF) {
               return 0x10000 + (((high_val & ((1<<10)-1)) << 10) | (low_val & ((1<<10)-1)));
           }
       }
   }
   #endif
   #endif
   PyErr_Format(PyExc_ValueError,
                "only single character unicode strings can be converted to Py_UCS4, "
                "got length %" CYTHON_FORMAT_SSIZE_T "d", length);
   return (Py_UCS4)-1;
}

/* object_ord */
            static long __Pyx__PyObject_Ord(PyObject* c) {
    Py_ssize_t size;
    if (PyBytes_Check(c)) {
        size = PyBytes_GET_SIZE(c);
        if (likely(size == 1)) {
            return (unsigned char) PyBytes_AS_STRING(c)[0];
        }
#if PY_MAJOR_VERSION < 3
    } else if (PyUnicode_Check(c)) {
        return (long)__Pyx_PyUnicode_AsPy_UCS4(c);
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    } else if (PyByteArray_Check(c)) {
        size = PyByteArray_GET_SIZE(c);
        if (likely(size == 1)) {
            return (unsigned char) PyByteArray_AS_STRING(c)[0];
        }
#endif
    } else {
        PyErr_Format(PyExc_TypeError,
            "ord() expected string of length 1, but %.200s found", c->ob_type->tp_name);
        return (long)(Py_UCS4)-1;
    }
    PyErr_Format(PyExc_TypeError,
        "ord() expected a character, but string of length %zd found", size);
    return (long)(Py_UCS4)-1;
}

/* PyIntBinop */
            #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* StringJoin */
            #if !CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
}
#endif

/* PyIntBinop */
            #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) {
            Py_RETURN_TRUE;
        } else {
            Py_RETURN_FALSE;
        }
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a;
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15
                default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ);
                #else
                default: Py_RETURN_FALSE;
                #endif
            }
        }
            if (a == b) {
                Py_RETURN_TRUE;
            } else {
                Py_RETURN_FALSE;
            }
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            if ((double)a == (double)b) {
                Py_RETURN_TRUE;
            } else {
                Py_RETURN_FALSE;
            }
    }
    return PyObject_RichCompare(op1, op2, Py_EQ);
}
#endif

/* GetAttr3 */
            static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

/* WriteUnraisableException */
            static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
#ifdef _MSC_VER
    else state = (PyGILState_STATE)-1;
#endif
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

/* SetupReduce */
            static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
#else
    if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
#endif
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
            ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
            ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto GOOD;
BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* Import */
            static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
            static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* CalculateMetaclass */
            static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
            static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass_2);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* ClassMethod */
            static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000
    if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) {
        return PyClassMethod_New(method);
    }
#else
#if CYTHON_COMPILING_IN_PYSTON || CYTHON_COMPILING_IN_PYPY
    if (PyMethodDescr_Check(method)) {
#else
    static PyTypeObject *methoddescr_type = NULL;
    if (methoddescr_type == NULL) {
       PyObject *meth = PyObject_GetAttrString((PyObject*)&PyList_Type, "append");
       if (!meth) return NULL;
       methoddescr_type = Py_TYPE(meth);
       Py_DECREF(meth);
    }
    if (__Pyx_TypeCheck(method, methoddescr_type)) {
#endif
        PyMethodDescrObject *descr = (PyMethodDescrObject *)method;
        #if PY_VERSION_HEX < 0x03020000
        PyTypeObject *d_type = descr->d_type;
        #else
        PyTypeObject *d_type = descr->d_common.d_type;
        #endif
        return PyDescr_NewClassMethod(d_type, descr->d_method);
    }
#endif
    else if (PyMethod_Check(method)) {
        return PyClassMethod_New(PyMethod_GET_FUNCTION(method));
    }
    else if (PyCFunction_Check(method)) {
        return PyClassMethod_New(method);
    }
#ifdef __Pyx_CyFunction_USED
    else if (__Pyx_TypeCheck(method, __pyx_CyFunctionType)) {
        return PyClassMethod_New(method);
    }
#endif
    PyErr_SetString(PyExc_TypeError,
                   "Class-level classmethod() can only be called on "
                   "a method_descriptor or instance method.");
    return NULL;
}

/* CLineInTraceback */
              #ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
      use_cline = PyDict_GetItem(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (PyObject_Not(use_cline) != 0) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
              static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
              #include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntFromPyVerify */
              #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntToPy */
              static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
              static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
              static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value) {
    const unsigned short neg_one = (unsigned short) -1, const_zero = (unsigned short) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned short) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned short) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned short) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned short) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned short),
                                     little, !is_unsigned);
    }
}

/* Declarations */
              #if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return ::std::complex< float >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return x + y*(__pyx_t_float_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      __pyx_t_float_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

/* Arithmetic */
              #if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabsf(b.real) >= fabsf(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                float r = b.imag / b.real;
                float s = 1.0 / (b.real + b.imag * r);
                return __pyx_t_float_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            float r = b.real / b.imag;
            float s = 1.0 / (b.imag + b.real * r);
            return __pyx_t_float_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            float denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_float_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrtf(z.real*z.real + z.imag*z.imag);
          #else
            return hypotf(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
            __pyx_t_float_complex z;
            float r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    float denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(a, a);
                    case 3:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, a);
                    case 4:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if (b.imag == 0) {
                    z.real = powf(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2f(0, -1);
                }
            } else {
                r = __Pyx_c_abs_float(a);
                theta = atan2f(a.imag, a.real);
            }
            lnr = logf(r);
            z_r = expf(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cosf(z_theta);
            z.imag = z_r * sinf(z_theta);
            return z;
        }
    #endif
#endif

/* Declarations */
              #if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return ::std::complex< double >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return x + y*(__pyx_t_double_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      __pyx_t_double_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

/* Arithmetic */
              #if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabs(b.real) >= fabs(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                double r = b.imag / b.real;
                double s = 1.0 / (b.real + b.imag * r);
                return __pyx_t_double_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            double r = b.real / b.imag;
            double s = 1.0 / (b.imag + b.real * r);
            return __pyx_t_double_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            double denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_double_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrt(z.real*z.real + z.imag*z.imag);
          #else
            return hypot(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
            __pyx_t_double_complex z;
            double r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    double denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(a, a);
                    case 3:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, a);
                    case 4:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if (b.imag == 0) {
                    z.real = pow(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2(0, -1);
                }
            } else {
                r = __Pyx_c_abs_double(a);
                theta = atan2(a.imag, a.real);
            }
            lnr = log(r);
            z_r = exp(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cos(z_theta);
            z.imag = z_r * sin(z_theta);
            return z;
        }
    #endif
#endif

/* CIntToPy */
              static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
    const enum NPY_TYPES neg_one = (enum NPY_TYPES) -1, const_zero = (enum NPY_TYPES) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum NPY_TYPES) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
              static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntFromPy */
              static CYTHON_INLINE unsigned short __Pyx_PyInt_As_unsigned_short(PyObject *x) {
    const unsigned short neg_one = (unsigned short) -1, const_zero = (unsigned short) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(unsigned short) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(unsigned short, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (unsigned short) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (unsigned short) 0;
                case  1: __PYX_VERIFY_RETURN_INT(unsigned short, digit, digits[0])
                case 2:
                    if (8 * sizeof(unsigned short) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) >= 2 * PyLong_SHIFT) {
                            return (unsigned short) (((((unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned short) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) >= 3 * PyLong_SHIFT) {
                            return (unsigned short) (((((((unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned short) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) >= 4 * PyLong_SHIFT) {
                            return (unsigned short) (((((((((unsigned short)digits[3]) << PyLong_SHIFT) | (unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (unsigned short) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(unsigned short) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned short, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned short, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (unsigned short) 0;
                case -1: __PYX_VERIFY_RETURN_INT(unsigned short, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(unsigned short,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(unsigned short) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned short) (((unsigned short)-1)*(((((unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(unsigned short) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned short) ((((((unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(unsigned short) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned short) (((unsigned short)-1)*(((((((unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned short) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned short) ((((((((unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(unsigned short) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned short) (((unsigned short)-1)*(((((((((unsigned short)digits[3]) << PyLong_SHIFT) | (unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned short) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned short) ((((((((((unsigned short)digits[3]) << PyLong_SHIFT) | (unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(unsigned short) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned short, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned short) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned short, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            unsigned short val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (unsigned short) -1;
        }
    } else {
        unsigned short val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (unsigned short) -1;
        val = __Pyx_PyInt_As_unsigned_short(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned short");
    return (unsigned short) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned short");
    return (unsigned short) -1;
}

/* CIntFromPy */
              static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *x) {
    const npy_int64 neg_one = (npy_int64) -1, const_zero = (npy_int64) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(npy_int64) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(npy_int64, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (npy_int64) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (npy_int64) 0;
                case  1: __PYX_VERIFY_RETURN_INT(npy_int64, digit, digits[0])
                case 2:
                    if (8 * sizeof(npy_int64) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) >= 2 * PyLong_SHIFT) {
                            return (npy_int64) (((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(npy_int64) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) >= 3 * PyLong_SHIFT) {
                            return (npy_int64) (((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(npy_int64) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) >= 4 * PyLong_SHIFT) {
                            return (npy_int64) (((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (npy_int64) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(npy_int64) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(npy_int64, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(npy_int64) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(npy_int64, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (npy_int64) 0;
                case -1: __PYX_VERIFY_RETURN_INT(npy_int64, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(npy_int64,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(npy_int64) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
                            return (npy_int64) (((npy_int64)-1)*(((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(npy_int64) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
                            return (npy_int64) ((((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
                            return (npy_int64) (((npy_int64)-1)*(((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(npy_int64) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
                            return (npy_int64) ((((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) - 1 > 4 * PyLong_SHIFT) {
                            return (npy_int64) (((npy_int64)-1)*(((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(npy_int64) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(npy_int64) - 1 > 4 * PyLong_SHIFT) {
                            return (npy_int64) ((((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(npy_int64) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(npy_int64, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(npy_int64) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(npy_int64, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            npy_int64 val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (npy_int64) -1;
        }
    } else {
        npy_int64 val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (npy_int64) -1;
        val = __Pyx_PyInt_As_npy_int64(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to npy_int64");
    return (npy_int64) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to npy_int64");
    return (npy_int64) -1;
}

/* CIntFromPy */
              static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* FastTypeChecks */
              #if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* SwapException */
              #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if PY_VERSION_HEX >= 0x030700A2
    tmp_type = tstate->exc_state.exc_type;
    tmp_value = tstate->exc_state.exc_value;
    tmp_tb = tstate->exc_state.exc_traceback;
    tstate->exc_state.exc_type = *type;
    tstate->exc_state.exc_value = *value;
    tstate->exc_state.exc_traceback = *tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* PyObjectCallMethod1 */
              static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = NULL;
#if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *args;
            PyObject *function = PyMethod_GET_FUNCTION(method);
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(function)) {
                PyObject *args[2] = {self, arg};
                result = __Pyx_PyFunction_FastCall(function, args, 2);
                goto done;
            }
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(function)) {
                PyObject *args[2] = {self, arg};
                result = __Pyx_PyCFunction_FastCall(function, args, 2);
                goto done;
            }
            #endif
            args = PyTuple_New(2);
            if (unlikely(!args)) goto done;
            Py_INCREF(self);
            PyTuple_SET_ITEM(args, 0, self);
            Py_INCREF(arg);
            PyTuple_SET_ITEM(args, 1, arg);
            Py_INCREF(function);
            result = __Pyx_PyObject_Call(function, args, NULL);
            Py_DECREF(args);
            Py_DECREF(function);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallOneArg(method, arg);
    goto done;
done:
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto done;
    result = __Pyx__PyObject_CallMethod1(method, arg);
done:
    Py_XDECREF(method);
    return result;
}

/* CoroutineBase */
              #include <structmember.h>
#include <frameobject.h>
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (!ev) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#if PY_VERSION_HEX >= 0x030300A0
        else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
        }
#endif
        else if (unlikely(PyTuple_Check(ev))) {
            if (PyTuple_GET_SIZE(ev) >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#else
                value = PySequence_ITEM(ev, 0);
#endif
            } else {
                Py_INCREF(Py_None);
                value = Py_None;
            }
            Py_DECREF(ev);
        }
        else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            value = ev;
        }
        if (likely(value)) {
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
    } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) {
    PyObject *exc_type = self->exc_type;
    PyObject *exc_value = self->exc_value;
    PyObject *exc_traceback = self->exc_traceback;
    self->exc_type = NULL;
    self->exc_value = NULL;
    self->exc_traceback = NULL;
    Py_XDECREF(exc_type);
    Py_XDECREF(exc_value);
    Py_XDECREF(exc_traceback);
}
#define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
    const char *msg;
    if (0) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_CheckExact((PyObject*)gen)) {
        msg = "coroutine already executing";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
        msg = "async generator already executing";
    #endif
    } else {
        msg = "generator already executing";
    }
    PyErr_SetString(PyExc_ValueError, msg);
}
#define __Pyx_Coroutine_NotStartedError(gen)  (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
    const char *msg;
    if (0) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_CheckExact(gen)) {
        msg = "can't send non-None value to a just-started coroutine";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact(gen)) {
        msg = "can't send non-None value to a just-started async generator";
    #endif
    } else {
        msg = "can't send non-None value to a just-started generator";
    }
    PyErr_SetString(PyExc_TypeError, msg);
}
#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing)  (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
    #ifdef __Pyx_Coroutine_USED
    if (!closing && __Pyx_Coroutine_CheckExact(gen)) {
        PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
    } else
    #endif
    if (value) {
        #ifdef __Pyx_AsyncGen_USED
        if (__Pyx_AsyncGen_CheckExact(gen))
            PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
        else
        #endif
        PyErr_SetNone(PyExc_StopIteration);
    }
}
static
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
    __Pyx_PyThreadState_declare
    PyThreadState *tstate;
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            return __Pyx_Coroutine_NotStartedError((PyObject*)self);
        }
    }
    if (unlikely(self->resume_label == -1)) {
        return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
    }
#if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    tstate = __pyx_tstate;
#else
    tstate = __Pyx_PyThreadState_Current;
#endif
    if (self->exc_type) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
        if (self->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = tstate->frame;
        }
#endif
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(self);
        __Pyx_ExceptionSave(&self->exc_type, &self->exc_value, &self->exc_traceback);
    }
    self->is_running = 1;
    retval = self->body((PyObject *) self, tstate, value);
    self->is_running = 0;
    return retval;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self) {
    if (likely(self->exc_traceback)) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
        PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
        PyFrameObject *f = tb->tb_frame;
        Py_CLEAR(f->f_back);
#endif
    }
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
    if (unlikely(!retval)) {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        if (!__Pyx_PyErr_Occurred()) {
            PyObject *exc = PyExc_StopIteration;
            #ifdef __Pyx_AsyncGen_USED
            if (__Pyx_AsyncGen_CheckExact(gen))
                exc = __Pyx_PyExc_StopAsyncIteration;
            #endif
            __Pyx_PyErr_SetNone(exc);
        }
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
    ret = __Pyx_Coroutine_SendEx(gen, val, 0);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_AsyncGen_USED
        if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
            ret = __Pyx_async_gen_asend_send(yf, value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyCoro_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = Py_TYPE(yf)->tp_iternext(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value, 0);
    }
    return __Pyx_Coroutine_MethodReturn(self, retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    if (__Pyx_CoroutineAwait_CheckExact(yf)) {
        retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
        retval = __Pyx_async_gen_asend_close(yf, NULL);
    } else
    if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
        retval = __Pyx_async_gen_athrow_close(yf, NULL);
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, NULL);
        } else
        #endif
            ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
    if (unlikely(retval)) {
        const char *msg;
        Py_DECREF(retval);
        if ((0)) {
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_Coroutine_CheckExact(self)) {
            msg = "coroutine ignored GeneratorExit";
        #endif
        #ifdef __Pyx_AsyncGen_USED
        } else if (__Pyx_AsyncGen_CheckExact(self)) {
#if PY_VERSION_HEX < 0x03060000
            msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
#else
            msg = "async generator ignored GeneratorExit";
#endif
        #endif
        } else {
            msg = "generator ignored GeneratorExit";
        }
        PyErr_SetString(PyExc_RuntimeError, msg);
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
                                        PyObject *args, int close_on_genexit) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
            goto throw_here;
        }
        gen->is_running = 1;
        if (0
        #ifdef __Pyx_Generator_USED
            || __Pyx_Generator_CheckExact(yf)
        #endif
        #ifdef __Pyx_Coroutine_USED
            || __Pyx_Coroutine_CheckExact(yf)
        #endif
            ) {
            ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
            ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
        #endif
        } else {
            PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            if (likely(args)) {
                ret = PyObject_CallObject(meth, args);
            } else {
                ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
            }
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(self, ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    PyObject *typ;
    PyObject *val = NULL;
    PyObject *tb = NULL;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
}
static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    Py_VISIT(gen->exc_type);
    Py_VISIT(gen->exc_value);
    Py_VISIT(gen->exc_traceback);
    return 0;
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    Py_CLEAR(gen->exc_type);
    Py_CLEAR(gen->exc_value);
    Py_CLEAR(gen->exc_traceback);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
    }
#endif
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    Py_CLEAR(gen->gi_modulename);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label >= 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        /* We have to handle this case for asynchronous generators
           right here, because this code has to be between UNTRACK
           and GC_Del. */
        Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
    }
#endif
    __Pyx_Coroutine_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label < 0) {
        return;
    }
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
        PyObject *finalizer = agen->ag_finalizer;
        if (finalizer && !agen->ag_closed) {
            PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
            if (unlikely(!res)) {
                PyErr_WriteUnraisable(self);
            } else {
                Py_DECREF(res);
            }
            __Pyx_ErrRestore(error_type, error_value, error_traceback);
            return;
        }
    }
#endif
    if (unlikely(gen->resume_label == 0 && !error_value)) {
#ifdef __Pyx_Coroutine_USED
#ifdef __Pyx_Generator_USED
    if (!__Pyx_Generator_CheckExact(self))
#endif
        {
        PyObject_GC_UnTrack(self);
#if PY_MAJOR_VERSION >= 3  || defined(PyErr_WarnFormat)
        if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
            PyErr_WriteUnraisable(self);
#else
        {PyObject *msg;
        char *cmsg;
        #if CYTHON_COMPILING_IN_PYPY
        msg = NULL;
        cmsg = (char*) "coroutine was never awaited";
        #else
        char *cname;
        PyObject *qualname;
        qualname = gen->gi_qualname;
        cname = PyString_AS_STRING(qualname);
        msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
        if (unlikely(!msg)) {
            PyErr_Clear();
            cmsg = (char*) "coroutine was never awaited";
        } else {
            cmsg = PyString_AS_STRING(msg);
        }
        #endif
        if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
            PyErr_WriteUnraisable(self);
        Py_XDECREF(msg);}
#endif
        PyObject_GC_Track(self);
        }
#endif
    } else {
        PyObject *res = __Pyx_Coroutine_Close(self);
        if (unlikely(!res)) {
            if (PyErr_Occurred())
                PyErr_WriteUnraisable(self);
        } else {
            Py_DECREF(res);
        }
    }
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = self->ob_refcnt;
        _Py_NewReference(self);
        self->ob_refcnt = refcnt;
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(self->ob_type) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
{
    PyObject *name = self->gi_name;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
{
    PyObject *name = self->gi_qualname;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
            PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (unlikely(!gen))
        return NULL;
    return __Pyx__Coroutine_NewInit(gen, body, closure, name, qualname, module_name);
}
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->exc_type = NULL;
    gen->exc_value = NULL;
    gen->exc_traceback = NULL;
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    Py_XINCREF(module_name);
    gen->gi_modulename = module_name;
    PyObject_GC_Track(gen);
    return gen;
}

/* PatchModuleWithCoroutine */
                  static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchGeneratorABC */
                  #ifndef CYTHON_REGISTER_ABCS
#define CYTHON_REGISTER_ABCS 1
#endif
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (CYTHON_REGISTER_ABCS && !abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
        if (!module) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_MAJOR_VERSION >= 3) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* Generator */
                  static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if CYTHON_USE_TP_FINALIZE
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if CYTHON_USE_TP_FINALIZE
    __Pyx_Coroutine_del,
#elif PY_VERSION_HEX >= 0x030400a1
    0,
#endif
};
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* CheckBinaryVersion */
                  static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* ModuleImport */
                  #ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
    PyObject *py_name = 0;
    PyObject *py_module = 0;
    py_name = __Pyx_PyIdentifier_FromString(name);
    if (!py_name)
        goto bad;
    py_module = PyImport_Import(py_name);
    Py_DECREF(py_name);
    return py_module;
bad:
    Py_XDECREF(py_name);
    return 0;
}
#endif

/* TypeImport */
                  #ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    size_t size, int strict)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    PyObject *py_name = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    py_name = __Pyx_PyIdentifier_FromString(class_name);
    if (!py_name)
        goto bad;
    result = PyObject_GetAttr(py_module, py_name);
    Py_DECREF(py_name);
    py_name = 0;
    Py_DECREF(py_module);
    py_module = 0;
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (!strict && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd",
            module_name, class_name, basicsize, size);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    else if ((size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd",
            module_name, class_name, basicsize, size);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(py_module);
    Py_XDECREF(result);
    return NULL;
}
#endif

/* InitStrings */
                  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            PyErr_Clear();
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(x);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
