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
|
import FWCore.ParameterSet.Config as cms
process = cms.Process("TEST")
# instantiate & configure message logger service
process.MessageLogger = cms.Service("MessageLogger",
cerr = cms.untracked.PSet(
enable = cms.untracked.bool(False)
),
cout = cms.untracked.PSet(
enable = cms.untracked.bool(True),
threshold = cms.untracked.string('INFO')
)
)
# define prescale table: three rows (paths), three columns (scenarios)
prescaleTable = cms.VPSet(
cms.PSet(
pathName = cms.string('HLT2'),
prescales = cms.vuint32(2, 5, 10)
),
cms.PSet(
pathName = cms.string('HLT3'),
prescales = cms.vuint32(5, 10, 20)
),
cms.PSet(
pathName = cms.string('HLT4'),
prescales = cms.vuint32(10, 20, 0)
)
)
# instantiate prescale service and configure with above defined table
process.load("FWCore.PrescaleService.PrescaleService_cfi")
process.PrescaleService.prescaleTable = prescaleTable
process.PrescaleService.lvl1Labels = cms.vstring('10E30','10E31','10E32')
process.PrescaleService.lvl1DefaultLabel = cms.string('10E31')
# empty source for testing
process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(100))
process.source = cms.Source("EmptySource")
# define modules
process.psHLT1 = cms.EDFilter("HLTPrescaler",
L1GtReadoutRecordTag = cms.InputTag('source')
)
process.psHLT2 = cms.EDFilter("HLTPrescaler",
L1GtReadoutRecordTag = cms.InputTag('source')
)
process.psHLT3 = cms.EDFilter("HLTPrescaler",
L1GtReadoutRecordTag = cms.InputTag('source')
)
process.psHLT4 = cms.EDFilter("HLTPrescaler",
L1GtReadoutRecordTag = cms.InputTag('source')
)
# define paths
process.HLT1 = cms.Path(process.psHLT1)
process.HLT2 = cms.Path(process.psHLT2)
process.HLT3 = cms.Path(process.psHLT3)
process.HLT4 = cms.Path(process.psHLT4)
|