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

move scripts in Utilties and Validation to py3 #34364

Merged
merged 3 commits into from
Jul 7, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Utilities/ReleaseScripts/python/cmsCodeRules/Formatter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
import os, sys, string
2 changes: 1 addition & 1 deletion Utilities/ReleaseScripts/python/cmsCodeRules/showPage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
from builtins import range
2 changes: 1 addition & 1 deletion Utilities/ReleaseScripts/scripts/MakeBuildSet
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3
from __future__ import print_function
#pylint: disable-msg=W0403
"""
2 changes: 1 addition & 1 deletion Utilities/ReleaseScripts/scripts/addOnTests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3

from __future__ import print_function
from builtins import range
2 changes: 1 addition & 1 deletion Utilities/ReleaseScripts/scripts/cernsso
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2.6
#!/usr/bin/env python32.6
davidlange6 marked this conversation as resolved.
Show resolved Hide resolved

from ctypes import *
from optparse import OptionParser
2 changes: 1 addition & 1 deletion Utilities/ReleaseScripts/scripts/cmsCodeRulesChecker.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
from builtins import range
2 changes: 1 addition & 1 deletion Utilities/ReleaseScripts/scripts/cmssw_fix_interface.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

import os
import sys
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3

from __future__ import print_function
import optparse
2 changes: 1 addition & 1 deletion Utilities/ReleaseScripts/scripts/storeTreeInfo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
from builtins import range
2 changes: 1 addition & 1 deletion Utilities/ReleaseScripts/scripts/ws_sso_content_reader.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
###Description: The tool reads cern web services behind SSO using user certificates
from __future__ import print_function
import os, urllib, urllib2, httplib, cookielib, sys, HTMLParser, re
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
import sys,os,tempfile,shutil,subprocess,glob
166 changes: 83 additions & 83 deletions Validation/HGCalValidation/scripts/hgcalPerformanceValidation.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
import os
2 changes: 1 addition & 1 deletion Validation/RecoTrack/scripts/diffTrackingNtuple.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
import argparse
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
import sys,os,tempfile,shutil,subprocess,glob
2 changes: 1 addition & 1 deletion Validation/RecoTrack/scripts/makeTrackValidationPlots.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
import os
2 changes: 1 addition & 1 deletion Validation/RecoTrack/scripts/printTrackingNtuple.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
import argparse
2 changes: 1 addition & 1 deletion Validation/RecoTrack/test/analyseDuplicateFake.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
import ROOT
2 changes: 1 addition & 1 deletion Validation/RecoTrack/test/analyseMVA.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from builtins import range
import array
4 changes: 2 additions & 2 deletions Validation/RecoTrack/test/fakeAnalysis/analysis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
from builtins import range
@@ -411,7 +411,7 @@ def FindEndOfTracking(fake, particle, end_criterion = ["nMissing", 2], real_crit
print particle_end.index()
print end_class
print "*****"
raw_input()
input()
'''
return last, fake_end, particle_end, end_class

24 changes: 12 additions & 12 deletions Validation/RecoTrack/test/fakeAnalysis/graphics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
from builtins import range
@@ -646,7 +646,7 @@ def ClassHistogram(self, data, name = "Histogram", labels = False, ready = False
#hist.GetXaxis().SetRange(0,10)
hist.Draw()

raw_input("Press any key to continue")
input("Press any key to continue")

def EndOfTrackingHistogram(self, end_list, hist_type="end_class", end_mask = [], fake_mask = [], normalised = False, BPix3mask = False):
''' Plots several types of histograms related to end of tracking analysis '''
@@ -784,7 +784,7 @@ def ResolutionHistograms(self, res_data, tracks = "fake", fake_mask = [], draw =
#c1.SetLogy()
if draw:
c1.Draw()
raw_input("Press enter to continue")
input("Press enter to continue")

return histograms

@@ -815,7 +815,7 @@ def ResolutionHistogramsCombine(self, res_data_trues, res_data_fakes, fake_mask

if draw:
c1.Draw()
raw_input("Press enter to continue")
input("Press enter to continue")

return histograms

@@ -853,7 +853,7 @@ def ResolutionHistogramsNormalised(self, res_data_trues, res_data_fakes, fake_ma

if draw:
c1.Draw()
raw_input("Press enter to continue")
input("Press enter to continue")

#return histograms

@@ -902,7 +902,7 @@ def ResolutionHistogramsNormalisedCumulative(self, res_data_trues, res_data_fake

if draw:
c1.Draw()
raw_input("Press enter to continue")
input("Press enter to continue")

def Histogram1D(self, data, name = "Histogram", nbins = 100, xmin = -1, xmax = 1, xlabel = "", color = 38, draw = True, normalised = False):
''' Creates a single histogram of resolutions for one parameter list '''
@@ -927,7 +927,7 @@ def Histogram1D(self, data, name = "Histogram", nbins = 100, xmin = -1, xmax = 1
if draw: hist.Draw()
return hist

#raw_input("Press any key to continue")
#input("Press any key to continue")

def HistogramSigmaPt(self, data, name = "Sigma(Pt) vs Pt"): # Old function

@@ -948,7 +948,7 @@ def HistogramSigmaPt(self, data, name = "Sigma(Pt) vs Pt"): # Old function

hist_2.Draw()

raw_input("Press enter to continue")
input("Press enter to continue")

def HistogramSigmaPtCombined(self, data1, data2, name = "Sigma(Pt) vs Pt"): # Old function

@@ -971,7 +971,7 @@ def HistogramSigmaPtCombined(self, data1, data2, name = "Sigma(Pt) vs Pt"): # Ol

hist_2.Draw()

raw_input("Press enter to continue")
input("Press enter to continue")

def HistogramSigmaPtDual(self, data1, data2, parameter = "pt", pad = None, name = "Sigma(parameter) vs Pt"):
'''
@@ -1061,7 +1061,7 @@ def HistogramSigmaPtDual(self, data1, data2, parameter = "pt", pad = None, name
leg.AddEntry(hist3_2, "Both", "L")
leg.Draw()

raw_input("Press enter to continue")
input("Press enter to continue")
'''
return [hist1_2, hist2_2, hist3_2]

@@ -1097,7 +1097,7 @@ def ResolutionsSigmaVsPt(self, res_data_trues, res_data_fakes, fake_mask = [], d

if draw:
c1.Draw()
raw_input("Press enter to continue")
input("Press enter to continue")



@@ -1162,6 +1162,6 @@ def Draw(self):
plots.Draw("A")
'''

raw_input("Press any key to continue")
input("Press any key to continue")


8 changes: 4 additions & 4 deletions Validation/RecoTrack/test/fakeAnalysis/graphics_vertical.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
from builtins import range
@@ -542,7 +542,7 @@ def DrawTrackTest_old(self, track):
if hit.isValid():
point = ROOT.TPolyMarker3D(1, array('f', [hit.x(), hit.y(), hit.z()]), 2)
point.Draw()
raw_input("continue")
input("continue")
#axis.SetAxisRange(-278,278,"Z")

axis.ToggleZoom()
@@ -633,7 +633,7 @@ def ClassHistogram(self, data, name = "Histogram", labels = False, ready = False
#hist.SetLabelSize(0.05)
hist.Draw()

raw_input("Press any key to continue")
input("Press any key to continue")


def Draw(self):
@@ -664,6 +664,6 @@ def Draw(self):

for plot in self.plots_2D: plot.Draw("A")

raw_input("Press any key to continue")
input("Press any key to continue")


2 changes: 1 addition & 1 deletion Validation/RecoTrack/test/fakeAnalysis/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

import ROOT
from array import array
2 changes: 1 addition & 1 deletion Validation/RecoTrack/test/publicPlots/plot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
from builtins import range
2 changes: 1 addition & 1 deletion Validation/RecoTrack/test/trackingCompare.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# This is an example of plotting the standard tracking validation
# plots from an explicit set of DQM root files.
2 changes: 1 addition & 1 deletion Validation/RecoTrack/test/trackingNtupleExample.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
import ROOT
2 changes: 1 addition & 1 deletion Validation/RecoTrack/test/trackingPerformanceValidation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3

from Validation.RecoTrack.plotting.validation import Sample, Validation
import Validation.RecoTrack.plotting.validation as validation