Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-10-10 23:05:02

0001 import FWCore.ParameterSet.Config as cms
0002 import argparse
0003 import sys
0004 
0005 parser = argparse.ArgumentParser(prog=sys.argv[0], description='Generate XML geometry.')
0006 parser.add_argument("--tag", help="global tag to use", type=str)
0007 parser.add_argument("--out", help="part of out file name", type=str, default='Extended')
0008 parser.add_argument("--inPre", help="Prefix for input geometry file", type=str, default='ge')
0009 
0010 args = parser.parse_args()
0011 
0012 process = cms.Process("XMLGeometryWriter")
0013 
0014 process.load('CondCore.CondDB.CondDB_cfi')
0015 
0016 process.source = cms.Source("EmptyIOVSource",
0017                             lastValue = cms.uint64(1),
0018                             timetype = cms.string('runnumber'),
0019                             firstValue = cms.uint64(1),
0020                             interval = cms.uint64(1)
0021                             )
0022 
0023 process.XMLGeometryWriter = cms.EDAnalyzer("XMLGeometryBuilder",
0024                                            XMLFileName = cms.untracked.string("./"+args.inPre+"SingleBigFile.xml"),
0025                                            ZIP = cms.untracked.bool(True)
0026                                            )
0027 
0028 process.CondDB.timetype = cms.untracked.string('runnumber')
0029 process.CondDB.connect = cms.string('sqlite_file:myfile.db')
0030 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0031                                           process.CondDB,
0032                                           toPut = cms.VPSet(cms.PSet(record = cms.string('GeometryFileRcd'),tag = cms.string('XMLFILE_Geometry_'+args.tag+'_'+args.out+'_mc')))
0033                                           )
0034 
0035 process.maxEvents = cms.untracked.PSet(
0036     input = cms.untracked.int32(1)
0037     )
0038 
0039 process.p1 = cms.Path(process.XMLGeometryWriter)