diff --git a/Configuration/EventContent/python/EventContent_cff.py b/Configuration/EventContent/python/EventContent_cff.py index 15ed6dd71c374..6412b106d654f 100644 --- a/Configuration/EventContent/python/EventContent_cff.py +++ b/Configuration/EventContent/python/EventContent_cff.py @@ -879,6 +879,7 @@ def SwapKeepAndDrop(l): compressionLevel=cms.untracked.int32(4) ) MINIAODEventContent.outputCommands.extend(MicroEventContent.outputCommands) +MINIAODEventContent.outputCommands.extend(HLTriggerMINIAOD.outputCommands) MINIAODSIMEventContent= cms.PSet( outputCommands = cms.untracked.vstring('drop *'), @@ -887,7 +888,7 @@ def SwapKeepAndDrop(l): compressionLevel=cms.untracked.int32(4) ) MINIAODSIMEventContent.outputCommands.extend(MicroEventContentMC.outputCommands) -MINIAODSIMEventContent.outputCommands.extend(HLTScouting.outputCommands) +MINIAODSIMEventContent.outputCommands.extend(HLTriggerMINIAOD.outputCommands) MINIGENEventContent= cms.PSet( outputCommands = cms.untracked.vstring('drop *'), diff --git a/HLTrigger/Configuration/python/HLTrigger_EventContent_cff.py b/HLTrigger/Configuration/python/HLTrigger_EventContent_cff.py index 324b8b712053c..a5c42c910e7c1 100644 --- a/HLTrigger/Configuration/python/HLTrigger_EventContent_cff.py +++ b/HLTrigger/Configuration/python/HLTrigger_EventContent_cff.py @@ -1,15 +1,16 @@ import FWCore.ParameterSet.Config as cms -# EventContent for HLT related products. +# EventContent for HLT-related products. # This file exports the following EventContent blocks: -# HLTriggerRAW HLTriggerRECO HLTriggerAOD (without DEBUG products) -# HLTDebugRAW HLTDebugFEVT (with DEBUG products) -# HLTScouting (with Scouting products) +# HLTrigger(RAW|RECO|AOD|MINIAOD) [without DEBUG products] +# HLTDebug(RAW|FEVT) [with DEBUG products] +# HLTScouting [only Scouting products] # # as these are used in Configuration/EventContent # -HLTriggerRAW = cms.PSet( + +HLTriggerRAW = cms.PSet( outputCommands = cms.vstring( *( 'drop *_hlt*_*_*', 'keep FEDRawDataCollection_rawDataCollector_*_*', @@ -43,7 +44,7 @@ ) ) ) -HLTriggerAOD = cms.PSet( +HLTriggerAOD = cms.PSet( outputCommands = cms.vstring( *( 'drop *_hlt*_*_*', 'keep GlobalObjectMapRecord_hltGtStage2ObjectMap_*_*', @@ -59,7 +60,20 @@ ) ) ) -HLTDebugRAW = cms.PSet( +HLTriggerMINIAOD = cms.PSet( + outputCommands = cms.vstring( *( + 'drop *_hlt*_*_*', + 'keep *_hltFEDSelectorL1_*_*', + 'keep *_hltScoutingEgammaPacker_*_*', + 'keep *_hltScoutingMuonPacker_*_*', + 'keep *_hltScoutingPFPacker_*_*', + 'keep *_hltScoutingPrimaryVertexPacker_*_*', + 'keep *_hltScoutingTrackPacker_*_*', + 'keep edmTriggerResults_*_*_*' + ) ) +) + +HLTDebugRAW = cms.PSet( outputCommands = cms.vstring( *( 'drop *_hlt*_*_*', 'keep *_hltAK4CaloJetsCorrectedIDPassed_*_*', @@ -224,7 +238,7 @@ ) ) ) -HLTDebugFEVT = cms.PSet( +HLTDebugFEVT = cms.PSet( outputCommands = cms.vstring( *( 'drop *_hlt*_*_*', 'keep *_hltAK4CaloJetsCorrectedIDPassed_*_*', @@ -389,7 +403,7 @@ ) ) ) -HLTScouting = cms.PSet( +HLTScouting = cms.PSet( outputCommands = cms.vstring( *( 'keep *_hltFEDSelectorL1_*_*', 'keep *_hltScoutingEgammaPacker_*_*', @@ -400,4 +414,3 @@ 'keep edmTriggerResults_*_*_*' ) ) ) - diff --git a/HLTrigger/Configuration/test/getEventContent.py b/HLTrigger/Configuration/test/getEventContent.py index 5ecbb5c6a5ad0..2c2a08f0aac87 100755 --- a/HLTrigger/Configuration/test/getEventContent.py +++ b/HLTrigger/Configuration/test/getEventContent.py @@ -195,7 +195,8 @@ def printHLTriggerEventContentCff(process): # the Scouting streams have the Scouting outputs hltOutputScouting_cff.block_hltOutputScoutingPF.outputCommands, ) - hltScoutingOutputContent = buildPSetNoDrop(hltScoutingOutputBlocks) + hltScoutingOutputContent = buildPSet(hltScoutingOutputBlocks) + hltScoutingOutputContentNoDrop = buildPSetNoDrop(hltScoutingOutputBlocks) # hltDefaultOutput if not hasattr(hltOutputA_cff,'block_hltOutputA'): @@ -214,61 +215,73 @@ def printHLTriggerEventContentCff(process): outputCommands = cms.vstring() ) HLTriggerRAW.outputCommands.extend(hltDefaultOutputWithFEDsContent.outputCommands) - HLTriggerRAW.outputCommands.extend(hltScoutingOutputContent.outputCommands) + HLTriggerRAW.outputCommands.extend(hltScoutingOutputContentNoDrop.outputCommands) # RECO event content HLTriggerRECO = cms.PSet( outputCommands = cms.vstring() ) HLTriggerRECO.outputCommands.extend(hltDefaultOutputContent.outputCommands) - HLTriggerRECO.outputCommands.extend(hltScoutingOutputContent.outputCommands) + HLTriggerRECO.outputCommands.extend(hltScoutingOutputContentNoDrop.outputCommands) # AOD event content HLTriggerAOD = cms.PSet( outputCommands = cms.vstring() ) HLTriggerAOD.outputCommands.extend(hltDefaultOutputContent.outputCommands) - HLTriggerAOD.outputCommands.extend(hltScoutingOutputContent.outputCommands) + HLTriggerAOD.outputCommands.extend(hltScoutingOutputContentNoDrop.outputCommands) dropL1GlobalTriggerObjectMapRecord(HLTriggerAOD) + # MINIAOD event content + HLTriggerMINIAOD = cms.PSet( + outputCommands = cms.vstring() + ) + HLTriggerMINIAOD.outputCommands.extend(hltScoutingOutputContent.outputCommands) + # HLTDEBUG RAW event content HLTDebugRAW = cms.PSet( outputCommands = cms.vstring() ) HLTDebugRAW.outputCommands.extend(hltDebugWithAlCaOutputContent.outputCommands) - HLTDebugRAW.outputCommands.extend(hltScoutingOutputContent.outputCommands) + HLTDebugRAW.outputCommands.extend(hltScoutingOutputContentNoDrop.outputCommands) # HLTDEBUG FEVT event content HLTDebugFEVT = cms.PSet( outputCommands = cms.vstring() ) HLTDebugFEVT.outputCommands.extend(hltDebugWithAlCaOutputContent.outputCommands) - HLTDebugFEVT.outputCommands.extend(hltScoutingOutputContent.outputCommands) + HLTDebugFEVT.outputCommands.extend(hltScoutingOutputContentNoDrop.outputCommands) # Scouting event content HLTScouting = cms.PSet( outputCommands = cms.vstring() ) - HLTScouting.outputCommands.extend(hltScoutingOutputContent.outputCommands) + HLTScouting.outputCommands.extend(hltScoutingOutputContentNoDrop.outputCommands) # print the expanded event content configurations to stdout print('''import FWCore.ParameterSet.Config as cms -# EventContent for HLT related products. +# EventContent for HLT-related products. # This file exports the following EventContent blocks: -# HLTriggerRAW HLTriggerRECO HLTriggerAOD (without DEBUG products) -# HLTDebugRAW HLTDebugFEVT (with DEBUG products) -# HLTScouting (with Scouting products) +# HLTrigger(RAW|RECO|AOD|MINIAOD) [without DEBUG products] +# HLTDebug(RAW|FEVT) [with DEBUG products] +# HLTScouting [only Scouting products] # # as these are used in Configuration/EventContent #''') - print('HLTriggerRAW = cms.PSet(\n outputCommands = cms.vstring( *(\n%s\n ) )\n)\n' % ',\n'.join( ' \'%s\'' % keep for keep in HLTriggerRAW.outputCommands)) - print('HLTriggerRECO = cms.PSet(\n outputCommands = cms.vstring( *(\n%s\n ) )\n)\n' % ',\n'.join( ' \'%s\'' % keep for keep in HLTriggerRECO.outputCommands)) - print('HLTriggerAOD = cms.PSet(\n outputCommands = cms.vstring( *(\n%s\n ) )\n)\n' % ',\n'.join( ' \'%s\'' % keep for keep in HLTriggerAOD.outputCommands)) - print('HLTDebugRAW = cms.PSet(\n outputCommands = cms.vstring( *(\n%s\n ) )\n)\n' % ',\n'.join( ' \'%s\'' % keep for keep in HLTDebugRAW.outputCommands)) - print('HLTDebugFEVT = cms.PSet(\n outputCommands = cms.vstring( *(\n%s\n ) )\n)\n' % ',\n'.join( ' \'%s\'' % keep for keep in HLTDebugFEVT.outputCommands)) - print('HLTScouting = cms.PSet(\n outputCommands = cms.vstring( *(\n%s\n ) )\n)\n' % ',\n'.join( ' \'%s\'' % keep for keep in HLTScouting.outputCommands)) + + def psetString(name, outputCommands): + str_products = ',\n'.join(f' \'{str_cmd}\'' for str_cmd in outputCommands) + return f'\n{name} = cms.PSet(\n outputCommands = cms.vstring( *(\n{str_products}\n ) )\n)' + + print(psetString('HLTriggerRAW', HLTriggerRAW.outputCommands)) + print(psetString('HLTriggerRECO', HLTriggerRECO.outputCommands)) + print(psetString('HLTriggerAOD', HLTriggerAOD.outputCommands)) + print(psetString('HLTriggerMINIAOD', HLTriggerMINIAOD.outputCommands)) + print(psetString('HLTDebugRAW', HLTDebugRAW.outputCommands)) + print(psetString('HLTDebugFEVT', HLTDebugFEVT.outputCommands)) + print(psetString('HLTScouting', HLTScouting.outputCommands)) ### ### main