From f9bddc0886731bdffb9244f6ab85260669513fd9 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Fri, 18 Sep 2020 19:56:15 +0200 Subject: [PATCH] PyDumper: Fix nullptr handling. Don't fail if JetAssociationBase or Muon are not available. cf ATLASSIM-4772 --- Event/PyDumper/python/Dumpers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Event/PyDumper/python/Dumpers.py b/Event/PyDumper/python/Dumpers.py index 21f328527e0..df924f27a2f 100644 --- a/Event/PyDumper/python/Dumpers.py +++ b/Event/PyDumper/python/Dumpers.py @@ -44,8 +44,10 @@ getattr (ROOT.xAOD, 'TrackParticleContainer_v1', None) getattr (ROOT.xAOD, 'Jet_v1', None) #Typed nullptr: -jetAssocNull=cppyy.bind_object(cppyy.nullptr,cppyy.gbl.JetAssociationBase) -muonNull=cppyy.bind_object(cppyy.nullptr,cppyy.gbl.Analysis.Muon) +JetAssociationBase = getattr (cppyy.gbl, 'JetAssociationBase', None) +Muon = getattr (cppyy.gbl, 'Muon', None) +jetAssocNull = cppyy.bind_object(cppyy.nullptr, JetAssociationBase) if JetAssociationBase else None +muonNull = cppyy.bind_object(cppyy.nullptr, Muon) if Muon else None # Work around a cling bug. -- GitLab