File indexing completed on 2024-04-06 12:12:40
0001
0002 import FWCore.ParameterSet.Config as cms
0003 import sys
0004 import argparse
0005
0006 parser = argparse.ArgumentParser(prog=sys.argv[0], description='Test InputSource Declaring last run or lumi entry for merge')
0007
0008 parser.add_argument("--enableDeclareLast", action="store_true", help="Declare last entry for merge")
0009 parser.add_argument("--enableDeclareAllLast", action="store_true", help="Declare all entries as last for merge (force intentional source bug)")
0010 parser.add_argument("--multipleEntriesForRun", type=int)
0011 parser.add_argument("--multipleEntriesForLumi", type=int)
0012
0013 args = parser.parse_args()
0014
0015 process = cms.Process("PROD")
0016
0017 process.options = dict(
0018 numberOfThreads = 2,
0019 numberOfStreams = 2,
0020 numberOfConcurrentRuns = 1,
0021 numberOfConcurrentLuminosityBlocks = 2
0022 )
0023
0024 process.Tracer = cms.Service("Tracer",
0025 printTimestamps = cms.untracked.bool(True)
0026 )
0027
0028 process.source = cms.Source("SourceWithWaits",
0029 timePerLumi = cms.untracked.double(1),
0030 sleepAfterStartOfRun = cms.untracked.double(0.25),
0031 eventsPerLumi = cms.untracked.vuint32(4,0,5,4,0,5),
0032 lumisPerRun = cms.untracked.uint32(3),
0033 declareLast = cms.untracked.bool(False),
0034 declareAllLast = cms.untracked.bool(False),
0035 multipleEntriesForLumi = cms.untracked.uint32(0),
0036 multipleEntriesForRun = cms.untracked.uint32(0)
0037 )
0038
0039 if args.enableDeclareLast:
0040 process.source.declareLast = True
0041
0042 if args.enableDeclareAllLast:
0043 process.source.declareAllLast = True
0044
0045 if args.multipleEntriesForLumi is not None:
0046 process.source.multipleEntriesForLumi = args.multipleEntriesForLumi
0047
0048 if args.multipleEntriesForRun is not None:
0049 process.source.multipleEntriesForRun = args.multipleEntriesForRun
0050
0051 process.sleepingProducer = cms.EDProducer("timestudy::SleepingProducer",
0052 ivalue = cms.int32(1),
0053 consumes = cms.VInputTag(),
0054 eventTimes = cms.vdouble(0.1, 0.1, 0.6, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1)
0055 )
0056
0057 process.p = cms.Path(process.sleepingProducer)