From a947bac7510abda4ff6ddfeb7e208f3848d1939b Mon Sep 17 00:00:00 2001 From: Carlos Vazquez Sierra Date: Sat, 2 Nov 2019 06:27:27 +0100 Subject: [PATCH] Porting updates from SDaVincimake purge && make install --- Phys/StrippingCache/CMakeLists.txt | 1 + .../options/LoKiAddParticleHeader.py | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 Phys/StrippingCache/options/LoKiAddParticleHeader.py diff --git a/Phys/StrippingCache/CMakeLists.txt b/Phys/StrippingCache/CMakeLists.txt index c516db292..f345ac50a 100644 --- a/Phys/StrippingCache/CMakeLists.txt +++ b/Phys/StrippingCache/CMakeLists.txt @@ -75,6 +75,7 @@ if ( NOT "$ENV{CMTCONFIG}" STREQUAL "x86_64-slc6-gcc48-do0" ) ${optsfile} options/SilenceErrors.py options/DisableLoKiCacheFunctors.py + options/LoKiAddParticleHeader.py LINK_LIBRARIES LoKiArrayFunctorsLib LoKiHltLib DEPENDS ${conf_deps} SPLIT 50) diff --git a/Phys/StrippingCache/options/LoKiAddParticleHeader.py b/Phys/StrippingCache/options/LoKiAddParticleHeader.py new file mode 100644 index 000000000..f89afa64c --- /dev/null +++ b/Phys/StrippingCache/options/LoKiAddParticleHeader.py @@ -0,0 +1,30 @@ +############################################################################### +# (c) Copyright 2000-2019 CERN for the benefit of the LHCb Collaboration # +# # +# This software is distributed under the terms of the GNU General Public # +# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +############################################################################### + +#!/usr/bin/env gaudirun.py +### Need to add a header for some of the functors to prevent a crash. +def post_action_for_fix( ): + """ + Post-config action to add a header for Event/Particle. + """ + import Configurables + for obj, name in [('Tool', 'HybridFactory'), ('CoreFactory', 'CoreFactory'), ('HltFactory', 'HltFactory')]: + obj = 'LoKi__Hybrid__%s' % obj + try: + factory = getattr(Configurables, obj) + name = 'ToolSvc.%s' %name + factory(name).CppLines += ['#include "Event/Particle.h"', + '#include "LoKi/ParticleCuts.h"'] + except AttributeError: pass + +from Gaudi.Configuration import appendPostConfigAction +appendPostConfigAction( post_action_for_fix ) + -- GitLab