Skip to content

Commit

Permalink
update PV validations templates: print with # to avoid having python …
Browse files Browse the repository at this point in the history
…dump not runnable
  • Loading branch information
mmusich committed Dec 3, 2022
1 parent ba87cab commit 0abf7bb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 24 deletions.
25 changes: 12 additions & 13 deletions Alignment/OfflineValidation/test/PVValidation_TEMPL_cfg.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import FWCore.ParameterSet.Config as cms
import sys

Expand Down Expand Up @@ -45,15 +44,15 @@ def customiseKinksAndBows(process):
# Event source and run selection
###################################################################
if (useFileList):
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: Reading local input files list")
print("############ testPVValidation_cfg.py: msg%-i: Reading local input files list")
readFiles = cms.untracked.vstring()
readFiles.extend(FILESOURCETEMPLATE)
process.source = cms.Source("PoolSource",
fileNames = readFiles ,
duplicateCheckMode = cms.untracked.string('checkAllFilesOpened')
)
else:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: Reading from configuration fragment")
print("############ testPVValidation_cfg.py: msg%-i: Reading from configuration fragment")
process.load("Alignment.OfflineValidation.DATASETTEMPLATE")

###################################################################
Expand All @@ -67,12 +66,12 @@ def customiseKinksAndBows(process):
# JSON Filtering
###################################################################
if isMC:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: This is simulation!")
print("############ testPVValidation_cfg.py: msg%-i: This is simulation!")
runboundary = 1
else:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: This is real DATA!")
print("############ testPVValidation_cfg.py: msg%-i: This is real DATA!")
if ('LUMILISTTEMPLATE'):
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: JSON filtering with: LUMILISTTEMPLATE")
print("############ testPVValidation_cfg.py: msg%-i: JSON filtering with: LUMILISTTEMPLATE")
import FWCore.PythonUtilities.LumiList as LumiList
process.source.lumisToProcess = LumiList.LumiList(filename ='LUMILISTTEMPLATE').getVLuminosityBlockRange()

Expand Down Expand Up @@ -110,7 +109,7 @@ def customiseKinksAndBows(process):
process.GlobalTag = GlobalTag(process.GlobalTag, 'GLOBALTAGTEMPLATE', '')

if allFromGT:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: All is taken from GT")
print("############ testPVValidation_cfg.py: msg%-i: All is taken from GT")
else:
####################################################################
# Get Alignment and APE constants
Expand All @@ -121,24 +120,24 @@ def customiseKinksAndBows(process):
# Kinks and Bows (optional)
####################################################################
if applyBows:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: Applying TrackerSurfaceDeformations!")
print("############ testPVValidation_cfg.py: msg%-i: Applying TrackerSurfaceDeformations!")
process=customiseKinksAndBows(process)
else:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: MultiPVValidation: Not applying TrackerSurfaceDeformations!")
print("############ testPVValidation_cfg.py: msg%-i: MultiPVValidation: Not applying TrackerSurfaceDeformations!")

####################################################################
# Extra corrections not included in the GT
####################################################################
if applyExtraConditions:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: Applying extra calibration constants!")
print("############ testPVValidation_cfg.py: msg%-i: Applying extra calibration constants!")

import CalibTracker.Configuration.Common.PoolDBESSource_cfi

# Extra conditions to be plugged here
##### END OF EXTRA CONDITIONS

else:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: Not applying extra calibration constants!")
print("############ testPVValidation_cfg.py: msg%-i: Not applying extra calibration constants!")


####################################################################
Expand Down Expand Up @@ -224,10 +223,10 @@ def customiseKinksAndBows(process):
####################################################################
def switchClusterizerParameters(da):
if da:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: Running DA Algorithm!")
print("############ testPVValidation_cfg.py: msg%-i: Running DA Algorithm!")
return DAClusterizationParams
else:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: Running GAP Algorithm!")
print("############ testPVValidation_cfg.py: msg%-i: Running GAP Algorithm!")
return GapClusterizationParams

####################################################################
Expand Down
20 changes: 10 additions & 10 deletions Alignment/OfflineValidation/test/PVValidation_T_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ def customiseKinksAndBows(process):
# JSON Filtering
###################################################################
if isMC:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: This is Simulation!")
print("############ testPVValidation_cfg.py: msg%-i: This is Simulation!")
runboundary = 1
else:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: This is DATA!")
print("############ testPVValidation_cfg.py: msg%-i: This is DATA!")
import FWCore.PythonUtilities.LumiList as LumiList
process.source.lumisToProcess = LumiList.LumiList(filename ='LUMILISTTEMPLATE').getVLuminosityBlockRange()

Expand Down Expand Up @@ -109,7 +109,7 @@ def customiseKinksAndBows(process):
process.GlobalTag = GlobalTag(process.GlobalTag, 'GLOBALTAGTEMPLATE', '')

if allFromGT:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: All is taken from GT")
print("############ testPVValidation_cfg.py: msg%-i: All is taken from GT")
else:
####################################################################
# Get Alignment constants and APE
Expand All @@ -120,10 +120,10 @@ def customiseKinksAndBows(process):
# Kinks and Bows (optional)
####################################################################
if applyBows:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: Applying TrackerSurfaceDeformations!")
print("############ testPVValidation_cfg.py: msg%-i: Applying TrackerSurfaceDeformations!")
process=customiseKinksAndBows(process)
else:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: MultiPVValidation: Not applying TrackerSurfaceDeformations!")
print("############ testPVValidation_cfg.py: msg%-i: MultiPVValidation: Not applying TrackerSurfaceDeformations!")

####################################################################
# Extra corrections not included in the GT
Expand All @@ -134,7 +134,7 @@ def customiseKinksAndBows(process):
##### END OF EXTRA CONDITIONS

else:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: Not applying extra calibration constants!")
print("############ testPVValidation_cfg.py: msg%-i: Not applying extra calibration constants!")

####################################################################
# Load and Configure event selection
Expand Down Expand Up @@ -208,7 +208,7 @@ def customiseKinksAndBows(process):

if(theRefitter == RefitType.COMMON):

print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: using the common track selection and refit sequence!")
print("############ testPVValidation_cfg.py: msg%-i: using the common track selection and refit sequence!")
####################################################################
# Load and Configure Common Track Selection and refitting sequence
####################################################################
Expand All @@ -230,7 +230,7 @@ def customiseKinksAndBows(process):

elif (theRefitter == RefitType.STANDARD):

print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: using the standard single refit sequence!")
print("############ testPVValidation_cfg.py: msg%-i: using the standard single refit sequence!")
####################################################################
# Load and Configure Measurement Tracker Event
# (needed in case NavigationSchool is set != '')
Expand Down Expand Up @@ -289,10 +289,10 @@ def customiseKinksAndBows(process):
####################################################################
def switchClusterizerParameters(da):
if da:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: Running DA Algorithm!")
print("############ testPVValidation_cfg.py: msg%-i: Running DA Algorithm!")
return DAClusterizationParams
else:
print(">>>>>>>>>> testPVValidation_cfg.py: msg%-i: Running GAP Algorithm!")
print("############ testPVValidation_cfg.py: msg%-i: Running GAP Algorithm!")
return GapClusterizationParams

####################################################################
Expand Down
1 change: 0 additions & 1 deletion Alignment/OfflineValidation/test/test_all_cfg.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import FWCore.ParameterSet.Config as cms
import sys
from enum import Enum
Expand Down

0 comments on commit 0abf7bb

Please sign in to comment.