From 3b500806d43656ab2f913d1132cff2abb0420482 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 26 Jul 2018 13:14:18 +0200 Subject: [PATCH] python print migration L1Trigger/L1TMuonBarrel --- .../test/kalmanTools/makeEtaLuts.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/L1Trigger/L1TMuonBarrel/test/kalmanTools/makeEtaLuts.py b/L1Trigger/L1TMuonBarrel/test/kalmanTools/makeEtaLuts.py index 5d145f8ee2687..73b9c7b8795c4 100644 --- a/L1Trigger/L1TMuonBarrel/test/kalmanTools/makeEtaLuts.py +++ b/L1Trigger/L1TMuonBarrel/test/kalmanTools/makeEtaLuts.py @@ -1,3 +1,4 @@ +from __future__ import print_function etaLUT0=[8.946,7.508,6.279,6.399] etaLUT1=[-0.159,-0.116,-0.088,-0.128] @@ -25,11 +26,11 @@ p=int(round(etaLUT0[station-1]*p+etaLUT1[station-1]*p*p*p/abs(p))) lut.append(str(p)) if wheel>0: - print 'etaLUT_plus_{wheel}_{station} = cms.vint32('.format(wheel=wheel,station=station)+','.join(lut)+')\n' + print('etaLUT_plus_{wheel}_{station} = cms.vint32('.format(wheel=wheel,station=station)+','.join(lut)+')\n') if wheel<0: - print 'etaLUT_minus_{wheel}_{station} = cms.vint32('.format(wheel=abs(wheel),station=station)+','.join(lut)+')\n' + print('etaLUT_minus_{wheel}_{station} = cms.vint32('.format(wheel=abs(wheel),station=station)+','.join(lut)+')\n') if wheel==0: - print 'etaLUT_0_{station} = cms.vint32('.format(station=station)+','.join(lut)+')\n' + print('etaLUT_0_{station} = cms.vint32('.format(station=station)+','.join(lut)+')\n') #wite HLS LUT HLSINFO={} @@ -63,9 +64,9 @@ else: etaTag='0' - print 'const ap_int<8> etaLUT0_'+etaTag+"_"+str(station)+'[128]={'+','.join(d1)+'};\n' - print 'const ap_int<8> etaLUT1_'+etaTag+"_"+str(station)+'[128]={'+','.join(d2)+'};\n' - print 'const ap_int<8> etaLUTQ_'+etaTag+"_"+str(station)+'[128]={'+','.join(d3)+'};\n' + print('const ap_int<8> etaLUT0_'+etaTag+"_"+str(station)+'[128]={'+','.join(d1)+'};\n') + print('const ap_int<8> etaLUT1_'+etaTag+"_"+str(station)+'[128]={'+','.join(d2)+'};\n') + print('const ap_int<8> etaLUTQ_'+etaTag+"_"+str(station)+'[128]={'+','.join(d3)+'};\n') @@ -84,8 +85,8 @@ if wheel>0: - print 'etaCoarseLUT_plus_{wheel}= cms.vint32('.format(wheel=wheel)+','.join(lut)+')\n' + print('etaCoarseLUT_plus_{wheel}= cms.vint32('.format(wheel=wheel)+','.join(lut)+')\n') if wheel<0: - print 'etaCoarseLUT_minus_{wheel} = cms.vint32('.format(wheel=abs(wheel))+','.join(lut)+')\n' + print('etaCoarseLUT_minus_{wheel} = cms.vint32('.format(wheel=abs(wheel))+','.join(lut)+')\n') if wheel==0: - print 'etaCoarseLUT_0 = cms.vint32('+','.join(lut)+')\n' + print('etaCoarseLUT_0 = cms.vint32('+','.join(lut)+')\n')