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
|
import FWCore.ParameterSet.Config as cms
process = cms.Process("GeometryWriter")
process.load('CondCore.CondDB.CondDB_cfi')
# geometry
process.load("Geometry.VeryForwardGeometry.dd4hep.geometryRPFromDD_2017_cfi")
process.source = cms.Source("EmptyIOVSource",
lastValue = cms.uint64(1),
timetype = cms.string('runnumber'),
firstValue = cms.uint64(1),
interval = cms.uint64(1)
)
# This reads the big XML file and the only way to fill the
# nonreco part of the database is to read this file. It
# somewhat duplicates the information read from the little
# XML files, but there is no way to directly build the
# DDCompactView from this.
process.XMLGeometryWriter = cms.EDAnalyzer("XMLGeometryBuilder",
XMLFileName = cms.untracked.string("./ge2017SingleBigFile.xml"),
ZIP = cms.untracked.bool(True)
)
# DB writer
process.ppsGeometryBuilder = cms.EDAnalyzer("PPSGeometryBuilder",
fromDD4hep = cms.untracked.bool(True),
isRun2 = cms.untracked.bool(True),
compactViewTag = cms.untracked.string('XMLIdealGeometryESSource_CTPPS')
)
process.CondDB.timetype = cms.untracked.string('runnumber')
process.CondDB.connect = cms.string('sqlite_file:myfile.db')
process.PoolDBOutputService = cms.Service("PoolDBOutputService",
process.CondDB,
toPut = cms.VPSet(cms.PSet(record = cms.string('GeometryFileRcd'),
tag = cms.string('XMLFILE_CTPPS_Geometry_2017_TagXX')),
cms.PSet(record = cms.string('VeryForwardIdealGeometryRecord'),
tag = cms.string('PPSRECO_Geometry_2017_TagXX'))
)
)
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(1)
)
process.p1 = cms.Path(process.XMLGeometryWriter+process.ppsGeometryBuilder)
|