Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-12 01:51:32

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 import argparse
0004 import sys
0005 parser = argparse.ArgumentParser(prog=sys.argv[0], description="Test PoolOutputModule")
0006 parser.add_argument("--firstLumi", type=int, default=None, help="Set first lumi to process ")
0007 
0008 argv = sys.argv[:]
0009 if '--' in argv:
0010     argv.remove("--")
0011 args, unknown = parser.parse_known_args(argv)
0012 
0013 
0014 process = cms.Process("TESTOUTPUT")
0015 process.load("FWCore.Framework.test.cmsExceptionsFatal_cff")
0016 
0017 process.maxEvents.input = 20
0018 
0019 process.Thing = cms.EDProducer("ThingProducer")
0020 
0021 process.OtherThing = cms.EDProducer("OtherThingProducer")
0022 
0023 process.output = cms.OutputModule("PoolOutputModule",
0024     fileName = cms.untracked.string('file:PoolOutputTest.root')
0025 )
0026 
0027 process.source = cms.Source("EmptySource")
0028 if args.firstLumi is not None:
0029     process.source.firstLuminosityBlock = cms.untracked.uint32(args.firstLumi)
0030     process.output.fileName = "file:PoolOutputTestLumi{}.root".format(args.firstLumi)
0031 
0032 process.p = cms.Path(process.Thing*process.OtherThing)
0033 process.ep = cms.EndPath(process.output)
0034 
0035