Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion src/python/WMCore/WMRuntime/Scripts/SetupCMSSWPset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)
Comment on lines +593 to +595

@makortel makortel Jan 23, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this apply the part

process.ScitagConfig.productionCase = cms.untracked.bool(True)

also when process.ScitagConfig already exists in the process?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @makortel, you are indeed correct. It would have skipped the productionCase assignment if process.ScitagConfig already existed.
I have updated the tweak to always have a seperate "tweak" for productionCase.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good to me now (as far as I interpret correctly what the code does)


return

def handleEnforceGUIDInFileName(self, secondaryInput=None):
"""
_handleEnforceGUIDInFileName_
Expand Down Expand Up @@ -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
Expand Down