From 1ba6a55a6cd3768b2499dd50b4cd707bd5e15a10 Mon Sep 17 00:00:00 2001 From: Ryan De Los Santos Date: Mon, 5 Jan 2026 14:42:14 -0500 Subject: [PATCH 1/3] Add in createSkimFiles argument to add_channels --- Configuration/python/processingUtilities.py | 32 +++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/Configuration/python/processingUtilities.py b/Configuration/python/processingUtilities.py index 2b184c4b..ced334a6 100644 --- a/Configuration/python/processingUtilities.py +++ b/Configuration/python/processingUtilities.py @@ -231,7 +231,8 @@ def add_channels (process, skim = None, branchSets = None, ignoreSkimmedCollections = False, - forceNonEmptySkim = False): + forceNonEmptySkim = False, + createSkimFiles = True): if skim != None: print("# The \"skim\" parameter of add_channels is obsolete and will soon be deprecated.") print("# Please remove from your config files.") @@ -857,20 +858,21 @@ def add_channels (process, if not osusub.batchMode: outFileName = skimFilePrefix + "_" + channelName + "_" + get_date_time_stamp() + ".root" print(outFileName) - poolOutputModule = cms.OutputModule ("PoolOutputModule", - overrideInputFileSplitLevels = cms.untracked.bool (True), - splitLevel = cms.untracked.int32 (0), - eventAutoFlushCompressedSize = cms.untracked.int32 (5242880), - fileName = cms.untracked.string (outFileName), - SelectEvents = cms.untracked.PSet (SelectEvents = SelectEvents), - outputCommands = cms.untracked.vstring (outputCommands), - dropMetaData = cms.untracked.string ("ALL"), - dataset = cms.untracked.PSet( - filterName = cms.untracked.string(channelName) - ), - ) - add_channels.endPath += poolOutputModule - setattr (process, channelName + "PoolOutputModule", poolOutputModule) + if createSkimFiles: + poolOutputModule = cms.OutputModule ("PoolOutputModule", + overrideInputFileSplitLevels = cms.untracked.bool (True), + splitLevel = cms.untracked.int32 (0), + eventAutoFlushCompressedSize = cms.untracked.int32 (5242880), + fileName = cms.untracked.string (outFileName), + SelectEvents = cms.untracked.PSet (SelectEvents = SelectEvents), + outputCommands = cms.untracked.vstring (outputCommands), + dropMetaData = cms.untracked.string ("ALL"), + dataset = cms.untracked.PSet( + filterName = cms.untracked.string(channelName) + ), + ) + add_channels.endPath += poolOutputModule + setattr (process, channelName + "PoolOutputModule", poolOutputModule) ######################################################################## setattr (process, channelName, channelPath) From 229e11748430170b0684cb59453c6d6e689bf283 Mon Sep 17 00:00:00 2001 From: Ryan De Los Santos Date: Mon, 5 Jan 2026 15:38:24 -0600 Subject: [PATCH 2/3] Production of skim files is optional --- Configuration/python/processingUtilities.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Configuration/python/processingUtilities.py b/Configuration/python/processingUtilities.py index ced334a6..a045d1e9 100644 --- a/Configuration/python/processingUtilities.py +++ b/Configuration/python/processingUtilities.py @@ -400,6 +400,7 @@ def add_channels (process, outputName = add_channels.originalName suffix = "_" + str(channels[0].name.pythonValue()).replace("'", "") + "_" + get_date_time_stamp() outputName = outputName.replace(".root", suffix + ".root") + print(f"Output file name: {outputName}") process.TFileService.fileName = cms.string(outputName) if os.path.islink (add_channels.originalName): os.unlink (add_channels.originalName) From d798ac8e3eeeedabb6370bb52974797329f686b2 Mon Sep 17 00:00:00 2001 From: Ryan De Los Santos Date: Mon, 5 Jan 2026 15:40:13 -0600 Subject: [PATCH 3/3] Remove unecessary print statement --- Configuration/python/processingUtilities.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Configuration/python/processingUtilities.py b/Configuration/python/processingUtilities.py index a045d1e9..ced334a6 100644 --- a/Configuration/python/processingUtilities.py +++ b/Configuration/python/processingUtilities.py @@ -400,7 +400,6 @@ def add_channels (process, outputName = add_channels.originalName suffix = "_" + str(channels[0].name.pythonValue()).replace("'", "") + "_" + get_date_time_stamp() outputName = outputName.replace(".root", suffix + ".root") - print(f"Output file name: {outputName}") process.TFileService.fileName = cms.string(outputName) if os.path.islink (add_channels.originalName): os.unlink (add_channels.originalName)