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="SPLIT", help="Process name")
0006 parser.add_argument("--file", action="append", type=str, help="Input files")
0007 parser.add_argument("--lumi", type=int, help="If set, process only this LuminosityBlock")
0008 parser.add_argument("--output", default="merged_files.root", help="Output file name")
0009 parser.add_argument("--ivalue", type=int, default=11, help="Value for one tracked parameter")
0010 parser.add_argument("--version", type=str, help="CMSSW version to be used in the ProcessHistory (default is unset")
0011 args = parser.parse_args()
0012
0013 process = cms.Process(args.process)
0014 if args.version:
0015 process._specialOverrideReleaseVersionOnlyForTesting(args.version)
0016
0017 from IOPool.Input.modules import PoolSource
0018 process.source = PoolSource(
0019 fileNames = ["file:"+f for f in args.file],
0020 )
0021 if args.lumi:
0022 process.source.lumisToProcess = [cms.LuminosityBlockRange(1,args.lumi, 1,args.lumi)]
0023
0024 from IOPool.Output.modules import PoolOutputModule
0025 process.out = PoolOutputModule(fileName = args.output)
0026
0027 from FWCore.Framework.modules import IntVectorProducer
0028 process.intVectorProducer = IntVectorProducer(
0029 count = 9,
0030 ivalue = args.ivalue
0031 )
0032
0033 process.p = cms.Path(process.intVectorProducer)
0034 process.endp = cms.EndPath(process.out)