From 2bfcb44924b2f1f513839f2d1e652e0f685815ad Mon Sep 17 00:00:00 2001 From: hassan11196 Date: Fri, 23 Jan 2026 01:27:05 +0100 Subject: [PATCH 1/2] Add support for ScitagConfig tweak in SetupCMSSWPset for compatible CMSSW versions --- .../WMRuntime/Scripts/SetupCMSSWPset.py | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/python/WMCore/WMRuntime/Scripts/SetupCMSSWPset.py b/src/python/WMCore/WMRuntime/Scripts/SetupCMSSWPset.py index 5d263ca0c2..cb2d8558b5 100644 --- a/src/python/WMCore/WMRuntime/Scripts/SetupCMSSWPset.py +++ b/src/python/WMCore/WMRuntime/Scripts/SetupCMSSWPset.py @@ -17,7 +17,7 @@ from Utils.Utilities import decodeBytesToUnicode, encodeUnicodeToBytes from WMCore.Storage.SiteLocalConfig import loadSiteLocalConfig from WMCore.WMRuntime.ScriptInterface import ScriptInterface -from WMCore.WMRuntime.Tools.Scram import Scram +from WMCore.WMRuntime.Tools.Scram import Scram, isCMSSWSupported def factory(module, name): @@ -577,6 +577,26 @@ def handleCondorStatusService(self): return + def handleScitagConfig(self): + """ + _handleScitagConfig_ + + Enable ScitagConfig service with productionCase flag for CMSSW releases + that support it (>= CMSSW_16_0_0). This enables the "Production Input" + scitag flow label for network packet labeling. + """ + cmsswVersion = self.getCmsswVersion() + if not isCMSSWSupported(cmsswVersion, "CMSSW_16_0_0"): + return + + self.logger.info("Enabling ScitagConfig with productionCase for CMSSW version: %s", cmsswVersion) + tweak = PSetTweak() + tweak.addParameter("process.ScitagConfig", + "customTypeCms.Service('ScitagConfig', productionCase=cms.untracked.bool(True))") + self.applyPsetTweak(tweak, skipIfSet=True) + + return + def handleEnforceGUIDInFileName(self, secondaryInput=None): """ _handleEnforceGUIDInFileName_ @@ -713,6 +733,7 @@ def __call__(self): raise RuntimeError(msg) self.handleCondorStatusService() + self.handleScitagConfig() self.fixupProcess() # In case of CRAB3, the number of threads in the PSet should not be overridden From b7869d06fb258fd5367f9c1fc13c7b9798f9368b Mon Sep 17 00:00:00 2001 From: hassan11196 Date: Fri, 23 Jan 2026 18:27:30 +0100 Subject: [PATCH 2/2] update ScitagConfig tweak by separating productionCase parameter --- src/python/WMCore/WMRuntime/Scripts/SetupCMSSWPset.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/python/WMCore/WMRuntime/Scripts/SetupCMSSWPset.py b/src/python/WMCore/WMRuntime/Scripts/SetupCMSSWPset.py index cb2d8558b5..feb0df201e 100644 --- a/src/python/WMCore/WMRuntime/Scripts/SetupCMSSWPset.py +++ b/src/python/WMCore/WMRuntime/Scripts/SetupCMSSWPset.py @@ -591,10 +591,13 @@ def handleScitagConfig(self): self.logger.info("Enabling ScitagConfig with productionCase for CMSSW version: %s", cmsswVersion) tweak = PSetTweak() - tweak.addParameter("process.ScitagConfig", - "customTypeCms.Service('ScitagConfig', productionCase=cms.untracked.bool(True))") + tweak.addParameter("process.ScitagConfig", "customTypeCms.Service('ScitagConfig')") self.applyPsetTweak(tweak, skipIfSet=True) + tweak = PSetTweak() + tweak.addParameter("process.ScitagConfig.productionCase", "customTypeCms.untracked.bool(True)") + self.applyPsetTweak(tweak) + return def handleEnforceGUIDInFileName(self, secondaryInput=None):