Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
# The purpose of this is to test the case where a
# file ends with an empty run (no lumis) and we
# go into another file and process things.
# This tests a rarely hit code path in processRuns.

import FWCore.ParameterSet.Config as cms

process = cms.Process("PROD3")

from IOPool.Input.modules import PoolSource
process.source = PoolSource(
    fileNames = [
        'file:testGetByRunsMode.root',
        'file:testGetBy1.root'
    ],
    inputCommands = [
        'keep *',
        'drop *_*_*_PROD2'
    ]
)

from IOPool.Output.modules import PoolOutputModule
process.out = PoolOutputModule(fileName = 'testGetByWithEmptyRun.root')

from FWCore.Framework.modules import RunLumiEventAnalyzer
process.test = RunLumiEventAnalyzer(
    verbose = True,
    expectedRunLumiEvents = [
1, 0, 0,
1, 0, 0,
1, 0, 0,
1, 1, 0,
1, 1, 1,
1, 1, 2,
1, 1, 3,
1, 1, 0,
1, 0, 0
]
)

process.p1 = cms.Path(process.test)

process.e1 = cms.EndPath(process.out)