Skip to content
Snippets Groups Projects
Commit e95b67cd authored by scott snyder's avatar scott snyder
Browse files

CaloUtils: python 3 fixes

Need to flush output to get consistent output ordering
between py2 and py3.
parent c8918dcd
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,7 @@ from __future__ import print_function ...@@ -14,6 +14,7 @@ from __future__ import print_function
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaPython.PyAthenaComps import Alg, StatusCode from AthenaPython.PyAthenaComps import Alg, StatusCode
from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentFactory import CompFactory
import sys
import ROOT import ROOT
...@@ -31,6 +32,7 @@ class TestAlg (Alg): ...@@ -31,6 +32,7 @@ class TestAlg (Alg):
ctx = self.getContext() ctx = self.getContext()
print (ctx.eventID().run_number(), ctx.eventID().lumi_block(), print (ctx.eventID().run_number(), ctx.eventID().lumi_block(),
ctx.eventID().time_stamp()) ctx.eventID().time_stamp())
sys.stdout.flush()
self.tool1.execute (ctx).ignore() self.tool1.execute (ctx).ignore()
self.tool2.execute (ctx).ignore() self.tool2.execute (ctx).ignore()
...@@ -45,6 +47,7 @@ class TestAlg (Alg): ...@@ -45,6 +47,7 @@ class TestAlg (Alg):
tc = ROOT.CaloRec.ToolConstants() tc = ROOT.CaloRec.ToolConstants()
assert self.tool1.mergeConstants (tc, ctx).isSuccess() assert self.tool1.mergeConstants (tc, ctx).isSuccess()
print ('testMerge: ', tc.clsname(), tc.version(), tc.toString ('')) print ('testMerge: ', tc.clsname(), tc.version(), tc.toString (''))
sys.stdout.flush()
tc = ROOT.CaloRec.ToolConstants() tc = ROOT.CaloRec.ToolConstants()
tc.clsname ('foofoo') tc.clsname ('foofoo')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment