diff --git a/src/python/WMCore/WMRuntime/Scripts/SetupCMSSWPset.py b/src/python/WMCore/WMRuntime/Scripts/SetupCMSSWPset.py index 5d263ca0c2..feb0df201e 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,29 @@ 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')") + 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): """ _handleEnforceGUIDInFileName_ @@ -713,6 +736,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