Skip to content
Snippets Groups Projects
Commit 59740448 authored by Walter Lampl's avatar Walter Lampl
Browse files

AthenaPython: Syntax adjustments for root v6.22 (PyException)

parent f673d969
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ atlas_subdir( AthenaPython )
# External dependencies:
find_package( Python COMPONENTS Development )
find_package( ROOT COMPONENTS Core PyROOT )
find_package( ROOT COMPONENTS Core PyROOT ROOTTPython cppyy3_7)
# Component(s) in the package:
atlas_add_library( AthenaPython
......
......@@ -25,7 +25,7 @@
// PyROOT includes
#include "TPython.h"
#include "TPyException.h"
#include "CPyCppyy/PyException.h"
// Reflex includes
#include "DataModelRoot/RootType.h"
......@@ -160,7 +160,7 @@ void PyAthena::throw_py_exception (bool display)
Py_XDECREF (f);
}
}
throw PyROOT::TPyException();
throw CPyCppyy::PyException();
}
StatusCode
......@@ -383,7 +383,7 @@ void PyAthena::pyAudit ATLAS_NOT_THREAD_SAFE
PyObject* pySc = TPython::CPPInstance_FromVoidPtr((void*)&sc,
"StatusCode");
if ( !pySc ) {
throw PyROOT::TPyException();
throw CPyCppyy::PyException();
}
PyObject* call = PyObject_CallMethod(self,
......
......@@ -29,7 +29,7 @@ SG_BASES1(PyObject, SG::NoBase);
#include "AthenaPython/IPyComponent.h"
// PyROOT includes
#include "TPyException.h"
#include "CPyCppyy/PyException.h"
#include "TPython.h"
using namespace PyAthena;
......@@ -93,7 +93,7 @@ PyComponentMgr::initialize()
if ( !module || !PyModule_Check( module ) ) {
ATH_MSG_ERROR("Could not import [" << pyModuleName << "] !!");
Py_XDECREF (module);
throw PyROOT::TPyException();
throw CPyCppyy::PyException();
}
const std::string pyClassName = "PyComponents";
......@@ -200,7 +200,7 @@ PyComponentMgr::pyObject( IPyComponent* cppComp )
ATH_MSG_ERROR("No such python component [" << name
<< "] or invalid item !!");
Py_XDECREF( o );
throw PyROOT::TPyException();
throw CPyCppyy::PyException();
}
m_components[name] = o;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment