1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
###############################################################################
# Way to use this:
# cmsRun dumpHGCalHEsilDD4hep_cfg.py type=V17
#
# Options for type V16, V17, V18, V19
#
###############################################################################
import FWCore.ParameterSet.Config as cms
import os, sys, imp, re
import FWCore.ParameterSet.VarParsing as VarParsing
####################################################################
### SETUP OPTIONS
options = VarParsing.VarParsing('standard')
options.register('type',
"V17",
VarParsing.VarParsing.multiplicity.singleton,
VarParsing.VarParsing.varType.string,
"type of operations: V16, V17, V18, V19")
### get and parse the command line arguments
options.parseArguments()
print(options)
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
process = cms.Process("DumpHGCalHEsil",Phase2C17I13M9)
geomFile = "Geometry/HGCalCommonData/data/dd4hep/cms-test-ddhgcalHEsil" + options.type + "-algorithm.xml"
outFile = "hgcalHEsil" + options.type + "DD4hep.root"
print("Geometry file: ", geomFile)
print("Output file: ", outFile)
process.load('FWCore.MessageService.MessageLogger_cfi')
process.source = cms.Source("EmptySource")
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(1)
)
process.MessageLogger.cerr.FwkReport.reportEvery = 5
if hasattr(process,'MessageLogger'):
process.MessageLogger.HGCalGeom=dict()
process.DDDetectorESProducer = cms.ESSource("DDDetectorESProducer",
confGeomXMLFiles = cms.FileInPath(geomFile),
appendToDataLabel = cms.string('DDHGCalHEsil')
)
process.testDump = cms.EDAnalyzer("DDTestDumpFile",
outputFileName = cms.untracked.string(outFile),
DDDetector = cms.ESInputTag('','DDHGCalHEsil')
)
process.p = cms.Path(process.testDump)
|