From 5573bdb8772553a65197d047591e9b32ab62b93b Mon Sep 17 00:00:00 2001 From: jean-roch Date: Tue, 4 Mar 2025 11:43:45 +0100 Subject: [PATCH 1/2] option to set --eventcontent MINIAODSIM1 to set a different output module name MINIAODSIM1output --- Configuration/Applications/python/ConfigBuilder.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Configuration/Applications/python/ConfigBuilder.py b/Configuration/Applications/python/ConfigBuilder.py index e558aaaed1e9d..5ec8f19d48fed 100644 --- a/Configuration/Applications/python/ConfigBuilder.py +++ b/Configuration/Applications/python/ConfigBuilder.py @@ -680,12 +680,15 @@ def doNotInlineEventContent(instance,label = "cms.untracked.vstring(process."+th if streamType=='': continue if streamType == 'ALCARECO' and not 'ALCAPRODUCER' in self._options.step: continue if streamType=='DQMIO': streamType='DQM' + streamQualifier='' + if streamType[-1].isdigit(): + ## a special case where --eventcontent MINIAODSIM1 is set to have more than one output in a chain of configuration + streamQualifier = str(streamType[-1]) + streamType = streamType[:-1] eventContent=streamType ## override streamType to eventContent in case NANOEDM - if streamType == "NANOEDMAOD" : - eventContent = "NANOAOD" - elif streamType == "NANOEDMAODSIM" : - eventContent = "NANOAODSIM" + if streamType.startswith("NANOEDMAOD"): + eventContent = eventContent.replace("NANOEDM","NANO") theEventContent = getattr(self.process, eventContent+"EventContent") if i==0: theFileName=self._options.outfile_name @@ -714,10 +717,11 @@ def doNotInlineEventContent(instance,label = "cms.untracked.vstring(process."+th output.dataset.filterName = cms.untracked.string('StreamALCACombined') if "MINIAOD" in streamType: + ## we should definitely get rid of this customization by now from PhysicsTools.PatAlgos.slimming.miniAOD_tools import miniAOD_customizeOutput miniAOD_customizeOutput(output) - outputModuleName=streamType+'output' + outputModuleName=streamType+streamQualifier+'output' setattr(self.process,outputModuleName,output) outputModule=getattr(self.process,outputModuleName) setattr(self.process,outputModuleName+'_step',cms.EndPath(outputModule)) From 904189fc601bb888149b1f988f60d11561a51671 Mon Sep 17 00:00:00 2001 From: jean-roch Date: Tue, 4 Mar 2025 11:45:28 +0100 Subject: [PATCH 2/2] add an option to specify the max number of files to include in the configuration from the --filein 'das::