Skip to content

Commit

Permalink
Merge pull request #26434 from davidlange6/print_190411
Browse files Browse the repository at this point in the history
Python3 syntax error cleanup
  • Loading branch information
cmsbuild committed Apr 11, 2019
2 parents 97cdae2 + 9fc8dfd commit f2f2d13
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import FWCore.ParameterSet.Config as cms

import six
process = cms.Process("CALIB")

####################################################
Expand Down Expand Up @@ -53,7 +53,7 @@ def getFileInPath(rfile):
#print(detDict)

APVsToKill = []
for det,napv in detDict.iteritems():
for det,napv in six.iteritems(detDict):
APVsToKill.append(
cms.PSet(
DetId = cms.uint32(int(det)),
Expand Down
11 changes: 5 additions & 6 deletions IOPool/Input/test/PrePoolInputTest_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@

import FWCore.ParameterSet.Config as cms
from sys import argv
from string import atoi

process = cms.Process("TESTPROD")
process.load("FWCore.Framework.test.cmsExceptionsFatal_cff")

process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(atoi(argv[3]))
input = cms.untracked.int32(int(argv[3]))
)

process.Thing = cms.EDProducer("ThingProducer")
Expand All @@ -20,10 +19,10 @@
)

process.source = cms.Source("EmptySource",
firstRun = cms.untracked.uint32(atoi(argv[4])),
numberEventsInRun = cms.untracked.uint32(atoi(argv[5])),
firstLuminosityBlock = cms.untracked.uint32(atoi(argv[6])),
numberEventsInLuminosityBlock = cms.untracked.uint32(atoi(argv[7]))
firstRun = cms.untracked.uint32(int(argv[4])),
numberEventsInRun = cms.untracked.uint32(int(argv[5])),
firstLuminosityBlock = cms.untracked.uint32(int(argv[6])),
numberEventsInLuminosityBlock = cms.untracked.uint32(int(argv[7]))
)

process.p = cms.Path(process.Thing)
Expand Down
3 changes: 1 addition & 2 deletions IOPool/Input/test/RunPerLumiTest_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@

import FWCore.ParameterSet.Config as cms
from sys import argv
from string import atoi

process = cms.Process("TESTRECO")
process.load("FWCore.Framework.test.cmsExceptionsFatal_cff")

process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(atoi(argv[2]))
input = cms.untracked.int32(int(argv[2]))
)

process.OtherThing = cms.EDProducer("OtherThingProducer")
Expand Down
2 changes: 1 addition & 1 deletion RecoEgamma/ElectronIdentification/test/runElectron_VID.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
# You can list here either AOD or miniAOD files, but not both types mixed
#

print sys.argv[2]
print(sys.argv[2])
useAOD = bool(int(sys.argv[2]))

if useAOD == True :
Expand Down
2 changes: 1 addition & 1 deletion RecoEgamma/PhotonIdentification/test/runPhoton_VID.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
# You can list here either AOD or miniAOD files, but not both types mixed
#

print sys.argv[2]
print(sys.argv[2])
useAOD = bool(int(sys.argv[2]))

if useAOD == True :
Expand Down
14 changes: 7 additions & 7 deletions RecoTauTag/RecoTau/test/rerunTauRecoOnMiniAOD.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
outMode = 0 # store original MiniAOD and new selectedPatTaus
# outMode = 1 #store original MiniAOD, new selectedPatTaus, and all PFtau products as in AOD (except of unsuported ones)

print 'Running Tau reco&id with MiniAOD inputs:'
print '\t Run on signal:', runSignal
print '\t Recluster jets:', reclusterJets
print '\t Use Phase2 settings:', phase2
print '\t Output mode:', outMode
print('Running Tau reco&id with MiniAOD inputs:')
print('\t Run on signal:', runSignal)
print('\t Recluster jets:', reclusterJets)
print('\t Use Phase2 settings:', phase2)
print('\t Output mode:', outMode)

#####
from Configuration.StandardSequences.Eras import eras
Expand All @@ -54,7 +54,7 @@
process.maxEvents = cms.untracked.PSet(
input=cms.untracked.int32(maxEvents)
)
print '\t Max events:', process.maxEvents.input.value()
print('\t Max events:', process.maxEvents.input.value())

if runSignal:
readFiles.extend([
Expand Down Expand Up @@ -112,7 +112,7 @@
process.options.numberOfThreads = cms.untracked.uint32(4)
# process.options.numberOfThreads=cms.untracked.uint32(1)
process.options.numberOfStreams = cms.untracked.uint32(0)
print '\t No. of threads:', process.options.numberOfThreads.value(), ', no. of streams:', process.options.numberOfStreams.value()
print('\t No. of threads:', process.options.numberOfThreads.value(), ', no. of streams:', process.options.numberOfStreams.value())

process.options = cms.untracked.PSet(
process.options,
Expand Down

0 comments on commit f2f2d13

Please sign in to comment.