|
||||
File indexing completed on 2025-01-18 09:57:45
0001 /***********************************************************************************\ 0002 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * 0003 * * 0004 * This software is distributed under the terms of the Apache version 2 licence, * 0005 * copied verbatim in the file "LICENSE". * 0006 * * 0007 * In applying this licence, CERN does not waive the privileges and immunities * 0008 * granted to it by virtue of its status as an Intergovernmental Organization * 0009 * or submit itself to any jurisdiction. * 0010 \***********************************************************************************/ 0011 // This file's extension implies that it's C, but it's really -*- C++ -*-. 0012 0013 /** 0014 * @file GaudiMP/PyROOTPickle.h 0015 * @author Wim Lavrijsen 0016 * @date Apr 2008 0017 * @brief Port pickling functionality while awaiting newer release. 0018 * 0019 * PyROOT does not implement direct pickling of ObjectProxy's until release 0020 * 5.20 of ROOT; this code brings it forward for use in ATLAS. 0021 * 0022 * The code here will make the following changes to PyROOT's behavior: 0023 * 0024 * - Add a method "_ObjectProxy__expand__" to libPyROOT that is stored by 0025 * name by the pickler used by the unpickler. The expand function takes 0026 * a class name and a python string, which are turned into an object 0027 * using TBufferFile. 0028 * 0029 * - Add a "__reduce__" method to ObjectProxy, which turns ObjectProxy's 0030 * into python strings through serialization done by TBufferFile. The 0031 * python string is subsequently pickled. 0032 */ 0033 0034 #ifndef GAUDIMP_PYROOTPICKLE_H 0035 #define GAUDIMP_PYROOTPICKLE_H 0036 0037 #include "Python.h" 0038 0039 #include "GaudiKernel/Kernel.h" 0040 0041 namespace GaudiMP { 0042 0043 class GAUDI_API PyROOTPickle { 0044 public: 0045 /** 0046 * @brief Install the pickling of ObjectProxy's functionality. 0047 * @param libpyroot_pymodule The libPyROOT python module 0048 * @param objectproxy_pytype The ObjectProxy python type 0049 */ 0050 static void Initialize( PyObject* libpyroot_pymodule, PyObject* objectproxy_pytype ); 0051 }; 0052 0053 } // namespace GaudiMP 0054 0055 #endif // not GAUDIMP_PYROOTPICKLE_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |