Skip to content

Commit

Permalink
Merge pull request #34376 from jfernan2/DQMpackagesToPython3
Browse files Browse the repository at this point in the history
[DQM] Subsystem packages to use python3
  • Loading branch information
cmsbuild authored Jul 7, 2021
2 parents cf3910a + c5ef786 commit 155f876
Show file tree
Hide file tree
Showing 59 changed files with 63 additions and 63 deletions.
2 changes: 1 addition & 1 deletion DQM/DTMonitorModule/python/test/dtDqmPythonTypes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from FWCore.ParameterSet.Types import PSet
import FWCore.ParameterSet.Config as cms

Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/python/config/dqmPythonTypes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from FWCore.ParameterSet.Types import PSet
import FWCore.ParameterSet.Config as cms
class RunType(PSet):
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/XMLcfgfiles/ExtractAppInfoFromXML
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Syntax:
ExtracAppInfoFromXML [-sapc] file
Parameters:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Syntax:
ExtracAppInfoFromXML [-sapc] file
Parameters:
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/XMLcfgfiles/RCMSServerChecker
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
This module checks if for a specifyed machine the RCMS jobcontrol daemon is
running.
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/XMLcfgfiles/getRunAppsInfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""This module provides the PID and the log file name of the running DQM
applications (consumers), thus completing the information generated by
ExtractAppInfoFromXML.
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/XMLcfgfiles/getRunAppsInfo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""This module provides the PID and the log file name of the running DQM
applications (consumers), thus completing the information generated by
ExtractAppInfoFromXML.
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/XMLcfgfiles/psClasses.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
import os,subprocess,sys,re,time,random
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/XMLcfgfiles/pscram
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import os,subprocess,sys,re,pprint,glob,getopt

from psClasses import *
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Syntax: updateCMLcfgToCurrentRelease [-h] -r relNumber xmlcfgfile newfilename
-h This text
-r relNumber tell the script
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/XMLcfgfiles/xmlcfgVerifier
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Syntax:
xmlcfgVerifier [-fhv] XMLCfgFilename
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/contentValuesCheck.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 contentValuesLib import *
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/contentValuesFiles.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from contentValuesLib import *
import xml.dom.minidom
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/contentValuesToDBS.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 contentValuesLib import *
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/contentValuesToRR.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 contentValuesLib import *
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/dqmd_manager.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 sys
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/filecollector/createOnlineInfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import os, re, hashlib, time, sys
from traceback import print_exc
from datetime import datetime
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/filecollector/fileCollector.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
import os, time, sys, glob, re, shutil, stat, smtplib, socket
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/filecollector/fileCollector2.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
Expand Down
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, time, sys, glob, re, smtplib, socket
from email.MIMEText import MIMEText
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/filecollector/visDQMSyncDaemon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Daemon to keep a root file repository with another directory (AFS) in sync under
certain rules of size and subdirs
Usage: visDQMSyncDaemon [-fd][--dirs=..,..][--dirs_quotas=..,..] MAX_QUOTA ROOT_REPO DEST_DIR
Expand Down
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, time, sys, shutil, glob, smtplib, re
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/fileregistration/fileTransfer.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, time, sys, shutil, glob, smtplib, re, commands
Expand Down
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,time,sys,shutil,glob
Expand Down
2 changes: 1 addition & 1 deletion DQM/Integration/scripts/harvesting_tools/cmsHarvester.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

