diff --git a/Control/AthenaPython/AthenaPython/AthenaPythonDict.h b/Control/AthenaPython/AthenaPython/AthenaPythonDict.h index afa688a0b5f474d60e143eee3a7fee59cec80060..91d4e378646f314f96b8152b1c1b6cfc2143108c 100644 --- a/Control/AthenaPython/AthenaPython/AthenaPythonDict.h +++ b/Control/AthenaPython/AthenaPython/AthenaPythonDict.h @@ -1,7 +1,7 @@ // -*- C++ -*- /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef ATHENAPYTHON_ATHENAPYTHONDICT_H @@ -13,7 +13,6 @@ #include "AthenaKernel/IClassIDSvc.h" #include "AthenaKernel/IThinningHdlr.h" #include "AthenaKernel/ISlimmingHdlr.h" -#include "AthenaKernel/IThinningSvc.h" #include "AthenaKernel/IValgrindSvc.h" #include "AthenaKernel/IAthenaSealSvc.h" #include "AthenaKernel/IDictLoaderSvc.h" diff --git a/Control/AthenaPython/AthenaPython/selection.xml b/Control/AthenaPython/AthenaPython/selection.xml index af1f74a5048ba398e2ed4d68e208827580507290..20d87758c6b2f948611981284ccaf208f07dbadb 100644 --- a/Control/AthenaPython/AthenaPython/selection.xml +++ b/Control/AthenaPython/AthenaPython/selection.xml @@ -2,7 +2,6 @@ <!-- Framework bindings --> <class name="IClassIDSvc" /> - <class name="IThinningSvc" /> <class name="Athena::IThinningHdlr" /> <class name="Athena::ISlimmingHdlr" /> <class name="IValgrindSvc" /> diff --git a/Control/AthenaPython/python/Bindings.py b/Control/AthenaPython/python/Bindings.py index 0fc1567aafc55a1bfb55c8fa1e71a0ec69a2529b..6456984b4a51be9556a81d3467e4cbf0c4fb7aae 100644 --- a/Control/AthenaPython/python/Bindings.py +++ b/Control/AthenaPython/python/Bindings.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # @file: AthenaPython/python/Bindings.py # @author: Sebastien Binet <binet@cern.ch> @@ -139,17 +139,6 @@ def py_svc(svcName, createIf=True, iface=None): instantiated. @param iface: type one wants to cast the service to (can be a string or the cppyy type) - - Ex: - ## retrieve default interface (ie: GaudiKernel/IService) - svc = py_svc('ThinningSvc/AodThinningSvc') - assert(type(svc) == cppyy.gbl.IService) - - ## retrieve special interface IThinningSvc - ## Warning: a dict has to have been generated beforehand !! - svc = py_svc('ThinningSvc/AodThinningSvc', createIf=True, - iface=cppyy.gbl.IThinningSvc) - assert(type(svc) == cppyy.gbl.IThinningSvc) """ fullName = svcName s = svcName.split('/') @@ -304,53 +293,6 @@ def _py_init_StoreGate(): from StoreGateBindings.Bindings import StoreGate return StoreGate -### pythonizations for IThinningSvc -@memoize -def _py_init_ThinningSvc(): - import cppyy - # IThinningSvc bindings from dictionary - _load_dict( "libAthenaPythonDict" ) - - # we also need StoreGate bindings to be initialized - sgbindings = _py_init_StoreGateSvc() # noqa: F841 - - # make sure the global C++ namespace has been created - gbl = cppyy.makeNamespace('') - - # make sure AthenaInternal namespace has been created - gbl.AthenaInternal = cppyy.makeNamespace('AthenaInternal') - - #global py_thinning - py_thinning = cppyy.gbl.AthenaInternal.thinContainer - - #global py_thinning_idx - py_thinning_idx = cppyy.gbl.AthenaInternal.thinIdxContainer - - # retrieve the IThinningSvc class - #global IThinningSvc - IThinningSvc = cppyy.gbl.IThinningSvc - try: IThinningSvc.RemovedIdx = cppyy.gbl.AthenaInternal.thinRemovedIdx() - except TypeError: pass - - # add specialized filter method - from operator import isCallable - from string import lower - def filter( self, container, selection, op = 'and' ): - if isCallable(selection): - selection = map( selection, container ) - if lower(op) == 'and' : op = 0 # IThinningSvc.Operator.And - elif lower(op) == 'or' : op = 1 # IThinningSvc.Operator.Or - else : op = 0 # IThinningSvc default - return py_thinning( self, container, selection, op ) - IThinningSvc.filter = filter - - # add specialized index method - def index( self, container, idx ): - return py_thinning_idx( self, container, idx ) - IThinningSvc.index = index - - return IThinningSvc - ### pythonizations for IIncidentSvc @memoize def _py_init_IIncidentSvc(): @@ -941,9 +883,6 @@ def _setup(): _register('StoreGateSvc', _py_init_StoreGateSvc) _register('StoreGate', _py_init_StoreGate ) - _register( 'ThinningSvc', _py_init_ThinningSvc) - _register('IThinningSvc', _py_init_ThinningSvc) - _register( 'IncidentSvc', _py_init_IIncidentSvc) _register('IIncidentSvc', _py_init_IIncidentSvc)