16 Creates and returns a repack process 20 - outputs : defines output modules 26 process = cms.Process(
"REPACK")
27 process.load(
"FWCore.MessageLogger.MessageLogger_cfi")
29 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
31 process.configurationMetadata = cms.untracked.PSet(
32 name = cms.untracked.string(
"repack-config"),
33 version = cms.untracked.string(
"none"),
34 annotation = cms.untracked.string(
"auto generated configuration")
37 process.options = cms.untracked.PSet(
38 Rethrow = cms.untracked.vstring(
"ProductNotFound",
"TooManyProducts",
"TooFewProducts"),
39 wantSummary = cms.untracked.bool(
False)
42 process.source = cms.Source(
43 "NewEventStreamFileReader",
44 fileNames = cms.untracked.vstring()
47 defaultDataTier =
"RAW" 50 dataTier = args.get(
'dataTier', defaultDataTier)
51 eventContent = RAWEventContent
52 if dataTier ==
"HLTSCOUT":
53 eventContent = HLTSCOUTEventContent
54 elif dataTier ==
"L1SCOUT":
55 eventContent = L1SCOUTEventContent
57 outputs = args.get(
'outputs', [])
60 process.outputPath = cms.EndPath()
62 for output
in outputs:
64 moduleLabel = output[
'moduleLabel']
65 selectEvents = output.get(
'selectEvents',
None)
66 maxSize = output.get(
'maxSize',
None)
68 outputModule = cms.OutputModule(
70 compressionAlgorithm=copy.copy(eventContent.compressionAlgorithm),
71 compressionLevel=copy.copy(eventContent.compressionLevel),
72 fileName = cms.untracked.string(
"%s.root" % moduleLabel)
76 outputModule.dataset = cms.untracked.PSet(dataTier = cms.untracked.string(dataTier))
79 outputModule.maxSize = cms.untracked.int32(maxSize)
81 if selectEvents !=
None:
82 outputModule.SelectEvents = cms.untracked.PSet(
83 SelectEvents = cms.vstring(selectEvents)
86 setattr(process, moduleLabel, outputModule)
88 process.outputPath += outputModule