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 
0003 import argparse
0004 import sys
0005 
0006 parser = argparse.ArgumentParser(prog=sys.argv[0], description='Generate XML geometry.')
0007 parser.add_argument("--geom", help="Name of parameter", type=str, default='ExtendedGeometry2024')
0008 parser.add_argument("--out", help="Prefix for output file", type=str, default='ge')
0009 
0010 args = parser.parse_args()
0011 
0012 process = cms.Process("GeometryXMLWriter")
0013 
0014 process.source = cms.Source("EmptyIOVSource",
0015                             lastValue = cms.uint64(1),
0016                             timetype = cms.string('runnumber'),
0017                             firstValue = cms.uint64(1),
0018                             interval = cms.uint64(1)
0019                             )
0020 
0021 process.DDDetectorESProducer = cms.ESSource("DDDetectorESProducer",
0022                                             confGeomXMLFiles = cms.FileInPath('Geometry/CMSCommonData/data/dd4hep/cms'+args.geom+'.xml'),
0023                                             appendToDataLabel = cms.string('make-payload')
0024                                            )
0025 
0026 process.DDCompactViewESProducer = cms.ESProducer("DDCompactViewESProducer",
0027                                                   appendToDataLabel = cms.string('make-payload')
0028                                                 )
0029 
0030 process.BigXMLWriter = cms.EDAnalyzer("OutputDD4hepToDDL",
0031                               fileName = cms.untracked.string("./"+args.out+"SingleBigFile.xml")
0032                               )
0033 
0034 
0035 process.maxEvents = cms.untracked.PSet(
0036     input = cms.untracked.int32(1)
0037     )
0038 
0039 process.p1 = cms.Path(process.BigXMLWriter)
0040