@@ -680,12 +680,15 @@ def doNotInlineEventContent(instance,label = "cms.untracked.vstring(process."+th
680680 if streamType == '' : continue
681681 if streamType == 'ALCARECO' and not 'ALCAPRODUCER' in self ._options .step : continue
682682 if streamType == 'DQMIO' : streamType = 'DQM'
683+ streamQualifier = ''
684+ if streamType [- 1 ].isdigit ():
685+ ## a special case where --eventcontent MINIAODSIM1 is set to have more than one output in a chain of configuration
686+ streamQualifier = str (streamType [- 1 ])
687+ streamType = streamType [:- 1 ]
683688 eventContent = streamType
684689 ## override streamType to eventContent in case NANOEDM
685- if streamType == "NANOEDMAOD" :
686- eventContent = "NANOAOD"
687- elif streamType == "NANOEDMAODSIM" :
688- eventContent = "NANOAODSIM"
690+ if streamType .startswith ("NANOEDMAOD" ):
691+ eventContent = eventContent .replace ("NANOEDM" ,"NANO" )
689692 theEventContent = getattr (self .process , eventContent + "EventContent" )
690693 if i == 0 :
691694 theFileName = self ._options .outfile_name
@@ -714,10 +717,11 @@ def doNotInlineEventContent(instance,label = "cms.untracked.vstring(process."+th
714717 output .dataset .filterName = cms .untracked .string ('StreamALCACombined' )
715718
716719 if "MINIAOD" in streamType :
720+ ## we should definitely get rid of this customization by now
717721 from PhysicsTools .PatAlgos .slimming .miniAOD_tools import miniAOD_customizeOutput
718722 miniAOD_customizeOutput (output )
719723
720- outputModuleName = streamType + 'output'
724+ outputModuleName = streamType + streamQualifier + 'output'
721725 setattr (self .process ,outputModuleName ,output )
722726 outputModule = getattr (self .process ,outputModuleName )
723727 setattr (self .process ,outputModuleName + '_step' ,cms .EndPath (outputModule ))
0 commit comments