Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print function migration for L1Trigger_L1TMuonEndCap #24079

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion L1Trigger/L1TMuonEndCap/test/RunTrackFinder_data.py
@@ -1,3 +1,4 @@
from __future__ import print_function
## 11.02.16: Copied from https://raw.githubusercontent.com/dcurry09/EMTF8/master/L1Trigger/L1TMuonEndCap/test/runMuonEndCap.py

import FWCore.ParameterSet.Config as cms
Expand Down Expand Up @@ -99,7 +100,7 @@
iFile = 0
for in_file_name in subprocess.check_output([eos_cmd, 'ls', in_dir_name]).splitlines():
if not ('.root' in in_file_name): continue
print in_file_name
print(in_file_name)
iFile += 1
if iFile > 1: break ## Just test on one file
# readFiles.extend( cms.untracked.vstring(in_dir_name+in_file_name) )
Expand Down
3 changes: 2 additions & 1 deletion L1Trigger/L1TMuonEndCap/test/tools/make_anglelut.py
@@ -1,3 +1,4 @@
from __future__ import print_function
#
# This cfg calls MakeAngleLUT which is obsolete and completely unused.
#
Expand All @@ -13,7 +14,7 @@

from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
print "Using GlobalTag: %s" % process.GlobalTag.globaltag.value()
print("Using GlobalTag: %s" % process.GlobalTag.globaltag.value())

# Fake alignment is/should be ideal geometry
# ==========================================
Expand Down
@@ -1,3 +1,4 @@
from __future__ import print_function
#
# This cfg calls MakeAngleLUT which is obsolete and completely unused.
#
Expand All @@ -12,7 +13,7 @@

from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, '90X_upgrade2023_realistic_v9', '')
print "Using GlobalTag: %s" % process.GlobalTag.globaltag.value()
print("Using GlobalTag: %s" % process.GlobalTag.globaltag.value())

# Fake alignment is/should be ideal geometry
# ==========================================
Expand Down
3 changes: 2 additions & 1 deletion L1Trigger/L1TMuonEndCap/test/tools/make_coordlut.py
@@ -1,3 +1,4 @@
from __future__ import print_function
import FWCore.ParameterSet.Config as cms

process = cms.Process("Whatever")
Expand All @@ -9,7 +10,7 @@

from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
print "Using GlobalTag: %s" % process.GlobalTag.globaltag.value()
print("Using GlobalTag: %s" % process.GlobalTag.globaltag.value())

# Fake alignment is/should be ideal geometry
# ==========================================
Expand Down
1 change: 1 addition & 0 deletions L1Trigger/L1TMuonEndCap/test/tools/print_binary.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python

from __future__ import print_function
import sys

def main():
Expand Down
1 change: 1 addition & 0 deletions L1Trigger/L1TMuonEndCap/test/tools/print_mode.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python

from __future__ import print_function
import sys

def main():
Expand Down
1 change: 1 addition & 0 deletions L1Trigger/L1TMuonEndCap/test/tools/print_mode_inv.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python

from __future__ import print_function
import sys

def main():
Expand Down
1 change: 1 addition & 0 deletions L1Trigger/L1TMuonEndCap/test/tools/print_quality_code.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python

from __future__ import print_function
import sys

def main():
Expand Down
1 change: 1 addition & 0 deletions L1Trigger/L1TMuonEndCap/test/tools/print_sector.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python

from __future__ import print_function
import sys
from math import degrees, pi

Expand Down
@@ -1,3 +1,4 @@
from __future__ import print_function
# Generate 2^6 = 64 entries
# a=12, b=23, c=34, d=13, e=14, f=24

Expand Down Expand Up @@ -83,7 +84,7 @@
# Output
for result in results:
(w,x,y,z) = result
print "%i%i%i%i" % (z,y,x,w)
print("%i%i%i%i" % (z,y,x,w))

# Output as C++ array
generate_cpp_array = False
Expand All @@ -100,4 +101,4 @@
if i%8 == 7 and i != 63: s += linebreak
i += 1
s += "\n};"
print s
print(s)
3 changes: 2 additions & 1 deletion L1Trigger/L1TMuonEndCap/test/unittests/FWLiteAnalyzer.py
Expand Up @@ -4,6 +4,7 @@
# Based on https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookFWLitePython
# Some snippets of codes are stolen from PhysicsTools/Heppy

from __future__ import print_function
from ROOT import gROOT, gSystem, AutoLibraryLoader
from DataFormats.FWLite import Events, Handle

Expand Down Expand Up @@ -79,7 +80,7 @@ def getHandles(self, event):
# ______________________________________________________________________________
if __name__ == "__main__":

print "Loading FW Lite"
print("Loading FW Lite")
gSystem.Load("libFWCoreFWLite")
gROOT.ProcessLine("FWLiteEnabler::enable();")

Expand Down