From 0328f3020b43a9241ff51818abc7b04dea96fa04 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 7 Jul 2017 14:42:36 +0200 Subject: [PATCH] StoreGateBindings: Remove use of RootObject. RootObject is a compatibility shim introduced to help in the root6 migration of code using reflex. It has an MT-related constness issue; however, it is quite simple and is only used in a handful of places. So just get rid of RootObject entirely. --- Control/StoreGateBindings/src/StoreGatePyExt.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Control/StoreGateBindings/src/StoreGatePyExt.cxx b/Control/StoreGateBindings/src/StoreGatePyExt.cxx index 3a99a9e6ee8..ac118718b04 100755 --- a/Control/StoreGateBindings/src/StoreGatePyExt.cxx +++ b/Control/StoreGateBindings/src/StoreGatePyExt.cxx @@ -286,12 +286,11 @@ AthenaInternal::retrieveObjectFromStore( StoreGateSvc* store, const RootType& fromType = RootType::ByName(realName); if ( (bool)fromType ) { - RootObject realobj( fromType, dbb->object() ); - const RootType& toType = RootType::ByName( PyString_AS_STRING( pyname ) ); - const RootObject& finalobj = realobj.CastObject( toType ); + res = dbb->object(); + if (fromType.Class() && toType.Class()) + res = fromType.Class()->DynamicCast (toType.Class(), res); - res = (void*)finalobj.Address(); if ( res ) { objProxy = proxyDict->newPyDataObject(realName.c_str(), res); } -- GitLab