/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Geometry/HGCalCommonData/test/python/dumpTBModuleDDD_cfg.py
57 строк
2 KB
Sunanda
Update several test scripts in Geometry/HGCalCommonData/test/python
22 май 2025, 06:52
22 май 2025, 06:52
1bc7446
Код
Авторство
О чём код?
############################################################################### # Way to use this: # cmsRun dumpTBModuleDDD_cfg.py type=HGCalTBModule # # Options for type HGCalTBModule, HGCalTBModuleX, AHcalModuleAlgo # ############################################################################### import FWCore.ParameterSet.Config as cms import os, sys, importlib, re import FWCore.ParameterSet.VarParsing as VarParsing #################################################################### ### SETUP OPTIONS options = VarParsing.VarParsing('standard') options.register('type', "HGCalTBModule", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "type of operations: HGCalTBModule, HGCalTBModuleX, AHcalModuleAlgo") ### get and parse the command line arguments options.parseArguments() print(options) process = cms.Process("DumpTBModule") #################################################################### # Use the options geomFile = "Geometry.HGCalCommonData.test" + options.type + "XML_cfi" outFile = "dump" + options.type + "DDD.root" print("Geometry file: ", geomFile) print("Output file: ", outFile) process.load(geomFile) process.load('FWCore.MessageService.MessageLogger_cfi') if 'MessageLogger' in process.__dict__: process.MessageLogger.G4cerr=dict() process.MessageLogger.G4cout=dict() process.MessageLogger.HGCalGeom=dict() process.source = cms.Source("EmptySource") process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) ) process.add_(cms.ESProducer("TGeoMgrFromDdd", verbose = cms.untracked.bool(False), level = cms.untracked.int32(14) )) process.dump = cms.EDAnalyzer("DumpSimGeometry", outputFileName = cms.untracked.string(outFile)) process.p = cms.Path(process.dump)