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
|
import FWCore.ParameterSet.Config as cms
import sys
process = cms.Process("READ")
process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring("file:"+sys.argv[1]))
process.maxEvents.input = 1
process.testReadTriggerEvent = cms.EDAnalyzer("TestReadTriggerEvent",
expectedUsedProcessName = cms.string("testName"),
expectedCollectionTags = cms.vstring('moduleA', 'moduleB', 'moduleC'),
expectedCollectionKeys = cms.vuint32(11, 21, 31),
expectedIds = cms.vint32(1, 3, 5),
# I stick to values exactly convertable from double to float
# to avoid potential rounding issues in the test.
# (configuration only supports double not float and
# the data format holds floats)
expectedPts = cms.vdouble(11.0, 21.0, 31.0),
expectedEtas = cms.vdouble(101.0, 102.0, 103.0),
expectedPhis = cms.vdouble(201.0, 202.0, 203.0),
expectedMasses = cms.vdouble(301.0, 302.0, 303.0),
expectedFilterTags = cms.vstring('moduleAA', 'moduleBB'),
expectedElementsPerVector = cms.uint32(2),
expectedFilterIds = cms.vint32(1001, 1002, 1003, 1004),
expectedFilterKeys = cms.vuint32(2001, 2002, 2003, 2004),
triggerEventTag = cms.InputTag("triggerEventProducer", "", "PROD")
)
process.out = cms.OutputModule("PoolOutputModule",
fileName = cms.untracked.string('testTriggerEvent2.root'),
fastCloning = cms.untracked.bool(False)
)
process.path = cms.Path(process.testReadTriggerEvent)
process.endPath = cms.EndPath(process.out)
|