Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:08

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("GeometryWriter")
0004 
0005 process.load('CondCore.CondDB.CondDB_cfi')
0006 
0007 # geometry
0008 process.load("Geometry.VeryForwardGeometry.dd4hep.geometryRPFromDD_2017_cfi")
0009 
0010 process.source = cms.Source("EmptyIOVSource",
0011                             lastValue = cms.uint64(1),
0012                             timetype = cms.string('runnumber'),
0013                             firstValue = cms.uint64(1),
0014                             interval = cms.uint64(1)
0015                             )
0016 
0017 # This reads the big XML file and the only way to fill the
0018 # nonreco part of the database is to read this file.  It
0019 # somewhat duplicates the information read from the little
0020 # XML files, but there is no way to directly build the
0021 # DDCompactView from this.
0022 process.XMLGeometryWriter = cms.EDAnalyzer("XMLGeometryBuilder",
0023                                            XMLFileName = cms.untracked.string("./ge2017SingleBigFile.xml"),
0024                                            ZIP = cms.untracked.bool(True)
0025                                            )
0026 
0027 # DB writer
0028 process.ppsGeometryBuilder = cms.EDAnalyzer("PPSGeometryBuilder",
0029                                             fromDD4hep = cms.untracked.bool(True),
0030                                             isRun2 = cms.untracked.bool(True),
0031                                             compactViewTag = cms.untracked.string('XMLIdealGeometryESSource_CTPPS')
0032 )
0033 
0034 process.CondDB.timetype = cms.untracked.string('runnumber')
0035 process.CondDB.connect = cms.string('sqlite_file:myfile.db')
0036 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0037                                           process.CondDB,
0038                                           toPut = cms.VPSet(cms.PSet(record = cms.string('GeometryFileRcd'),
0039                                                                      tag = cms.string('XMLFILE_CTPPS_Geometry_2017_TagXX')),
0040                                                             cms.PSet(record = cms.string('VeryForwardIdealGeometryRecord'),
0041                                                                      tag = cms.string('PPSRECO_Geometry_2017_TagXX'))
0042                                                             )
0043                                           )
0044 
0045 process.maxEvents = cms.untracked.PSet(
0046     input = cms.untracked.int32(1)
0047     )
0048 
0049 process.p1 = cms.Path(process.XMLGeometryWriter+process.ppsGeometryBuilder)
0050