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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
#test fallback logic when current process does not produce the product
import FWCore.ParameterSet.Config as cms
process = cms.Process("FALLBACK4")
from IOPool.Input.modules import PoolSource
process.source = PoolSource(
fileNames = cms.untracked.vstring(
'file:testNoProcessFallback2.root',
)
)
process.maxEvents.input = 4
# The matrix of passed Events for the three processes (X is pass, - is fail)
# EventID FALLBACK1 FALLBACK2 FALLBACK4
# (1,1,1) - - -
# (1,1,2) X - -
# (1,1,3) - X -
# (1,1,4) X X -
process.testerNoProcessMissing = cms.EDAnalyzer("BuiltinIntTestAnalyzer",
moduleLabel = cms.untracked.InputTag("intProducer"),
valueMustBeMissing = cms.untracked.bool(True),
valueMustMatch = cms.untracked.int32(1) # Ignored if valueMustBeMissing is true
)
process.testerSkipCurrentProcessMissing = cms.EDAnalyzer("BuiltinIntTestAnalyzer",
moduleLabel = cms.untracked.InputTag("intProducer", processName=cms.InputTag.skipCurrentProcess()),
valueMustBeMissing = cms.untracked.bool(True),
valueMustMatch = cms.untracked.int32(1) # Ignored if valueMustBeMissing is true
)
process.testerCurrentProcessMissing = cms.EDAnalyzer("BuiltinIntTestAnalyzer",
moduleLabel = cms.untracked.InputTag("intProducer", processName=cms.InputTag.currentProcess()),
valueMustBeMissing = cms.untracked.bool(True),
valueMustMatch = cms.untracked.int32(1) # Ignored if valueMustBeMissing is true
)
from FWCore.Modules.modules import EventIDFilter
process.keeper1 = EventIDFilter(
eventsToPass = [cms.EventID(1,1,1)]
)
process.p1 = cms.Path(process.keeper1 + process.testerNoProcessMissing + process.testerSkipCurrentProcessMissing + process.testerCurrentProcessMissing)
process.testerNoProcess1 = cms.EDAnalyzer("BuiltinIntTestAnalyzer",
moduleLabel = cms.untracked.InputTag("intProducer"),
valueMustMatch = cms.untracked.int32(1),
valueMustBeMissing = cms.untracked.bool(False)
)
process.testerSkipCurrentProcess1 = cms.EDAnalyzer("BuiltinIntTestAnalyzer",
moduleLabel = cms.untracked.InputTag("intProducer", processName=cms.InputTag.skipCurrentProcess()),
valueMustMatch = cms.untracked.int32(1),
valueMustBeMissing = cms.untracked.bool(False)
)
process.keeper2 = EventIDFilter(
eventsToPass = [cms.EventID(1,1,2)]
)
process.p2 = cms.Path(process.keeper2 + process.testerNoProcess1 + process.testerSkipCurrentProcess1 + process.testerCurrentProcessMissing)
process.keeper3 = EventIDFilter(
eventsToPass = [cms.EventID(1,1,3)]
)
process.testerNoProcess2 = cms.EDAnalyzer("BuiltinIntTestAnalyzer",
moduleLabel = cms.untracked.InputTag("intProducer"),
valueMustMatch = cms.untracked.int32(2),
valueMustBeMissing = cms.untracked.bool(False)
)
process.testerSkipCurrentProcess2 = cms.EDAnalyzer("BuiltinIntTestAnalyzer",
moduleLabel = cms.untracked.InputTag("intProducer", processName=cms.InputTag.skipCurrentProcess()),
valueMustMatch = cms.untracked.int32(2),
valueMustBeMissing = cms.untracked.bool(False)
)
process.p3 = cms.Path(process.keeper3 + process.testerNoProcess2 + process.testerSkipCurrentProcess2 + process.testerCurrentProcessMissing)
process.keeper4 = EventIDFilter(
eventsToPass = [cms.EventID(1,1,4)]
)
process.p4 = cms.Path(process.keeper4 + process.testerNoProcess2 + process.testerSkipCurrentProcess2 + process.testerCurrentProcessMissing)
#from FWCore.Modules.modules import EventContentAnalyzer
#process.dump = EventContentAnalyzer()
#process.dumpPath = cms.Path(process.dump)
|