Skip to content

Commit 4263a32

Browse files
committed
Modernize test configurations that use RunLumiEventAnalyzer
1 parent a969e1e commit 4263a32

28 files changed

+626
-736
lines changed

FWCore/Integration/test/readSubProcessOutput_cfg.py

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,42 @@
22

33
process = cms.Process("READ")
44

5-
process.source = cms.Source("PoolSource",
6-
fileNames = cms.untracked.vstring("file:testSubProcess.root")
7-
)
5+
from IOPool.Input.modules import PoolSource
6+
process.source = PoolSource(fileNames = "file:testSubProcess.root")
87

9-
process.out = cms.OutputModule("PoolOutputModule",
10-
fileName = cms.untracked.string(
11-
'readSubprocessOutput.root'
12-
)
13-
)
8+
from IOPool.Output.modules import PoolOutputModule
9+
process.out = PoolOutputModule(fileName = 'readSubprocessOutput.root')
1410

1511

12+
from FWCore.Framework.modules import TestMergeResults, RunLumiEventAnalyzer
1613
# Reusing some code I used for testing merging, although in this
1714
# context it has nothing to do with merging.
1815
# Here we are checking the event, run, and lumi products
1916
# from the last subprocess in the chain of subprocesses
2017
# are there.
21-
process.testproducts = cms.EDAnalyzer("TestMergeResults",
22-
23-
expectedBeginRunProd = cms.untracked.vint32(
18+
process.testproducts = TestMergeResults(
19+
expectedBeginRunProd = [
2420
10001, 10002, 10003, # end run 1
2521
10001, 10002, 10003, # end run 2
2622
10001, 10002, 10003 # end run 3
27-
),
23+
],
2824

29-
expectedEndRunProd = cms.untracked.vint32(
25+
expectedEndRunProd = [
3026
100001, 100002, 100003, # end run 1
3127
100001, 100002, 100003, # end run 2
3228
100001, 100002, 100003 # end run 3
33-
),
29+
],
3430

35-
expectedBeginLumiProd = cms.untracked.vint32(
31+
expectedBeginLumiProd = [
3632
101, 102, 103 # end run 1 lumi 1
3733
# There are more, but all with the same pattern as the first
38-
),
34+
],
3935

40-
expectedEndLumiProd = cms.untracked.vint32(
36+
expectedEndLumiProd = [
4137
1001, 1002, 1003 # end run 1 lumi 1
42-
),
38+
],
4339

44-
expectedProcessHistoryInRuns = cms.untracked.vstring(
40+
expectedProcessHistoryInRuns = [
4541
'PROD', # Run 1
4642
'PROD2',
4743
'READ',
@@ -51,13 +47,13 @@
5147
'PROD', # Run 3
5248
'PROD2',
5349
'READ'
54-
),
55-
verbose = cms.untracked.bool(True)
50+
],
51+
verbose = True
5652
)
5753

58-
process.test = cms.EDAnalyzer('RunLumiEventAnalyzer',
59-
verbose = cms.untracked.bool(True),
60-
expectedRunLumiEvents = cms.untracked.vuint32(
54+
process.test = RunLumiEventAnalyzer(
55+
verbose = True,
56+
expectedRunLumiEvents = [
6157
1, 0, 0,
6258
1, 1, 0,
6359
1, 1, 1,
@@ -112,7 +108,7 @@
112108
3, 3, 10,
113109
3, 3, 0,
114110
3, 0, 0
115-
)
111+
]
116112
)
117113

118114
process.path1 = cms.Path(process.test*process.testproducts)

FWCore/Integration/test/testGetByWithEmptyRun_cfg.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,25 @@
77

88
process = cms.Process("PROD3")
99

10-
process.source = cms.Source("PoolSource",
11-
fileNames = cms.untracked.vstring(
10+
from IOPool.Input.modules import PoolSource
11+
process.source = PoolSource(
12+
fileNames = [
1213
'file:testGetByRunsMode.root',
1314
'file:testGetBy1.root'
14-
),
15-
inputCommands=cms.untracked.vstring(
15+
],
16+
inputCommands = [
1617
'keep *',
1718
'drop *_*_*_PROD2'
18-
)
19+
]
1920
)
2021

21-
process.out = cms.OutputModule("PoolOutputModule",
22-
fileName = cms.untracked.string('testGetByWithEmptyRun.root')
23-
)
22+
from IOPool.Output.modules import PoolOutputModule
23+
process.out = PoolOutputModule(fileName = 'testGetByWithEmptyRun.root')
2424

25-
process.test = cms.EDAnalyzer('RunLumiEventAnalyzer',
26-
verbose = cms.untracked.bool(True),
27-
expectedRunLumiEvents = cms.untracked.vuint32(
25+
from FWCore.Framework.modules import RunLumiEventAnalyzer
26+
process.test = RunLumiEventAnalyzer(
27+
verbose = True,
28+
expectedRunLumiEvents = [
2829
1, 0, 0,
2930
1, 0, 0,
3031
1, 0, 0,
@@ -34,7 +35,7 @@
3435
1, 1, 3,
3536
1, 1, 0,
3637
1, 0, 0
37-
)
38+
]
3839
)
3940

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

FWCore/Integration/test/testLooperEventNavigation1_cfg.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import FWCore.ParameterSet.Config as cms
66

77
process = cms.Process("TEST")
8-
9-
process.load("FWCore.MessageService.MessageLogger_cfi")
108
process.MessageLogger.cerr.FwkReport.reportEvery = 1000
119
process.MessageLogger.cerr.threshold = 'ERROR'
1210

@@ -15,24 +13,25 @@
1513
Rethrow = FWCore.Framework.test.cmsExceptionsFatalOption_cff.Rethrow
1614
)
1715

18-
process.source = cms.Source("PoolSource",
19-
fileNames = cms.untracked.vstring(
16+
from IOPool.Input.modules import PoolSource
17+
process.source = PoolSource(
18+
fileNames = [
2019
'file:testRunMerge1.root',
2120
'file:testRunMerge2.root'
22-
)
23-
#, processingMode = cms.untracked.string('RunsAndLumis')
24-
#, duplicateCheckMode = cms.untracked.string('checkEachRealDataFile')
25-
, noEventSort = cms.untracked.bool(True)
26-
, inputCommands = cms.untracked.vstring(
21+
]
22+
#, processingMode = 'RunsAndLumis'
23+
#, duplicateCheckMode = 'checkEachRealDataFile'
24+
, noEventSort = True
25+
, inputCommands = [
2726
'keep *',
2827
'drop edmtestThingWithMerge_makeThingToBeDropped1_*_*'
29-
)
28+
]
3029
)
3130

32-
33-
process.test = cms.EDAnalyzer('RunLumiEventAnalyzer',
34-
verbose = cms.untracked.bool(True)
35-
, expectedRunLumiEvents = cms.untracked.vuint32(
31+
from FWCore.Framework.modules import RunLumiEventAnalyzer
32+
process.test = RunLumiEventAnalyzer(
33+
verbose = True
34+
, expectedRunLumiEvents = [
3635
1, 0, 0,
3736
1, 1, 0,
3837
1, 1, 11,
@@ -62,14 +61,15 @@
6261
1, 1, 21,
6362
1, 1, 0,
6463
1, 0, 0
65-
)
64+
]
6665
)
6766

6867
process.looper = cms.Looper("NavigateEventsLooper")
6968

70-
process.out = cms.OutputModule("PoolOutputModule",
71-
fileName = cms.untracked.string('file:testLooperEventNavigation.root'),
72-
fastCloning = cms.untracked.bool(False)
69+
from IOPool.Output.modules import PoolOutputModule
70+
process.out = PoolOutputModule(
71+
fileName = 'testLooperEventNavigation.root',
72+
fastCloning = False
7373
)
7474

7575
process.path1 = cms.Path(process.test)

FWCore/Integration/test/testLooperEventNavigation_cfg.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
import FWCore.ParameterSet.Config as cms
22

33
process = cms.Process("TEST")
4-
5-
process.load("FWCore.MessageService.MessageLogger_cfi")
64
process.MessageLogger.cerr.FwkReport.reportEvery = 1000
75
process.MessageLogger.cerr.threshold = 'ERROR'
86

9-
process.source = cms.Source("PoolSource",
10-
fileNames = cms.untracked.vstring(
7+
from IOPool.Input.modules import PoolSource
8+
process.source = PoolSource(
9+
fileNames = [
1110
'file:testRunMerge1.root',
1211
'file:testRunMerge2.root'
13-
)
14-
#, processingMode = cms.untracked.string('RunsAndLumis')
15-
#, duplicateCheckMode = cms.untracked.string('checkEachRealDataFile')
16-
, noEventSort = cms.untracked.bool(False)
17-
, inputCommands = cms.untracked.vstring(
12+
]
13+
#, processingMode = 'RunsAndLumis'
14+
#, duplicateCheckMode = 'checkEachRealDataFile'
15+
, noEventSort = False
16+
, inputCommands = [
1817
'keep *',
1918
'drop edmtestThingWithMerge_makeThingToBeDropped1_*_*'
20-
)
19+
]
2120
)
2221

23-
24-
process.test = cms.EDAnalyzer('RunLumiEventAnalyzer',
25-
verbose = cms.untracked.bool(True)
26-
, expectedRunLumiEvents = cms.untracked.vuint32(
22+
from FWCore.Framework.modules import RunLumiEventAnalyzer
23+
process.test = RunLumiEventAnalyzer(
24+
verbose = True
25+
, expectedRunLumiEvents = [
2726
1, 0, 0,
2827
1, 1, 0,
2928
1, 1, 11,
@@ -53,14 +52,15 @@
5352
1, 1, 21,
5453
1, 1, 0,
5554
1, 0, 0
56-
)
55+
]
5756
)
5857

5958
process.looper = cms.Looper("NavigateEventsLooper")
6059

61-
process.out = cms.OutputModule("PoolOutputModule",
62-
fileName = cms.untracked.string('file:testLooperEventNavigation.root'),
63-
fastCloning = cms.untracked.bool(False)
60+
from IOPool.Output.modules import PoolOutputModule
61+
process.out = PoolOutputModule(
62+
fileName = 'testLooperEventNavigation.root',
63+
fastCloning = False
6464
)
6565

6666
process.path1 = cms.Path(process.test)

FWCore/Integration/test/testRunMergeCOPY1_cfg.py

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
import FWCore.ParameterSet.Config as cms
99

1010
process = cms.Process("COPY")
11-
12-
process.load("FWCore.MessageService.MessageLogger_cfi")
1311
process.MessageLogger.cerr.FwkReport.reportEvery = 1000
1412
process.MessageLogger.cerr.threshold = 'ERROR'
1513

@@ -19,20 +17,21 @@
1917
Rethrow = FWCore.Framework.test.cmsExceptionsFatalOption_cff.Rethrow
2018
)
2119

22-
23-
process.source = cms.Source("PoolSource",
24-
fileNames = cms.untracked.vstring(
20+
from IOPool.Input.modules import PoolSource
21+
process.source = PoolSource(
22+
fileNames = [
2523
'file:testRunMergeRecombined.root',
2624
'file:testRunMergeRecombined.root'
27-
)
28-
, duplicateCheckMode = cms.untracked.string('checkEachFile')
29-
, skipEvents = cms.untracked.uint32(3)
30-
, noEventSort = cms.untracked.bool(False)
25+
]
26+
, duplicateCheckMode = 'checkEachFile'
27+
, skipEvents = 3
28+
, noEventSort = False
3129
)
3230

33-
process.test = cms.EDAnalyzer('RunLumiEventAnalyzer',
34-
verbose = cms.untracked.bool(True),
35-
expectedRunLumiEvents = cms.untracked.vuint32(
31+
from FWCore.Framework.modules import RunLumiEventAnalyzer
32+
process.test = RunLumiEventAnalyzer(
33+
verbose = True,
34+
expectedRunLumiEvents = [
3635
1, 0, 0,
3736
1, 1, 0,
3837
1, 1, 4,
@@ -113,7 +112,7 @@
113112
1, 1, 10,
114113
1, 1, 0,
115114
1, 0, 0
116-
)
115+
]
117116
)
118117
# At this point the first input file is done and
119118
# we start with the second input file here.
@@ -205,8 +204,7 @@
205204

206205
process.path1 = cms.Path(process.test)
207206

208-
process.out = cms.OutputModule("PoolOutputModule",
209-
fileName = cms.untracked.string('file:testRunMergeRecombinedCopied1.root')
210-
)
207+
from IOPool.Output.modules import PoolOutputModule
208+
process.out = PoolOutputModule(fileName = 'testRunMergeRecombinedCopied1.root')
211209

212210
process.endpath1 = cms.EndPath(process.out)

FWCore/Integration/test/testRunMergeCOPY_cfg.py

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
import FWCore.ParameterSet.Config as cms
99

1010
process = cms.Process("COPY")
11-
12-
process.load("FWCore.MessageService.MessageLogger_cfi")
1311
process.MessageLogger.cerr.FwkReport.reportEvery = 1000
1412
process.MessageLogger.cerr.threshold = 'ERROR'
1513

@@ -19,20 +17,21 @@
1917
Rethrow = FWCore.Framework.test.cmsExceptionsFatalOption_cff.Rethrow
2018
)
2119

22-
23-
process.source = cms.Source("PoolSource",
24-
fileNames = cms.untracked.vstring(
20+
from IOPool.Input.modules import PoolSource
21+
process.source = PoolSource(
22+
fileNames = [
2523
'file:testRunMergeRecombined.root',
2624
'file:testRunMergeRecombined.root'
27-
)
28-
, duplicateCheckMode = cms.untracked.string('checkAllFilesOpened')
29-
, skipEvents = cms.untracked.uint32(14)
30-
, noEventSort = cms.untracked.bool(False)
25+
]
26+
, duplicateCheckMode = 'checkAllFilesOpened'
27+
, skipEvents = 14
28+
, noEventSort = False
3129
)
3230

33-
process.test = cms.EDAnalyzer('RunLumiEventAnalyzer',
34-
verbose = cms.untracked.bool(True),
35-
expectedRunLumiEvents = cms.untracked.vuint32(
31+
from FWCore.Framework.modules import RunLumiEventAnalyzer
32+
process.test = RunLumiEventAnalyzer(
33+
verbose = True,
34+
expectedRunLumiEvents = [
3635
1, 0, 0,
3736
1, 1, 0,
3837
1, 1, 15,
@@ -102,7 +101,7 @@
102101
1, 1, 10,
103102
1, 1, 0,
104103
1, 0, 0
105-
)
104+
]
106105
)
107106
# At this point the first input file is done and
108107
# we start with the second input file here.
@@ -141,8 +140,7 @@
141140

142141
process.path1 = cms.Path(process.test)
143142

144-
process.out = cms.OutputModule("PoolOutputModule",
145-
fileName = cms.untracked.string('file:testRunMergeRecombinedCopied.root')
146-
)
143+
from IOPool.Output.modules import PoolOutputModule
144+
process.out = PoolOutputModule(fileName = 'testRunMergeRecombinedCopied.root')
147145

148146
process.endpath1 = cms.EndPath(process.out)

0 commit comments

Comments
 (0)