From 409b9f9fdcaafdf37a35e814d0bc3b84dcbba290 Mon Sep 17 00:00:00 2001 From: wbuttinger <mypost@gmail.com> Date: Tue, 25 Apr 2017 13:28:20 +0100 Subject: [PATCH] remade the update of these packages Former-commit-id: ae32512b60c46bb9b850765024e8754d6b7741bc --- .../test/ut_elementLink_test.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 PhysicsAnalysis/POOLRootAccess/test/ut_elementLink_test.py diff --git a/PhysicsAnalysis/POOLRootAccess/test/ut_elementLink_test.py b/PhysicsAnalysis/POOLRootAccess/test/ut_elementLink_test.py new file mode 100644 index 00000000000..2504b3a5d7c --- /dev/null +++ b/PhysicsAnalysis/POOLRootAccess/test/ut_elementLink_test.py @@ -0,0 +1,20 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + + +#Tests the element links are correctly available +import sys +import ROOT +evt = ROOT.POOL.TEvent(ROOT.POOL.TEvent.kClassAccess) +evt.readFrom("$ASG_TEST_FILE_MC") + +#FIXME This relies on electrons being present in the first event! +evt.getEntry(0) +els = evt.retrieve("xAOD::ElectronContainer","Electrons") +for el in els: + if not el.trackParticle(): + print "ERROR: Element link is invalid for kClassAccess .. exit" + sys.exit(-1) + + +print "Element links were valid. Test passed" + -- GitLab