Skip to content

Commit 6f0c989

Browse files
authored
Merge pull request #46169 from iarspider/iarspider-patches-20240930-13
[L1] Fix syntax in python scripts
2 parents a2883eb + 069ca59 commit 6f0c989

File tree

7 files changed

+26
-26
lines changed

7 files changed

+26
-26
lines changed

L1Trigger/L1TGEM/test/runGEMPadDigiReader_cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
)
2121
)
2222

23-
process.dumper = cms.EDAnalyzer("GEMPadDigiReader"
23+
process.dumper = cms.EDAnalyzer("GEMPadDigiReader",
2424
gemDigiToken = cms.InputTag("simMuonGEMDigis"),
2525
gemPadToken = cms.InputTag("simMuonGEMPadDigis")
2626
)

L1Trigger/L1TMuonEndCap/test/tools/make_coordlut_MC.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from Configuration.AlCa.GlobalTag import GlobalTag
1010
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
11-
print "Using GlobalTag: %s" % process.GlobalTag.globaltag.value()
11+
print("Using GlobalTag: %s" % process.GlobalTag.globaltag.value())
1212

1313
# Fake alignment is/should be ideal geometry
1414
# ==========================================

L1Trigger/L1TMuonEndCap/test/tools/make_coordlut_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from Configuration.AlCa.GlobalTag import GlobalTag
1212
process.GlobalTag = GlobalTag(process.GlobalTag, '102X_dataRun2_Sep2018Rereco_v1')
13-
print "Using GlobalTag: %s" % process.GlobalTag.globaltag.value()
13+
print("Using GlobalTag: %s" % process.GlobalTag.globaltag.value())
1414

1515
process.source = cms.Source("EmptyIOVSource",
1616
timetype = cms.string('runnumber'),

L1Trigger/L1TMuonOverlapPhase1/test/expert/omtf/runMuonOverlapDataDump.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@
6868
#path = '/afs/cern.ch/work/k/kbunkow/public/data/SingleMuFullEta/721_FullEta_v4/'
6969

7070
onlyfiles = [f for f in listdir(path) if isfile(join(path, f))]
71-
#print onlyfiles
71+
#print(onlyfiles)
7272

7373
filesNameLike = sys.argv[1]
7474
#chosenFiles = ['file://' + path + f for f in onlyfiles if (('_p_10_' in f) or ('_m_10_' in f))]
7575
#chosenFiles = ['file://' + path + f for f in onlyfiles if (('_10_p_10_' in f))]
7676
#chosenFiles = ['file://' + path + f for f in onlyfiles if (re.match('.*_._p_10.*', f))]
7777
#chosenFiles = ['file://' + path + f for f in onlyfiles if ((filesNameLike in f))]
7878

79-
#print onlyfiles
79+
#print(onlyfiles)
8080

8181
chosenFiles = []
8282

@@ -90,7 +90,7 @@
9090
for f in onlyfiles:
9191
#if (( '_' + str(ptCode) + sign + '_' + str(i) + '_') in f): #TODO for 721_FullEta_v4/
9292
if (( '_' + str(ptCode) + sign + '_' + str(i) + ".") in f): #TODO for 9_3_14_FullEta_v2
93-
#print f
93+
#print(f)
9494
chosenFiles.append('file://' + path + f)
9595
selFilesPerPtBin += 1
9696
if(selFilesPerPtBin >= filesPerPtBin):
@@ -101,16 +101,16 @@
101101
for f in onlyfiles:
102102
if (( filesNameLike + '_' + str(i) + '_') in f): #TODO for 721_FullEta_v4/
103103
#if (( filesNameLike + '_' + str(i) + '.') in f): #TODO for 9_3_14_FullEta_v2
104-
print f
104+
print(f)
105105
chosenFiles.append('file://' + path + f)
106106

107107

108-
print "chosenFiles"
108+
print("chosenFiles")
109109
for chFile in chosenFiles:
110-
print chFile
110+
print(chFile)
111111

112112
if len(chosenFiles) == 0 :
113-
print "no files selected!!!!!!!!!!!!!!!"
113+
print("no files selected!!!!!!!!!!!!!!!")
114114
exit
115115

116116
firstEv = 0#40000

L1Trigger/L1TTwinMux/test/runUnpEmuTwinMux.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109

110110
process.L1TMuonPath = cms.Path(process.L1TMuonSeq)
111111

112-
process.out = cms.OutputModule("PoolOutputModule",
112+
process.out = cms.OutputModule("PoolOutputModule",
113113
outputCommands = cms.untracked.vstring(
114114
'drop *',
115115
#'keep *CSC*_*_*_*',
@@ -121,9 +121,9 @@
121121
'keep *_*TwinMux*_*_*',
122122
'keep *_*Bmtf*_*_*',
123123
'keep GenEventInfoProduct_generator_*_*'),
124-
125-
fileName = cms.untracked.string("l1ttwinmux.root")
126-
)
124+
125+
fileName = cms.untracked.string("l1ttwinmux.root")
126+
)
127127

128128
process.output_step = cms.EndPath(process.out)
129129
process.schedule = cms.Schedule(process.L1TMuonPath)

L1Trigger/VertexFinder/test/vertexFinder_cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
raise RuntimeError("Value for 'l1Tracks' command-line argument (= '{}') should contain one colon".format(options.l1Tracks))
4040

4141
l1TracksTag = cms.InputTag(options.l1Tracks.split(':')[0], options.l1Tracks.split(':')[1])
42-
print " INPUT TRACK COLLECTION = {0} {1}".format(*options.l1Tracks.split(':'))
42+
print(" INPUT TRACK COLLECTION = {0} {1}".format(*options.l1Tracks.split(':')) )
4343

4444

4545
process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(False) )

L1Trigger/VertexFinder/test/vertexNTupler_cfg.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
raise RuntimeError("Value for 'l1Tracks' command-line argument (= '{}') should contain one colon".format(options.l1Tracks))
5757

5858
l1TracksTag = cms.InputTag(options.l1Tracks.split(':')[0], options.l1Tracks.split(':')[1])
59-
print "Input Track Collection = {0} {1}".format(*options.l1Tracks.split(':'))
59+
print("Input Track Collection = {0} {1}".format(*options.l1Tracks.split(':')))
6060

6161

6262
# PART 2: SETUP MAIN CMSSW PROCESS
@@ -128,11 +128,11 @@
128128
for l in range(7):
129129
seedTrackPt = 2.0 + float(l) * 0.5
130130

131-
print
132-
print "dist =", dist
133-
print "minPt =", minPt
134-
print "minDensity =", minDensity
135-
print "seedTrkPt =", seedTrackPt
131+
print()
132+
print("dist =", dist)
133+
print("minPt =", minPt)
134+
print("minDensity =", minDensity)
135+
print("seedTrkPt =", seedTrackPt)
136136

137137
producer = process.l1tVertexProducer.clone()
138138
producer.VertexReconstruction.VertexDistance = cms.double(dist)
@@ -142,16 +142,16 @@
142142

143143
producerName = 'VertexProducerDBSCANDist{0}minPt{1}minDensity{2}seedTrackPt{3}'.format(dist, minPt, minDensity, seedTrackPt)
144144
producerName = producerName.replace(".","p")
145-
print "producer name =", producerName
145+
print("producer name =", producerName)
146146
setattr(process, producerName, producer)
147147
producerNames += [producerName]
148148
process.l1tVertexNTupler.extraVertexDescriptions += ['DBSCAN(dist={0},minPt={1},minDensity={2},seedTrackPt{3})'.format(dist, minPt, minDensity, seedTrackPt)]
149149
process.l1tVertexNTupler.extraVertexInputTags.append( cms.InputTag(producerName, 'L1Vertices'))
150150
producerSum += producer
151151

152-
print "Total number of producers =", len(additionalProducerAlgorithms)+1
153-
print " Producers = [{0}]".format(producerSum.dumpSequenceConfig().replace('&',', '))
154-
print " Algorithms = [fastHisto, {0}]".format(', '.join(additionalProducerAlgorithms))
152+
print("Total number of producers =", len(additionalProducerAlgorithms)+1)
153+
print(" Producers = [{0}]".format(producerSum.dumpSequenceConfig().replace('&',', ')))
154+
print(" Algorithms = [fastHisto, {0}]".format(', '.join(additionalProducerAlgorithms)))
155155

156156
# PART 4: UTILITIES
157157

@@ -177,5 +177,5 @@
177177

178178
# DUMP AND EXIT
179179
if options.dump:
180-
print process.dumpPython()
180+
print(process.dumpPython())
181181
sys.exit(0)

0 commit comments

Comments
 (0)