###########################################################################
## File : cmsHarvest.py
Expand Down
4 changes: 2 additions & 2 deletions DQM/Integration/scripts/igfilemgr/igmerge
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3
"""
zipmerge [-sret] [-n size ] [--help] [-o name] file1
file2 [filen...]
Expand Down Expand Up @@ -71,7 +71,7 @@ def openOutputZipFile(filename):
key="x"
while key not in ["y","Y","n","N","a","A","all","All",""] and not ALL:
print "\nOutput file %s already exist and will be overwriten!!!" % filename
key=raw_input("Do you want to proceed? (y,n,[all])")
key=input("Do you want to proceed? (y,n,[all])")
ALL=key in ["a","A","all","All",""]
if key in ["y","Y",""] or ALL:
os.remove(filename)
Expand Down
4 changes: 2 additions & 2 deletions DQM/Integration/scripts/igfilemgr/zipmerge
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3
"""
zipmerge [-sret] [-n size ] [--help] [-o name] file1
file2 [filen...]
Expand Down Expand Up @@ -47,7 +47,7 @@ def openOutputZipFile(filename):
key="x"
while key not in ["y","Y","n","N","a","A","all","All",""] and not ALL:
print "\nOutput file %s already exist and will be overwriten!!!" % filename
key=raw_input("Do you want to proceed? (y,n,[all])")
key=input("Do you want to proceed? (y,n,[all])")
ALL=key in ["a","A","all","All",""]
if key in ["y","Y",""] or ALL:
os.remove(filename)
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/scripts/DeadROCCounter.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 ROOT import TFile, gStyle,gPad ,TObject, TCanvas, TH1, TH1F, TH2F, TLegend, TPaletteAxis, TList, TLine, TAttLine, TF1,TAxis
import re
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/scripts/DeadROCCounter_Phase1.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 ROOT import TFile, gStyle,gPad ,TObject, TCanvas, TH1, TH1F, TH2F, TLegend, TPaletteAxis, TList, TLine, TAttLine, TF1,TAxis
import re
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/scripts/DeadROC_duringRun.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 sys
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/scripts/MergeOccDeadROC.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
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/scripts/MergePCLDeadROC.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
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/scripts/MergePCLFedErr.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
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/scripts/PCLOthers.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
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/scripts/PhaseITreeProducer.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 sys
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/scripts/PixelMapPlotter.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
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/scripts/TH2PolyOfflineMaps.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 sys
Expand Down
6 changes: 3 additions & 3 deletions DQM/SiStripMonitorClient/scripts/TkMap_script_phase1.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 sys
Expand Down Expand Up @@ -196,7 +196,7 @@ def getGT(DQMfile, RunNumber, globalTagVar):
print('Using DQM file: '+File_Name)
else:
print('*****************Warning: DQM file is not ready************************')
input_var = raw_input("DQM file is incompleted, do you want to continue? (y/n): ")
input_var = input("DQM file is incompleted, do you want to continue? (y/n): ")
if (input_var == 'y') or (input_var == 'Y'):
print('Using DQM file: '+File_Name)
else:
Expand All @@ -206,7 +206,7 @@ def getGT(DQMfile, RunNumber, globalTagVar):
print(' ')
print(' ')
print('*****************Warning: PCL file is not ready************************')
input_var = raw_input("PCL file is not ready, you will need to re-run the script later for PCL plots, do you want to continue? (y/n): ")
input_var = input("PCL file is not ready, you will need to re-run the script later for PCL plots, do you want to continue? (y/n): ")
if (input_var == 'y') or (input_var == 'Y'):
print('--------> Remember to re-run the script later!!!!!')
else:
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/scripts/change_name.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3


import sys
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/scripts/findBadModT9.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#this script:
#Find which Modules bad in the PCL and which are NOT bad in the DQM (express) (and dumps the info in a txt file)
#Find which modules are bad in the DQM (express) and which are still bad in DQM prompt (not because they are masked) (and dumps the info in a txt file)
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/scripts/getGTfromDQMFile.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 math import *
from ROOT import TFile, TObject, TTree
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/scripts/getGTfromDQMFile_V2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from math import *
from ROOT import TFile, TObject, TTree
from array import array
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/scripts/getRunInfo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

#
#
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/scripts/submitDQMOfflineCAF.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

#
#
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorSummary/scripts/iov_list_tag.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 optparse import OptionParser, Option, OptionValueError
import DLFCN
Expand Down
2 changes: 1 addition & 1 deletion DQM/TrackerCommon/bin/getRunRegistry.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# For documentation of the RR XML-RPC handler, look into https://twiki.cern.ch/twiki//bin/view/CMS/DqmRrApi

Expand Down
2 changes: 1 addition & 1 deletion DQM/TrackerRemapper/test/PrintTkMap.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 sys
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/Alignment/test/alcarecoTester.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
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/CalibCalo/test/compare.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
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/CalibCalo/test/dohistos.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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# This script compares the writer output with the reader output.
# - run the SiStripBadComponentsDQMService.py > logReader
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/Configuration/scripts/cmsswConfigtrace.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
import re
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/Configuration/scripts/cmsswFiletrace.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
import re
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/EGamma/scripts/electronCompare.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

#========================================================================
#
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/EGamma/scripts/electronDataDiscovery.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
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/EGamma/scripts/electronStore.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

#========================================================================
#
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/EGamma/test/dbs_discovery.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

#===================================================================
# This python script is querying https://cmsweb.cern.ch/dbs_discovery/
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/JetMET/test/DDSearchCLI.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#-*- coding: ISO-8859-1 -*-
#
#
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/JetMET/test/publish/make_html_output.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
Expand Down

0 comments on commit 155f876

Please sign in to comment.