5 Module that generates standard repack configurations 9 import FWCore.ParameterSet.Config
as cms
17 Creates and returns a repack process 21 - outputs : defines output modules 24 process = cms.Process(
"REPACK")
25 process.load(
"FWCore.MessageLogger.MessageLogger_cfi")
27 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
29 process.configurationMetadata = cms.untracked.PSet(
30 name = cms.untracked.string(
"repack-config"),
31 version = cms.untracked.string(
"none"),
32 annotation = cms.untracked.string(
"auto generated configuration")
35 process.options = cms.untracked.PSet(
36 Rethrow = cms.untracked.vstring(
"ProductNotFound",
"TooManyProducts",
"TooFewProducts"),
37 wantSummary = cms.untracked.bool(
False)
40 process.source = cms.Source(
41 "NewEventStreamFileReader",
42 fileNames = cms.untracked.vstring()
45 outputs = args.get(
'outputs', [])
48 process.outputPath = cms.EndPath()
50 for output
in outputs:
52 moduleLabel = output[
'moduleLabel']
53 selectEvents = output.get(
'selectEvents',
None)
54 maxSize = output.get(
'maxSize',
None)
56 outputModule = cms.OutputModule(
59 fileName = cms.untracked.string(
"%s.root" % moduleLabel)
62 outputModule.dataset = cms.untracked.PSet(dataTier = cms.untracked.string(
"RAW"))
65 outputModule.maxSize = cms.untracked.int32(maxSize)
67 if selectEvents !=
None:
68 outputModule.SelectEvents = cms.untracked.PSet(
69 SelectEvents = cms.vstring(selectEvents)
72 setattr(process, moduleLabel, outputModule)
74 process.outputPath += outputModule