Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-08-06 22:16:07

0001 import FWCore.ParameterSet.Config as cms
0002 import argparse
0003 
0004 parser = argparse.ArgumentParser(description="Merge files in edmProvDump test")
0005 parser.add_argument("--process", default="MERGE", help="Process name")
0006 parser.add_argument("--file", action="append", type=str, help="Files to merge")
0007 parser.add_argument("--output", default="merged_files.root", help="Output file name")
0008 parser.add_argument("--ivalue", type=int, default=11, help="Value for one tracked parameter")
0009 parser.add_argument("--version", type=str, help="CMSSW version to be used in the ProcessHistory (default is unset")
0010 args = parser.parse_args()
0011 
0012 process = cms.Process(args.process)
0013 if args.version:
0014     process._specialOverrideReleaseVersionOnlyForTesting(args.version)
0015 
0016 from IOPool.Input.modules import PoolSource
0017 process.source = PoolSource(
0018     fileNames = ["file:"+f for f in args.file],
0019 )
0020 
0021 from IOPool.Output.modules import PoolOutputModule
0022 process.out = PoolOutputModule(fileName = args.output)
0023 
0024 from FWCore.Framework.modules import IntVectorProducer
0025 process.intVectorProducer = IntVectorProducer(
0026   count = 9,
0027   ivalue = args.ivalue
0028 )
0029 
0030 process.p = cms.Path(process.intVectorProducer)
0031 process.ep = cms.EndPath(process.out)