Skip to content

Commit

Permalink
Merge pull request #23962 from davidlange6/printMig_180721T4_EventFil…
Browse files Browse the repository at this point in the history
…ter_L1GlobalTriggerRawToDigi

Print function migration for EventFilter_L1GlobalTriggerRawToDigi
  • Loading branch information
cmsbuild committed Jul 24, 2018
2 parents 8d336c2 + 32c2aca commit f6a2a43
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import print_function
#
# cfg file to pack a GT EVM record
#
Expand Down Expand Up @@ -173,7 +174,7 @@


else :
print 'Error: no files for sample ', useSample, ', (pre)release ', useRelease, ' and global tag ', useGlobalTag, ' defined.'
print('Error: no files for sample ', useSample, ', (pre)release ', useRelease, ' and global tag ', useGlobalTag, ' defined.')
sys.exit()

secFiles.extend([
Expand Down Expand Up @@ -233,22 +234,22 @@


else :
print 'Error: no files for sample ', useSample, ', (pre)release ', useRelease, ' and global tag ', useGlobalTag, ' defined.'
print('Error: no files for sample ', useSample, ', (pre)release ', useRelease, ' and global tag ', useGlobalTag, ' defined.')
sys.exit()


secFiles.extend([
])

else :
print 'Error: Global Tag ', useGlobalTag, ' not defined.'
print('Error: Global Tag ', useGlobalTag, ' not defined.')
sys.exit()

else :

# data
dataset = '/Cosmics/Commissioning09-v1/RAW'
print ' Running on set: '+ dataset
print(' Running on set: '+ dataset)

readFiles.extend( [
'/store/data/Commissioning09/Cosmics/RAW/v1/000/076/966/00BD9A1F-B908-DE11-8B2C-000423D94A04.root',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import print_function
#
# cfg file to unpack RAW L1 GT EVM data

Expand All @@ -8,10 +9,10 @@
# process
process = cms.Process('TestL1GtEvmUnpacker')

print '\n'
print('\n')
from L1Trigger.GlobalTriggerAnalyzer.UserOptions_cff import *
if errorUserOptions == True :
print '\nError returned by UserOptions_cff\n'
print('\nError returned by UserOptions_cff\n')
sys.exit()


Expand Down
9 changes: 5 additions & 4 deletions EventFilter/L1GlobalTriggerRawToDigi/test/L1GtPacker_cfg.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import print_function
#
# cfg file to pack a GT DAQ record
#
Expand Down Expand Up @@ -173,7 +174,7 @@


else :
print 'Error: no files for sample ', useSample, ', (pre)release ', useRelease, ' and global tag ', useGlobalTag, ' defined.'
print('Error: no files for sample ', useSample, ', (pre)release ', useRelease, ' and global tag ', useGlobalTag, ' defined.')
sys.exit()

secFiles.extend([
Expand Down Expand Up @@ -233,22 +234,22 @@


else :
print 'Error: no files for sample ', useSample, ', (pre)release ', useRelease, ' and global tag ', useGlobalTag, ' defined.'
print('Error: no files for sample ', useSample, ', (pre)release ', useRelease, ' and global tag ', useGlobalTag, ' defined.')
sys.exit()


secFiles.extend([
])

else :
print 'Error: Global Tag ', useGlobalTag, ' not defined.'
print('Error: Global Tag ', useGlobalTag, ' not defined.')
sys.exit()

else :

# data
dataset = '/Cosmics/Commissioning09-v1/RAW'
print ' Running on set: '+ dataset
print(' Running on set: '+ dataset)

readFiles.extend( [
'/store/data/Commissioning09/Cosmics/RAW/v1/000/076/966/00BD9A1F-B908-DE11-8B2C-000423D94A04.root',
Expand Down
39 changes: 20 additions & 19 deletions EventFilter/L1GlobalTriggerRawToDigi/test/L1GtRecord_cfg.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import print_function
#
# cfg file to produce L1GlobalTriggerRecord from a L1GlobalTriggerReadoutRecord
# when running on RAW data, one also unpack the data
Expand Down Expand Up @@ -86,7 +87,7 @@
else :
useGlobalTag = 'STARTUP3X_V8M'
else :
print 'Error: no global tag defined for release ', useRelease, ' used with RelVal sample'
print('Error: no global tag defined for release ', useRelease, ' used with RelVal sample')
sys.exit()

elif (useRelValSample == False) and (useLocalFiles == False) :
Expand All @@ -99,10 +100,10 @@
elif useRelease == 'CMSSW_3_3_6' :
useGlobalTag = 'GR09_P_V8'
else :
print 'Error: no global tag defined for release ', useRelease, ' used with data sample'
print('Error: no global tag defined for release ', useRelease, ' used with data sample')
sys.exit()
else :
print 'Using local file(s) with global tag ', useGlobalTag, ' and release ', useRelease
print('Using local file(s) with global tag ', useGlobalTag, ' and release ', useRelease)

#
#
Expand Down Expand Up @@ -140,7 +141,7 @@

if (useRelease == 'CMSSW_3_5_X') and (useSample == 'RelValQCD_Pt_80_120') and (dataType == 'RECO') :

print ' Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample'
print(' Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample')

dataset = cms.untracked.vstring('/RelValQCD_Pt_80_120/CMSSW_3_5_0_pre3-MC_3XY_V15-v1/GEN-SIM-RECO')
readFiles.extend( [
Expand All @@ -157,7 +158,7 @@

elif (useRelease == 'CMSSW_3_5_X') and (useSample == 'RelValTTbar') and (dataType == 'RECO') :

print ' Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample'
print(' Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample')

dataset = cms.untracked.vstring('/RelValTTbar/CMSSW_3_5_0_pre3-MC_3XY_V15-v1/GEN-SIM-RECO')
readFiles.extend( [
Expand All @@ -174,7 +175,7 @@

elif (useRelease == 'CMSSW_3_4_1') and (useSample == 'RelValQCD_Pt_80_120') and (dataType == 'RECO') :

print ' Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample'
print(' Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample')

dataset = cms.untracked.vstring('/RelValQCD_Pt_80_120/CMSSW_3_4_1-MC_3XY_V14-v1/GEN-SIM-RECO')

Expand All @@ -191,7 +192,7 @@

elif (useRelease == 'CMSSW_3_4_1') and (useSample == 'RelValTTbar') and (dataType == 'RECO') :

print ' Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample'
print(' Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample')

dataset = cms.untracked.vstring('/RelValTTbar/CMSSW_3_4_1-MC_3XY_V14-v1/GEN-SIM-RECO')
readFiles.extend( [
Expand All @@ -208,7 +209,7 @@


else :
print 'Error: no files for sample ', useSample, ', (pre)release ', useRelease, ' and global tag ', useGlobalTag, ' defined.'
print('Error: no files for sample ', useSample, ', (pre)release ', useRelease, ' and global tag ', useGlobalTag, ' defined.')
sys.exit()

secFiles.extend([
Expand All @@ -218,7 +219,7 @@

if (useRelease == 'CMSSW_3_5_X') and (useSample == 'RelValQCD_Pt_80_120') and (dataType == 'RECO') :

print ' Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample'
print(' Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample')

dataset = cms.untracked.vstring('/RelValQCD_Pt_80_120/CMSSW_3_2_2-MC_31X_V3-v1/GEN-SIM-RECO')
readFiles.extend( [
Expand All @@ -235,7 +236,7 @@

elif (useRelease == 'CMSSW_3_5_X') and (useSample == 'RelValTTbar') and (dataType == 'RECO') :

print ' Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample'
print(' Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample')

dataset = cms.untracked.vstring('/RelValTTbar/CMSSW_3_5_0_pre3-STARTUP3X_V15-v1/GEN-SIM-RECO')
readFiles.extend( [
Expand All @@ -252,7 +253,7 @@

elif (useRelease == 'CMSSW_3_4_1') and (useSample == 'RelValQCD_Pt_80_120') and (dataType == 'RECO') :

print ' Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample'
print(' Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample')

dataset = cms.untracked.vstring('/RelValQCD_Pt_80_120/CMSSW_3_4_1-STARTUP3X_V14-v1/GEN-SIM-RECO')
readFiles.extend( [
Expand All @@ -269,7 +270,7 @@

elif (useRelease == 'CMSSW_3_4_1') and (useSample == 'RelValTTbar') and (dataType == 'RECO') :

print ' Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample'
print(' Running ', useRelease, ' and global tag ', useGlobalTag, ' on ', useSample, ' sample')

dataset = cms.untracked.vstring('/RelValTTbar/CMSSW_3_4_1-STARTUP3X_V14-v1/GEN-SIM-RECO')
readFiles.extend( [
Expand All @@ -286,15 +287,15 @@


else :
print 'Error: no files for sample ', useSample, ', (pre)release ', useRelease, ' and global tag ', useGlobalTag, ' defined.'
print('Error: no files for sample ', useSample, ', (pre)release ', useRelease, ' and global tag ', useGlobalTag, ' defined.')
sys.exit()


secFiles.extend([
])

else :
print 'Error: Global Tag ', useGlobalTag, ' not defined.'
print('Error: Global Tag ', useGlobalTag, ' not defined.')
sys.exit()

elif (useRelValSample == False) and (useLocalFiles == False) :
Expand All @@ -313,7 +314,7 @@

elif runNumber == 116035 :
dataset = '/Cosmics/Commissioning09-v3/RAW'
print ' Running on set: '+ dataset + ' with global tag ' + useGlobalTag
print(' Running on set: '+ dataset + ' with global tag ' + useGlobalTag)

readFiles.extend( [
'/store/data/Commissioning09/Cosmics/RAW/v3/000/116/035/34A8317D-76AF-DE11-91DB-000423D98DC4.root'
Expand All @@ -324,7 +325,7 @@

elif runNumber == 121560 :
dataset = '/Cosmics/Commissioning09-v3/RAW'
print ' Running on set: '+ dataset + ' with global tag ' + useGlobalTag
print(' Running on set: '+ dataset + ' with global tag ' + useGlobalTag)

readFiles.extend( [
'/store/data/BeamCommissioning09/Cosmics/RAW/v1/000/121/560/DC089E4B-5ED4-DE11-A179-000423D98FBC.root'
Expand All @@ -334,7 +335,7 @@
])

else :
print 'Error: run ', runNumber, ' not defined.'
print('Error: run ', runNumber, ' not defined.')
sys.exit()


Expand All @@ -346,7 +347,7 @@
] );

else :
print 'Error: dataType ',dataType, ' not defined.'
print('Error: dataType ',dataType, ' not defined.')
sys.exit()

else :
Expand All @@ -357,7 +358,7 @@
secFiles.extend([
])

print 'Local file(s) ', readFiles
print('Local file(s) ', readFiles)



Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import print_function
#
# cfg file to run the L1GtTriggerMenuLite producer
# with the options set in UserOptions_cff.py
Expand All @@ -9,10 +10,10 @@

process = cms.Process("L1T")

print '\n'
print('\n')
from L1Trigger.GlobalTriggerAnalyzer.UserOptions_cff import *
if errorUserOptions == True :
print '\nError returned by UserOptions_cff\n'
print('\nError returned by UserOptions_cff\n')
sys.exit()


Expand Down
5 changes: 3 additions & 2 deletions EventFilter/L1GlobalTriggerRawToDigi/test/L1GtUnpacker_cfg.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import print_function
#
# cfg file to unpack RAW L1 GT DAQ data
# the options set in "user choices" file
Expand All @@ -12,10 +13,10 @@

process = cms.Process("TestL1GtUnpacker")

print '\n'
print('\n')
from L1Trigger.GlobalTriggerAnalyzer.UserOptions_cff import *
if errorUserOptions == True :
print '\nError returned by UserOptions_cff\n'
print('\nError returned by UserOptions_cff\n')
sys.exit()

# source according to data type
Expand Down

0 comments on commit f6a2a43

Please sign in to comment.