File indexing completed on 2024-04-06 12:15:06
0001
0002
0003
0004
0005
0006
0007
0008 import FWCore.ParameterSet.Config as cms
0009 import os, sys, imp, re
0010 import FWCore.ParameterSet.VarParsing as VarParsing
0011
0012
0013
0014 options = VarParsing.VarParsing('standard')
0015 options.register('type',
0016 "HGCalTBModule",
0017 VarParsing.VarParsing.multiplicity.singleton,
0018 VarParsing.VarParsing.varType.string,
0019 "type of operations: HGCalTBModule, HGCalTBModuleX, AHcalModuleAlgo")
0020
0021
0022 options.parseArguments()
0023 print(options)
0024
0025 process = cms.Process("DumpTBModule")
0026
0027
0028
0029 geomFile = "Geometry.HGCalCommonData.test" + options.type + "XML_cfi"
0030 outFile = "dump" + options.type + "DDD.root"
0031
0032 print("Geometry file: ", geomFile)
0033 print("Output file: ", outFile)
0034
0035 process.load(geomFile)
0036 process.load('FWCore.MessageService.MessageLogger_cfi')
0037
0038 if 'MessageLogger' in process.__dict__:
0039 process.MessageLogger.G4cerr=dict()
0040 process.MessageLogger.G4cout=dict()
0041 process.MessageLogger.HGCalGeom=dict()
0042
0043 process.source = cms.Source("EmptySource")
0044
0045 process.maxEvents = cms.untracked.PSet(
0046 input = cms.untracked.int32(1)
0047 )
0048
0049 process.add_(cms.ESProducer("TGeoMgrFromDdd",
0050 verbose = cms.untracked.bool(False),
0051 level = cms.untracked.int32(14)
0052 ))
0053
0054 process.dump = cms.EDAnalyzer("DumpSimGeometry",
0055 outputFileName = cms.untracked.string(outFile))
0056
0057 process.p = cms.Path(process.dump)