5 Module that generates standard repack configurations 9 import FWCore.ParameterSet.Config
as cms
16 Creates and returns a repack process 20 - outputs : defines output modules 23 process = cms.Process(
"REPACK")
24 process.load(
"FWCore.MessageLogger.MessageLogger_cfi")
26 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
28 process.configurationMetadata = cms.untracked.PSet(
29 name = cms.untracked.string(
"repack-config"),
30 version = cms.untracked.string(
"none"),
31 annotation = cms.untracked.string(
"auto generated configuration")
34 process.options = cms.untracked.PSet(
35 Rethrow = cms.untracked.vstring(
"ProductNotFound",
"TooManyProducts",
"TooFewProducts"),
36 wantSummary = cms.untracked.bool(
False)
39 process.source = cms.Source(
40 "NewEventStreamFileReader",
41 fileNames = cms.untracked.vstring()
44 outputs = args.get(
'outputs', [])
47 process.outputPath = cms.EndPath()
49 for output
in outputs:
51 moduleLabel = output[
'moduleLabel']
52 selectEvents = output.get(
'selectEvents',
None)
53 maxSize = output.get(
'maxSize',
None)
55 outputModule = cms.OutputModule(
57 fileName = cms.untracked.string(
"%s.root" % moduleLabel)
60 outputModule.dataset = cms.untracked.PSet(dataTier = cms.untracked.string(
"RAW"))
63 outputModule.maxSize = cms.untracked.int32(maxSize)
65 if selectEvents !=
None:
66 outputModule.SelectEvents = cms.untracked.PSet(
67 SelectEvents = cms.vstring(selectEvents)
70 setattr(process, moduleLabel, outputModule)
72 process.outputPath += outputModule